Errors

Contents
  1. Response format
  2. Error codes
  3. Retrying

Response format

Every API returns JSON with the same outer shape:

{
  "code": 200,
  "msg": "",
  "data": {},
  "logId": "req_..."
}
Field Description
code Same as the HTTP status; 200 means success
msg The reason when something went wrong; an empty string on success
data The result; usually null on errors
logId The ID of this request — include it when you ask us to look into a problem

msg is currently in Chinese.

Error codes

code Meaning Charged What to do
400 Bad request: the body is not valid JSON, a required parameter is empty, the query has only search operators and no words, or the URL is too long No Fix the request as msg says
401 Invalid or disabled API key No Check the API key in the console — see Authentication
402 Insufficient balance No Top up in the console
422 Read Webpage failed: the page could not be fetched, the site does not allow crawling, or no main content was found No Check msg and data.step — see Read Webpage
500 An error on our side (reading the price, billing, …) No Retry later; if it keeps happening, contact us with the logId
502 The search or reading service is temporarily unavailable No Retry later

Only successful calls (code 200) are charged. If billing fails the API returns 500, gives no result and charges nothing.

Retrying

  • 400, 401, 402, 422: retrying gives the same result — fix the request or top up first.
  • 500, 502: retry after a few seconds, a limited number of times, with exponential backoff (1 s, 2 s, 4 s, …).