aeyho

Rate limits

How many calls a key may make, the headers that say where you are, and what to do when you hit the limit.

View as Markdown

On this page

The limits

Each key has two limits a minute:

LimitPer key, per minute
All requests120
Requests that change something (POST, PATCH, DELETE)30

A minute starts with the key's first request, and the counts start again 60 seconds later. Different keys have their own counts.

The headers

Every answer to a call with a valid key carries:

HeaderWhat it says
RateLimit-LimitThe limit this request counted against: 120 for reads, 30 for changes.
RateLimit-RemainingHow many requests of that kind are left this minute.
RateLimit-ResetSeconds until the counts start again.

When you hit a limit

The call answers 429 with the code rate_limited and a Retry-After header in seconds. Wait that long, then go on.

To stay under the limits:

  • Poll a reel every 10 to 15 seconds, not faster. Or use webhooks and don't poll at all.
  • Ask for bigger pages (?limit=100) instead of many small ones.
  • Slow down when RateLimit-Remaining gets low.

Try it

curl -i https://www.aeyho.com/api/v1/account \
  -H "Authorization: Bearer $AEYHO_KEY" | grep -i ratelimit