Each API key has a rate limit of 100 requests per hour. Rate-limit state is returned on every response in the headers below.Documentation Index
Fetch the complete documentation index at: https://docs.politicalcomms.com/llms.txt
Use this file to discover all available pages before exploring further.
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window. |
X-RateLimit-Remaining | Requests remaining in the current window. |
X-RateLimit-Reset | Unix timestamp (seconds) when the limit resets. |
What happens at the limit
When you hit the limit, subsequent requests return429 Too Many Requests with error code RATE_LIMIT_EXCEEDED until the reset timestamp passes.
Handling 429s correctly
Monitor X-RateLimit-Remaining on every response
Monitor X-RateLimit-Remaining on every response
Don’t wait for a 429 - track the remaining counter and start backing off when it gets low (e.g. below 10).
Implement exponential backoff for 429 responses
Implement exponential backoff for 429 responses
Standard pattern: on 429, sleep until
X-RateLimit-Reset (or for an initial delay of 1s, doubling each retry up to a cap). Retry the same request. Never retry tighter than once per second.Use caching to reduce API calls
Use caching to reduce API calls
Cache hierarchy data for 5–10 minutes (it changes infrequently). Cache historical stats for completed date ranges indefinitely.
Batch operations when possible
Batch operations when possible
Prefer one large date-range query over many small ones. Use hierarchy filters (
organization_id, brand_id, campaign_id) to reduce data volume per request.