Errors and limits
Getting started
Errors and limits
Error format
Every error response has an HTTP status and this structure:
json
{
"error": {
"code": "range_too_large",
"message": "The time window must not exceed 92 days.",
"requestId": "c684662c-4859-456a-bcec-1c641c6f18bb"
}
}Base your error handling on code, not on the text in message. The requestId is also sent in the X-Request-Id header of every response.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_limit | limit is not an integer between 1 and 1000 |
| 400 | invalid_cursor | cursor was not returned by this dataset |
| 400 | invalid_from, invalid_to | Not a valid date, or a timestamp without a time zone |
| 400 | from_after_to | from is not before to |
| 400 | range_too_large | The time window is longer than 92 days |
| 401 | missing_api_key | The Authorization: Bearer … header is missing |
| 401 | invalid_api_key | The key is unknown or revoked, or the Reporting API is not enabled |
| 401 | expired_api_key | The key has expired |
| 403 | ip_not_allowed | The request came from an IP address that is not allowed |
| 404 | unknown_dataset | The dataset does not exist |
| 405 | method_not_allowed | A method other than GET was used |
| 429 | rate_limited | Too many requests; see Limits |
| 500 | internal_error | Something went wrong at gastrotodo; try again later |
Responses with status 502, 503, or 504 do not come from the API itself, so their body may look different.
Limits
- You can send 120 requests per minute per organization. An additional limit applies per IP address.
- If you exceed a limit, you receive
429with aRetry-Afterheader in seconds. Wait at least that long before you retry.
Recommendations for your loader
- After
429,5xx, or a dropped connection, retry with increasing delays (e.g. 2, 4, and 8 seconds, with at most 5 attempts). - Do not retry after any other
4xxerror. - Load pages one after another, not in parallel.
