Rascador

Errors & rate limits

Every failure uses the same envelope shape. Branch on error.code, not on error.message — the message may be reworded.

Error shape

json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests.",
    "retryable": true,
    "retry_after_seconds": 5,
    "request_id": "req_01h..."
  }
}

Error codes

StatusCodeRetryableMeaning
400invalid_requestNoMalformed input, including failed request validation.
400unknown_sourceNoUnrecognized `source` query param.
401missing_credentialsNoNo Authorization / X-API-Key header sent.
401invalid_tokenNoThe key is invalid, expired, or revoked.
402quota_exceededNoMonthly quota exhausted. See `error.details.resets_at`.
402payment_requiredNoLive key without an active subscription.
403insufficient_scopeNoThe key lacks the scope this endpoint requires.
403client_suspendedNoThe account is suspended.
404not_foundNoNo matching route.
404product_not_foundNoThat product id has never been seen — run a search first.
429rate_limitedYesPer-minute rate limit exceeded. Honor `Retry-After`.
500internal_errorYesUnhandled error on the gateway.
502upstream_errorYesThe source returned something unexpected.
503upstream_unavailableYesThe source is unreachable right now.
503upstream_busyYesSource or gateway is at capacity. Honor `Retry-After`.
504upstream_timeoutYesA live scrape didn't finish in time. Quota is refunded.

Rate limits

Every request counts against a per-minute limit tied to your key (defaults and overrides are visible in GET /v1/me). Exceeding it returns 429 rate_limited with a Retry-After header. Live search and live product fetches additionally share a per-minute, per-day and concurrency limit, since each one drives a real browser session upstream.

Quota

Quota is monthly and cost-weighted — cheap stored reads and expensive live calls draw from the same pool at different rates. Failures on the gateway's side (5xx, timeouts, aborted requests) are refunded automatically; you're never billed for a request that didn't succeed.

CallUnits
Stored read (products, categories, sources, me)1
Live product fetch5
Live search10
Live search with `refresh=true`15

Timeouts

GET /v1/search, and a cold GET /v1/products/:id that has to scrape live, can take 20–90 seconds. Set your client timeout to at least 130 seconds for those two calls.