Anvil › Docs › /v1/http-status
HTTP status code API: what 404, 429, 502 and every other code means
Ask for one code with the path form GET /v1/http-status/404 (or the query twin ?code=404) and get a plain-English answer: phrase, category (1xx–5xx), a short summary, when_you_see_it, what_to_do, related cousins, whether retrying can help, and whether caches may store it by default. Ask for a whole class (4xx) or search by name (too many / teapot), or leave the code out for the compact catalogue. Ties into Wirebook's status-code lesson.
/v1/http-status returns JSON. No key, CORS on, 60 requests a minute./v1/http-status
Look up any HTTP status code: meaning, causes, fixes and retry advice. Change the values and press Send request to call the live API.
Parameters
| Name | Type | What it does | Default |
|---|---|---|---|
code | string | A code like 404, a class like 5xx, or words from a name like 'too many'. Leave out for the full list. Path form /v1/http-status/{code} also works. | — |
Example
Request:
GET https://api.oddlathe.com/v1/http-status
Response (generated by the real code when these docs were last built):
{
"count": 71,
"classes": [
{
"class": "1xx",
"category": "1xx informational",
"name": "Informational",
"description": "The request was received and the process is continuing.",
"codes": [
{
"code": 100,
"phrase": "Continue",
"name": "Continue",
"category": "1xx informational",
"class": "Informational",
"standard": true,
"spec": "RFC 9110",
"summary": "The server got the request headers and the client may send the body.",
"meaning": "The server got the request headers and the client may send the body."
},
{
"code": 101,
"phrase": "Switching Protocols",
"name": "Switching Protocols",
"category": "1xx informational",
"class": "Informational",
"standard": true,
"spec": "RFC 9110",
"summary": "The server is switching to the protocol the client asked for in Upgrade.",
"meaning": "The server is switching to the protocol the client asked for in Upgrade."
},
{
"code": 102,
"phrase": "Processing",
"name": "Processing",
"category": "1xx informational",
…
Code examples
curl 'https://api.oddlathe.com/v1/http-status'const res = await fetch("https://api.oddlathe.com/v1/http-status");
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();
console.log(data);import json, urllib.parse, urllib.request
url = "https://api.oddlathe.com/v1/http-status"
# Send a User-Agent: the edge network refuses Python's default one.
req = urllib.request.Request(url, headers={"User-Agent": "my-script/1.0"})
with urllib.request.urlopen(req, timeout=10) as r:
data = json.load(r)
print(data)When it's useful
- Friendlier error messages in your own app or CLI (map the code to <code>summary</code> / <code>what_to_do</code>)
- Deciding in a retry loop whether to try again (<code>retryable</code>: no, yes, after or maybe)
- Chat bots and help desks that explain error pages to people
- Teaching what the codes mean alongside Wirebook <code>/codes</code>
Good to know
- Path and query forms return the same JSON. Prefer
/v1/http-status/{code}when the code is already a path segment. categoryis one of1xx informational,2xx success,3xx redirect,4xx client,5xx server.phraseis the official reason phrase (Not Found, I'm a teapot…).relatedlists a few cousins people confuse (for example 401↔403, 502↔503↔504, Cloudflare 52x).retryableisafterfor 429 and 503: wait for theRetry-Afterheader.yescodes (408, 502, 504, Cloudflare 52x…) are usually temporary; back off exponentially with some jitter.- An unregistered code in range, such as 299, returns
registered: falseand the x00 code it should be treated as, which is how HTTP clients handle unknown codes. cacheable_by_defaultmarks the codes a cache may store without explicit freshness headers (200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414 and 501).- Non-standard codes carry
standard: falseand name who uses them, for example nginx or Cloudflare. Where a Tooltern deep-dive exists, the response includes aguideURL.
Covers every registered code plus the non-standard ones people actually meet (nginx 444/499 and Cloudflare 520–526). Prefer GET /v1/http-status/404 or ?code=404. Each answer includes phrase, category, plain summary, when_you_see_it, what_to_do, related codes, retry advice and default cacheability.
Errors
Errors are JSON like {"error": {"code": "…", "message": "…"}}. The ones this endpoint can return:
bad_param(400): a value is the wrong type or out of range (the message says which)rate_limited(429): over 60 requests a minute; wait for Retry-After seconds
Questions
What's the difference between 401 and 403?
401 means the server doesn't know who you are, so signing in may help. 403 means it knows (or doesn't care) and still says no.
Path or query — which should I use?
Same answer either way. Use /v1/http-status/502 when the code is in the path; use ?code=502 (or words like teapot) when you are building a form.
Why does nginx show 499?
499 is logged by nginx when the client hung up before the response was ready. The browser never receives it.
Is 418 real?
It began as a 1998 April Fools' joke about teapots. The code is now reserved so it will never get a serious meaning.
Related endpoints
/v1/statusIs this API healthy? Version, uptime and today's request count/v1/url/inspectLink X-ray: who really owns a link, and its warning signs/v1/cookie/parseSet-Cookie explainer: will the browser accept this cookie, and why not?
Prefer a page to an API?
- Guide: HTTP 401 vs 403 explained
Published , updated · OpenAPI 3.1 spec · Limits and privacy