Guide
Errors
Every error is JSON with a code you can branch on and a message that says what to do.
Errors carry an HTTP status and a body like this:
{
"error": "allowance_used",
"message": "This month's 50000 requests are used. Add credit at https://thelobbynews.com/account/api to keep going."
}Codes
| 400 bad_request | A parameter is missing, unknown or out of range. |
| 400 bad_cursor | The cursor is from another list or was altered. |
| 401 invalid_key | A malformed key, or one that was revoked. |
| 402 payment_required | No key at all. The body says how to get one, and agents get the ways to pay per request. |
| 402 no_plan | The key’s account has no live plan. |
| 402 allowance_used | The month’s allowance is used and there is no credit account yet. |
| 402 insufficient_credits | The allowance is used and the credit balance is below the price of the request. |
| 403 plan_upgrade_required | The endpoint is on a plan the key’s account does not have. |
| 403 suspended | API access on the account is suspended. |
| 404 not_found | No such record, or no such endpoint. Never charged. |
| 429 rate_limited | Over the per-minute limit. Wait Retry-After seconds. |
| 503 unavailable | Search is briefly unavailable. Never charged; retry after Retry-After. |
| 500 internal_error | Our fault. Never charged. |