fepli
DevelopersREST API

Rate limits

The fepli API limits how many requests it accepts in a given time, so one runaway script can't slow down an organisation's programme for everyone else.

The limits

CallerCounted perBurstRefill
With a tokenperson or service account300 requests100 requests per minute
Without a tokenIP address5 requests5 requests per hour
With a public keykey600 requests300 requests per minute

All limits work like a bucket of tokens. Every request takes one; the bucket refills at the given rate, up to the burst size. With a token you can make 300 requests in quick succession and then keep going at 100 per minute. That's enough for an integration syncing an edition or a reporting job going through an edition's attendances.

The limit with a token is counted per person or service account, not per token: all tokens of the same service account share one bucket.

The limit for anonymous requests is deliberately tight. If you show offers on a public website, don't call the API from your visitors' browsers without a key. Fetch the offers on your server, cache them, and refresh the cache every few hours; see Offers on your website. Or call the API from the browser with a public key, which is what the embeds do: all visitors of your website then share the allowance of the key.

When you hit the limit

A request over the limit is refused with the status 429 Too Many Requests. The response has no Retry-After header, so wait and retry with an increasing delay. With a token, a pause of a few seconds is usually enough: the bucket refills continuously, not once a minute.

Staying within the limits

  • Request bigger pages. itemsPerPage=200 needs a sixth of the requests that the default of 30 does. See Pagination.
  • Fetch only what changed. Most lists take modifiedSince or createdSince.
  • Use references. Responses embed the name and UUID of related records, so you often don't need a second request.
  • Use search to find things. One call to /search replaces a lookup in five lists.
  • Cache public data. Offers change a few times a day at most.

Was this page helpful?