Rate limits

Get an API key

Sofia API counts requests in three windows: 15 minutes, 24 hours and 30 days.

Token15 minutes24 hours30 days
Personal key (per account)1501,00010,000
OAuth client10050015,000
OAuth client, per authorized person (up to 1,000)+10+25+100

Headers

Every answer tells you what is left, in the IETF format:

http
RateLimit: "15m";r=144;t=43, "24h";r=994;t=13543, "30d";r=9994;t=13543
RateLimit-Policy: "15m";q=150;w=900, "24h";q=1000;w=86400, "30d";q=10000;w=2592000

r is the number of requests left, t the seconds until the window resets, q the quota and w the window in seconds.

When a window is full

The answer is 429 rate_limit_exceeded, with a Retry-After header and the exhausted window in details. Wait that long before retrying.

Use the API efficiently

  • Register a webhook instead of polling a post.
  • Use limit up to 100 to read lists in fewer pages.
  • Cache what rarely changes: platforms, establishments, connected accounts.