Riken ScraperDocs

Response envelope

The keys every answer has, success or error.

Success

Every successful answer has three keys next to the route's own data:

{
  "success": true,
  "credits_charged": 1,
  "credits_remaining": 999
}
keymeaning
successtrue
credits_chargedwhat this request cost
credits_remainingwhat your key can still spend after this request

Credit amounts are exact decimals in the JSON, never rounded floats. Parse them as decimals if you do money math.

Error

Every error has the same shape, and errorStatus always equals the HTTP status:

{
  "success": false,
  "error": "timeout",
  "errorStatus": 504,
  "message": "no answer within the time limit; not charged",
  "credits_charged": 0
}
keymeaning
errora stable code. Branch on this.
errorStatusthe HTTP status, repeated
messagefor people. It may be reworded at any time.
credits_chargedalways 0 on an error
retry_after_soptional: the same number as the Retry-After header
credits_remainingoptional: on 402, and on free answers that report it
needed_creditsoptional: on 402, what the request costs

Every code is listed on Errors.

On this page