Lookup API

Resolve an error code from your CLI or CI

One endpoint. Send an error code or a raw log line and get back the matching reference page, its copy-paste fix and its FAQ, as JSON. Built for agents, CI checks and anything else that needs the answer without scraping HTML.

TL;DR · 10-second read

GET /api/v1/lookup?q=P2024 with Authorization: Bearer kye_live_… returns the matched error, its fix and its FAQ. The key comes from the account page and is part of Pro ($8/month or $72/year), which includes 10,000 calls a month.

Request

One GET, one query parameter
curl "https://knowyourerror.com/api/v1/lookup?q=P2024" \
  -H "Authorization: Bearer kye_live_xxxxxxxxxxxxxxxxxxxxxxxx"

q takes an error code (P2024, 42P01, 0xe450d38c) or a raw log line. It is scrubbed and normalized the same way the decoder scrubs a pasted trace, so a full stack trace works too. Longest accepted value is 5,000 characters.

Response

200 OK
{
  "match": {
    "id": "…",
    "ecosystem": "prisma",
    "code": "P2024",
    "title": "Timed out fetching a connection from the pool",
    "url": "https://knowyourerror.com/prisma/p2024/",
    "severity": "ERROR",
    "retryable": true,
    "http": null,
    "tldr": "…",
    "fixes": [{ "framework": "SQL", "title": "…", "good": "…", "explanation": "…" }],
    "faq": [{ "question": "…", "answer": "…" }]
  },
  "hits": [{ "ecosystem": "prisma", "code": "P2024", "title": "…", "score": 1, "url": "…" }]
}

match is filled in when one result is confident enough to return the full fix. hits is always present and ranked, so an unknown code still returns the closest pages.

Errors and limits

StatusMeaning
400The q parameter is empty.
401Missing, malformed or rotated key.
403The key belongs to an account without Pro.
429Monthly quota reached. It resets on the first of the month, UTC.

Every response carries X-RateLimit-Remaining with the calls left in the current month.

Questions

Do I need an account to read the error pages?

No. Every error page, fix and guide is public and indexable. The API key is only needed for the lookup endpoint, which is part of Pro.

What happens when the code is unknown?

The response still lists ranked hits with a score and a URL. `match` is null unless one result is confident enough to return the full fix.

How are calls counted?

One call per request, counted against the monthly quota of the calendar month, in UTC. The remaining calls come back in the `X-RateLimit-Remaining` header.