Rate Limiting
Rate limiting is a strategy to manage API usage, ensuring system stability and consistent user experience by imposing limits on the number of API calls.
Global Rate Limit
In addition to the module-specific limits below, every endpoint enforces a flat limit of 200 requests per 10 seconds per user, applied across all endpoints. This limit exists to prevent excessive request rates and applies regardless of which module-specific limit also applies to a given endpoint.
API Module Rate Limits
The table below describes module specific rate limits.
If not specified, the "All others" rate limit is applied.
| Endpoint | Hourly User Limit | Hourly Database Limit |
|---|---|---|
| POST /api/v2/stop-analytics/stop-events | 5 calls | 20 calls |
| POST /api/v2/origin-destination/matrix | 5 calls | 20 calls |
| POST /api/v2/rtm/vdt | 5 calls | 20 calls |
| POST /api/v2/stop-analytics/rda | 30 calls | 60 calls |
| POST /api/v2/origin-destination/route | 30 calls | 60 calls |
| POST /api/v2/origin-destination/segment | 5 calls | 20 calls |
| POST /api/v2/traffic/speed-per-segment | 60 calls | 120 calls |
| POST /api/v2/zones/by-ids | 30 calls | 60 calls |
| POST /api/v2/rtm/demand-generation | 30 calls | 60 calls |
| POST /api/v2/rtm/observed-counts | 30 calls | 60 calls |
| POST /api/v2/expansion-factors/analysis | 50 calls | 1000 calls |
| All others | 400 calls | 20,000 calls |
Rate Limit Response Headers
When a request is rate limited, the API returns 429 Too Many Requests along with headers describing the current limit state:
| Header | Description |
|---|---|
retry-after | Number of seconds to wait before retrying. Honour this header when deciding when to retry. |
ratelimit-remaining | Number of calls remaining in the current window at the time of this response. |
ratelimit-reset | Number of seconds until the current rate limit window resets. |
retry-after is the authoritative signal for when to retry. ratelimit-remaining can appear inconsistent with the enforced limit on a 429 response; do not rely on it to determine whether you are currently rate limited.