Intervals.icu now has a public API for other applications. To use it you need to generate an API key in /settings (look for “Developer Settings” near the bottom). Your API key allows other applications to access your Intervals.icu data. Be careful what you do with it! If you suspect that your key may have been compromised immediately clear or re-generate it.
By using the API you agree to the Intervals.icu API Terms and Conditions .
The API uses basic authentication for personal use. The username is “API_KEY” and the password your API key. Example using curl:
$ curl -u API_KEY:1l0nlqjq3j1obdhg08rz5rfhx https://intervals.icu/api/v1/athlete/2049151/activities.csv
Apps intended to be used by more than one person should use OAuth and Bearer tokens.
I generated some API docs:
Note that you can use “0” for the athlete id for endpoints that accept an athlete id in the path. This will use the athlete for the API key or bearer token used to make the call.
Also you can extend Intervals.icu itself using Javascript.
There are some guides for common API tasks:
Rate Limits
There are limits per day (reset at midnight UTC) and per rolling 15 minute window. The following http headers are returned on each request:
X-RateLimit-Limit: <15m limit>,<daily limit>
X-RateLimit-Remaining: <15m limit remaining>,<daily limit remaining>
Over rate limit requests receive a 429 status code and a Retry-After http header indicating how many seconds need to elapse until the call might succeed.
Retry-After: 370
There is an additional limit of 10 calls per second per IP address. This limit does not return any rate limit related http headers.
Rate limits are enforced differently for API key callers and OAuth client apps.
OAuth Client Apps
The default daily rate limit is 100/user per day up to 500 users (max 50000 requests), with a minimum of 5000. The daily limit resets at midnight UTC. Note that the per-user number is used to calculate the total daily limit and is not applied per-user, so backfills and new-user setup tasks should not be an issue.
The requests per 15 minute limit is 1/8 of the daily limit with a minimum of 2500. This is a rolling limit and does not reset at specific intervals.
If you have more than 500 users and need a higher daily limit, or a lower limit for safety, contact [email protected]. The limits are to protect the Intervals.icu infrastructure from apps with many users suddenly generating many more calls than usual.
Current limits and API usage information can be found on the oauth client management page (look for “Manage App” on your app on /settings/apps).
API Key Callers
API key calls are limited to 5000 requests per day and 2500 requests per rolling 15 minute window. If you need more than that you need to create an app using OAuth.
Cloudflare Note
Intervals.icu uses Cloudflare and CF considers requests from some client libraries (e.g. Python-urllib) to be suspicious and maybe challenge or block them. The easy fix is to change the user agent to look like a browser.