Developers
API errors.
Every error is JSON:
{ "error": "<message>", "code"?: "<code>" }. Check the HTTP status first, thencodefor 429s.
API v1.0.0 (stable) · Last updated 2026-10-10 · Changelog
Docs: Overview · POST /api/audit · Errors · Changelog · OpenAPI
| Status | When | What to do |
|---|---|---|
| 400 | Missing, invalid or non-public url |
Send a public http(s) URL. |
| 422 | The page couldn't be read (private, blocked, empty) | Check that the URL loads without login. |
| 429 | Rate limited (ip_limit, net_limit, daily_cap) |
Wait Retry-After seconds. Cached URLs still work. |
| 502 | Scoring failed upstream | Retry once. Failed audits don't count toward your limit. |
| 503 | Audits paused (paused) |
Try again later. |
Error response examples
400 Bad Request
{ "error": "Please enter a valid http(s) URL." }
400 Bad Request (private or local host)
{ "error": "Please enter a public docs URL." }
422 Unprocessable Content
{ "error": "Could not read that page. Is it public?" }
429 Too Many Requests (header Retry-After: 41230)
{ "error": "You've used your 3 free audits for today. Come back tomorrow, or see the Fix Report for a full audit.", "code": "ip_limit" }
429 Too Many Requests
{ "error": "We've hit today's limit of free audits. Please come back tomorrow (resets 00:00 UTC). Cached results for popular docs still work.", "code": "daily_cap" }
502 Bad Gateway
{ "error": "Scoring failed. Try again." }
503 Service Unavailable
{ "error": "Free audits are paused right now. Please try again later.", "code": "paused" }
Handling errors in code
Check the status code first, then code for 429s. A complete client that validates input, waits out rate limits and retries a failed scoring once:
async function audit(url) {
try { new URL(url); } catch { throw new Error("Pass a full http(s) URL"); } // avoids a 400
for (let attempt = 0; attempt < 2; attempt++) {
const res = await fetch("https://getdocscout.com/api/audit", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url }),
signal: AbortSignal.timeout(120_000),
});
if (res.ok) return res.json();
const err = await res.json().catch(() => ({ error: res.statusText }));
if (res.status === 502 && attempt === 0) continue; // scoring hiccup: retry once
if (res.status === 429) {
const wait = Number(res.headers.get("retry-after") || 3600);
throw new Error(`Rate limited (${err.code}). Retry in ${Math.round(wait / 60)} min.`);
}
if (res.status === 422) throw new Error("DocScout couldn't read that page. Is it public, without login?");
throw new Error(`${res.status}: ${err.error}`);
}
}
import time, requests
def audit(url: str) -> dict:
for attempt in range(2):
r = requests.post("https://getdocscout.com/api/audit", json={"url": url}, timeout=120)
if r.ok:
return r.json()
err = r.json() if r.headers.get("content-type", "").startswith("application/json") else {"error": r.text}
if r.status_code == 502 and attempt == 0:
time.sleep(5) # scoring hiccup: retry once
continue
if r.status_code == 429:
wait = int(r.headers.get("retry-after", 3600))
raise RuntimeError(f"Rate limited ({err.get('code')}). Retry in {wait // 60} min.")
if r.status_code == 422:
raise RuntimeError("DocScout couldn't read that page. Is it public, without login?")
raise RuntimeError(f"{r.status_code}: {err.get('error')}")
# curl: show status and the Retry-After header
curl -s -i -X POST https://getdocscout.com/api/audit \
-H "Content-Type: application/json" \
-d '{"url": "https://docs.stripe.com/api"}' | grep -iE "^HTTP|^retry-after|"code""
Recovery by status
- 400 invalid URL: the
urlfield is missing, not http(s), or points to localhost/a private IP. Send the full public URL includinghttps://. Example error:{"error": "Please enter a valid http(s) URL."} - 422 unreadable: DocScout fetched the page but got under ~50 characters (login wall, bot block, or an empty JS shell). Open the URL in a private window; if it needs login, audit a public page instead.
- 429 ip_limit / net_limit: you've used today's audits. Wait
Retry-Afterseconds (until 00:00 UTC). Re-requesting a URL audited in the last 24 h still works, because cached results are free. - 429 daily_cap: the global free cap is reached. Same reset time. Cached URLs still work.
- 502 scoring failed: a transient upstream error. Retry once after a few seconds. It isn't counted against your limit.
- 503 paused: audits are temporarily disabled for maintenance. Retry later, with no change needed on your side.
Status and support
There is no separate status page yet. If you keep getting 502 or 503 responses, email hola@getdocscout.com with the URL you audited and the time (UTC).