Reference
Errors

Errors

Every error response is JSON with an error string and a matching HTTP status code. Most errors also carry a stable code to branch on, and may carry fix_hint (what to change), docs_url (the page for that endpoint) and retry_after:

HTTP 400
{
  "error": "`url` is required",
  "code": "missing_url",
  "fix_hint": "Include a `url` string in the request body.",
  "docs_url": "https://docs.superscraper.dev/scrape"
}

Branch on code when it is present; error is a human-readable message and its wording can change.

These handlers always return a code:

StatuscodeBodyWhen
401missing_api_key{ "error": "API key required. Pass via x-api-key header.", "code": "missing_api_key" }No key sent
401invalid_api_key{ "error": "Invalid or revoked API key.", "code": "invalid_api_key" }Key not found, inactive, or revoked
401session_required{ "error": "Sign-in required.", "code": "session_required" }Dashboard routes: no session token
401invalid_session{ "error": "Invalid or expired session.", "code": "invalid_session" }Dashboard routes: session token invalid or expired
403not_developer_surface{ "error": "This surface is not part of the developer API.", "code": "not_developer_surface" }The route is not part of the developer API
404not_found{ "error": "Not found", "code": "not_found", "fix_hint": "…" }Unknown path
429auth_rate_limited{ "error": "Too many failed authentication attempts. Retry later.", "code": "auth_rate_limited", "retryAfterSeconds" }Too many failed authentications from your IP in the last minute. Checked before your key, so a valid key is refused too until Retry-After passes
429rate_limited{ "error": "Rate limit exceeded", "code": "rate_limited", "limit", "tier", "retryAfterSeconds" }Your key's per-minute window is full
503auth_unavailable{ "error": "Auth backend not configured.", "code": "auth_unavailable" }The auth backend is unavailable (also "Auth check failed. Try again."). Retry with backoff
500internal_error{ "error": "Internal server error", "code": "internal_error" }An unexpected server error
504upstream_timeout{ "error": "Upstream timeout", "code": "upstream_timeout" }A dependency timed out

API-key 401s also set WWW-Authenticate: ApiKey header="x-api-key".

The API never throws raw stack traces to the client and never returns a 500 for an expected condition (a bad URL, a page that wouldn't load, a missing key). Those map to specific 4xx codes below.

Status codes

StatusMeaningTypical cause
200OKRequest succeeded
201CreatedA key was provisioned (POST /v1/keys/provision) or created
202AcceptedAn async crawl job was queued (POST /v1/crawl)
400Bad requestMissing/invalid field, malformed JSON body, invalid URL, or an SSRF-blocked URL
401UnauthorizedMissing, invalid, or revoked API key
402Payment requiredA pay-per-call (x402) route was hit without payment, or credits are exhausted
404Not foundUnknown job/resource id, or a cache-only scrape (minAge) with no cached copy
422UnprocessableThe URL was valid but the page could not be fetched or parsed
429Too many requestsRate limit exceeded for your tier (rate limits)
503Service unavailableA required backend isn't configured (e.g. crawl without a job queue, or auth backend down)

Common error bodies

StatusBodyWhen
400{ "error": "Invalid JSON body", "code": "invalid_json" }Request body isn't valid JSON, or is JSON but not an object (null, an array, a number or a string)
400{ "error": "`url` must be a string", "code": "invalid_field" }A field that must be a string (url, domain, cookies...) was sent as another type
400{ "error": "`url` is required" }A required field is missing
400{ "error": "Invalid URL" }The url field isn't a valid http(s) URL
400{ "ok": false, "error": "Blocked URL: This address can't be fetched.", "code": "blocked_url" }URL rejected by the SSRF guard (private/internal hosts). The response never names the address the host resolved to
401{ "error": "API key required. Pass via x-api-key header.", "code": "missing_api_key" }No key header present
401{ "error": "Invalid or revoked API key.", "code": "invalid_api_key" }Key not found, inactive, or revoked
422{ "ok": false, "error": "…" }Page couldn't be fetched/parsed (e.g. /v1/scrape failure)
429{ "error": "Rate limit exceeded", "code": "rate_limited", "limit": 200, "tier": "pro", "retryAfterSeconds": 60 }Too many requests in the sliding window
503{ "error": "Async crawl unavailable: job queue not configured (REDIS_URL). Crawl was not started." }Crawl with no worker queue configured
503{ "error": "Auth backend not configured.", "code": "auth_unavailable" }The auth/database backend isn't reachable

Rate-limit errors

A 429 additionally sets response headers so you can back off precisely:

HeaderDescription
X-RateLimit-LimitYour tier's per-minute ceiling
X-RateLimit-RemainingRequests left in the current window
Retry-AfterSeconds to wait before retrying (60 for rate_limited; the time left in the window for auth_rate_limited)

Note that X-RateLimit-Limit and X-RateLimit-Remaining are returned on every authenticated /v1 request, not only on a 429, so you can throttle proactively. See rate limits.

Handling errors

  • Always check the HTTP status first, then read error (and ok where present) for the human-readable reason.
  • On 429, honor Retry-After (or the X-RateLimit-Remaining header) before retrying.
  • On 503, the failure is a configuration or backend issue with the service. Retry with backoff.
  • A 422 from /v1/scrape means the URL was reachable as input but the page itself didn't yield content; it is not a quota or auth problem.

Other codes

StatuscodeWhen
422unsupported_content_typeScrape: the URL returned an image, video, archive or other binary instead of a page. Not charged. Use /v1/parse for documents and /v1/screenshot to capture a page as an image
422too_largeScrape: the response is larger than the download limit (a PDF is held to the document limit of /v1/parse). Refused without downloading the rest. Not charged
422too_many_redirectsScrape: the URL redirects more times than the limit (a redirect loop). Not charged
422blocked_urlScrape: a redirect led to an address that can't be fetched. Not charged
422blocked_by_siteMap: the site refused the request (401/403) and no links were found
422robots_disallowedMap: the site's robots.txt does not allow the homepage and no links were found
422no_addressMap: neither the host nor its www. form resolves
429site_rate_limitedMap: the site rate limited the request and no links were found (not your own rate limit)
502map_fetch_failedMap could not fetch the site
503search_unavailableNo search backend completed
504map_timeoutMap exceeded time budget with no links