Errors

Every error has the same body:

{"status": {"error_code": 1005, "error_message": "Out of credits"}}

On success the status field is the word success. On an error it is an object, so check the HTTP status first.

CodeHTTPNameMeaning
1001400bad_requestA parameter is missing
1002401invalid_keyThe key is missing
1003403key_disabledThe key was revoked or disabled, or the call came from an address not on its allow-list.
1004402plan_expiredYour subscription and its 3-day grace period have ended. Renew to continue.
1005402out_of_creditsThe account has no credits left, or not enough for the most this call can cost. Ask for fewer items, or wait for the next reset or a top-up.
1006429rate_limitedToo many requests, or too many at once for this key. Wait for the time in Retry-After and try again.
1007403history_depth_exceededThe requested window is older than your plan allows. Data is never silently cut short.
1008502, 503, 504upstream_errorA data service failed (502), the service is briefly unavailable (503), or a data service timed out (504). Try again shortly.
1009404not_foundThe slug or name does not exist.

Errors are never charged: they cost 0 credits.