Getting started
Errors and rate limits
An error from the API comes with a stable code to branch on, and a message for people.
Error codes
Retry-After.Maintenance
During a planned maintenance window every endpoint answers 503 with a Retry-After header and the body { "error": "…", "maintenance": true }. That body predates the error envelope and has no code: check the status.
Rate limits
Each key may make 120 requests a minute, and an agency 600 across all its keys. Over the limit you get 429 and a Retry-After header with the seconds to wait. A request that reaches the count also gets X-RateLimit-Limit and X-RateLimit-Remaining: this key's limit and what is left of it this minute. They are missing when the request stops before the count: a missing, wrong or revoked key, API access off, or a billing lock. If the counter itself is briefly unavailable the request is let through without them; the other checks still apply.