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.
| Code | HTTP | Name | Meaning |
|---|---|---|---|
| 1001 | 400 | bad_request | A parameter is missing |
| 1002 | 401 | invalid_key | The key is missing |
| 1003 | 403 | key_disabled | The key was revoked or disabled, or the call came from an address not on its allow-list. |
| 1004 | 402 | plan_expired | Your subscription and its 3-day grace period have ended. Renew to continue. |
| 1005 | 402 | out_of_credits | The 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. |
| 1006 | 429 | rate_limited | Too many requests, or too many at once for this key. Wait for the time in Retry-After and try again. |
| 1007 | 403 | history_depth_exceeded | The requested window is older than your plan allows. Data is never silently cut short. |
| 1008 | 502, 503, 504 | upstream_error | A data service failed (502), the service is briefly unavailable (503), or a data service timed out (504). Try again shortly. |
| 1009 | 404 | not_found | The slug or name does not exist. |
Errors are never charged: they cost 0 credits.