Skip to content
Guides

Limits that keep the pit lane clear

The API is free. To keep it fast for everyone, each caller gets a request budget per second, minute and day. This page explains how it is counted, how to read what you have left and what to do when it runs out.

Rate limits

There is no key or signup, so nothing to send. Callers are told apart by IP address, so the budget below is shared by everyone behind the same address. That is usually just you, and it holds when your app runs in the browser too (cross-origin requests are allowed).

WindowAllowedHow it works
Per minute20A sliding 60-second window, not a clock minute.
Per day2,000Resets at 00:00 UTC.
Burst5 / secondNo more than this in any one second.
  • A 304 Not Modified does not count against any of them, though once a budget has run out you get the 429 first.
  • Errors count, including 400s and 404s, so validate your parameters before you send.
  • Calling from a server means all your users share one budget. Fetch once and fan the data out from your side.
  • Limits are enforced per server instance, so the effective ceiling can be a little higher than the numbers above. Do not rely on that.

Reading the headers

Every response from an endpoint, including errors, says where you stand. Check X-RateLimit-Remaining before you fire the next call and slow down as it falls.

Plenty left
16 / 20200 OK
X-RateLimit-Remaining: 16
X-RateLimit-Reset: 41
Running low
3 / 20200 OK
X-RateLimit-Remaining: 3
X-RateLimit-Reset: 12
Limit reached
0 / 20429 Too Many Requests
X-RateLimit-Remaining: 0
Retry-After: 18
HeaderMeaning
X-RateLimit-LimitRequests allowed per minute.
X-RateLimit-RemainingRequests left in the current minute. On a 429 from the burst or daily budget, this can be above zero.
X-RateLimit-ResetSeconds until the oldest request in the window drops off.
X-Daily-RemainingRequests left today. The day resets at 00:00 UTC.
Retry-AfterOn a 429, 502 or 503: seconds to wait before you try again.

Poll budget

Pick the endpoints your app polls and how often. Worst case assumes every poll returns new data. In practice 304 responses are free, so real usage is lower.

every 5 s
12.0 /min
every 10 s
0.0 /min
every 15 s
4.0 /min
every 60 s
1.0 /min
every 15 s
0.0 /min
Worst-case usage
17.0 requests / min
Per minute · 20 / min85% used
Per day · 2,000 / dayOver by 22,480 / day

Polling around the clock at this rate would make 24,480 requests a day. Poll only while a session is live, and stop once it ends, to stay within the daily budget.

When you hit a 429

429Too Many Requests
Retry-After: 18
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 0
{
"error": {
"code": "rate_limited",
"message": "Limit of 20 requests per minute reached.",
"retryAfter": 18
}
}
  1. 01
    Stop and wait for Retry-After
    Do not retry sooner. A request sent while you are limited is rejected and counts toward nothing, but it is still wasted traffic.
  2. 02
    Add jitter
    Wait Retry-After plus a random 0 to 2 seconds so many clients do not return in the same instant.
  3. 03
    Back off if it repeats
    After three 429s in a row, double your poll interval until a request succeeds, then step it back down.

Caching with ETag

Every successful response carries an ETag. Send it back as If-None-Match and you get an empty 304 when nothing changed. That response is free and tiny. Browsers do this for you on cacheable endpoints; for the live ones, do it yourself.

First call200 · counts 1
GET /api/v1/live
< 200 OK
< ETag: "9f3c1a"
Next call, nothing changed304 · free
GET /api/v1/live
If-None-Match: "9f3c1a"
< 304 Not Modified
< (empty body)

Error codes

Errors use the real HTTP status and a stable error.code you can branch on. The message is for humans and may change.

HTTPcodeMeaningWhat to do
400invalid_requestA parameter is missing or malformed.Check the parameter table for the endpoint.
404not_foundThe endpoint, season, round, driver or circuit does not exist, or has no data yet.Check the path values. Retrying will not help until the data exists.
429rate_limitedYou used the per-minute or per-second budget.Wait for Retry-After, add jitter, then retry.
429daily_quota_exceededYou used the per-day budget.Wait for the 00:00 UTC reset.
500internal_errorSomething broke on our side.Retry after a few seconds. If it persists, the site is likely down.
502upstream_errorAn upstream source answered badly or not at all.Wait for Retry-After, then retry.
503feed_unavailableNo session is running, or the feed could not be reached or refused access.Wait for Retry-After. Between sessions, poll again at the next scheduled session.

Fair use

Please do
  • Cache what you can and use ETags
  • Fan out to your own users from your server
  • Credit the API and the upstream sources (see the overview)
  • Stop polling when no session is running
Please do not
  • Rotate IP addresses or use proxies to dodge a limit
  • Poll /live faster than every 5 seconds
  • Resell or re-serve the raw feed as your own API
  • Pretend the data is official F1 data

Callers that abuse the service can be limited without notice. Unofficial; not affiliated with Formula 1. See the overview for attribution.