Skip to main content

Default limits

Every API key has a default quota of 1,000 requests per hour. The quota resets at the top of each clock hour (e.g. 14:00 → 15:00 UTC). Need a higher limit? Email thomas@thebuoy.app.

Rate limit headers

Every authenticated response includes three headers:

When you exceed the limit

If X-RateLimit-Remaining reaches 0, the next request returns: HTTP 429 Too Many Requests
The response also includes a Retry-After header with the same value in seconds.

Handling 429s in your code

Planning your request budget

For a cron job collecting French buoy readings every 30 minutes: That’s just 2 requests per hour — well within any quota. Even if you poll every 10 minutes, you’d only use 6 requests/hour for the entire French buoy network. For larger setups polling multiple countries or using last_readings in batches: 1,000 requests/hour covers most monitoring use cases.

Tips to stay within limits

GET /buoys?country=FR returns all buoys with readings in one call. Using last_readings in batches for the same data costs multiple calls. Always start with the country filter.
The list of buoys in a country doesn’t change often. Fetch it once, store the IDs, and use last_readings for subsequent polls. Only re-sync the list weekly or when you see unexpected missing_ids.
If you have multiple jobs polling the API, offset their schedules so they don’t all fire at the same time and spike your usage.
Read the headers on each response. If remaining is low, slow down before hitting the limit rather than handling 429s reactively.