TrafficCreator API Rate Limits and Best Practices
Avoid tight polling loops against the API — check project stats periodically rather than continuously, and handle error responses (especially 401 and 500) with backoff before retrying.
Best Practices#
- Poll project stats on a reasonable interval (e.g. every few minutes) rather than continuously.
- Handle
401by checking your API key hasn't been regenerated, rather than retrying blindly. - Handle
500with a short backoff and retry, since it usually indicates a transient server-side issue. - Cache project IDs and settings you already have instead of re-fetching on every request.