Rate Limits
Become familiar with our rate limits to prevent unexpected errors.
Why does Palenca have rate limits?
Rate limits help ensure stable and fair API usage across all integrations. The current rate limit is 120 requests per 60 seconds. This is a Global Rate Limit, meaning you can perform 120 requests across all endpoints in a 60-second window.
Handling Rate Limits
When you exceed our rate limit, requests will be blocked until the next minute window begins. The API returns a 429 Too Many Requests
status code in these cases.
Response Headers
Monitor your current rate limit status by inspecting these response headers:
- X-RateLimit-Limit - Maximum requests allowed per minute
- X-RateLimit-Remaining - Requests remaining in current window
- X-RateLimit-Reset - Reset time for rate limit window (Unix timestamp)
For example:
response = requests.post(url, headers=headers)
print(response.headers)
>>> {'Date': 'Mon, 03 Mar 2025 21:20:33 GMT',
'Content-Type': 'application/json',
'Content-Length': '106',
'Connection': 'keep-alive',
'x-ratelimit-limit': '120',
'x-ratelimit-remaining': '119',
'x-ratelimit-reset': '1741036893',
'x-request-id': 'da1b77ba-6cec-433b-a0dc-e7ad55d8a28d',
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'}
You can see in the X-RateLimit-Remaining
header that we had 119 requests left to make in that minute before hitting the rate limit. You can use a site like Epoch Converter to translate the value in the X-RateLimit-Reset
header to a date in your timezone. In this example, 1741036893
corresponds to March 3, 2025 21:21:33 GMT.
Recommended Practices
To work effectively with rate limits:
- Handle 429 status codes gracefully, and wait for the next minute window before retrying.
- Space requests evenly within your time window.
- Avoid unnecessary for loops in your code that might cause premature rate limit exhaustion. See: Webhooks
Updated 3 days ago