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). Custom quotas can be configured per account. Contact api-support@thesurfkit.com if you need a higher limit.Rate limit headers
Every authenticated response includes three headers:| Header | Type | Description |
|---|---|---|
X-RateLimit-Limit | integer | Your total hourly quota |
X-RateLimit-Remaining | integer | Requests left in the current hour |
X-RateLimit-Reset | Unix timestamp | When the quota window resets |
When you exceed the limit
IfX-RateLimit-Remaining reaches 0, the next request returns:
HTTP 429 Too Many Requests
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:| Action | Calls | Frequency | Calls / hour |
|---|---|---|---|
GET /buoys?country=FR | 1 | Every 30 min | 2 |
last_readings in batches:
| Action | Calls per run | Runs / hour | Calls / hour |
|---|---|---|---|
| 3 countries × 1 call | 3 | 2 | 6 |
200 buoys via last_readings (chunks of 100) | 2 | 2 | 4 |
| All of the above | — | — | ~10 |
Tips to stay within limits
Use country filter instead of last_readings for full scans
Use country filter instead of last_readings for full scans
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.Cache your buoy ID list
Cache your buoy ID list
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.Stagger your cron jobs
Stagger your cron jobs
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.
Check X-RateLimit-Remaining proactively
Check X-RateLimit-Remaining proactively
Read the headers on each response. If
remaining is low, slow down before hitting the limit rather than handling 429s reactively.