rate_limit_exceeded
How to fix the Scrnpix API 429 error when you exceed your plan's rate limit for screenshot or animation requests.
When Does This Happen?
This error occurs when you exceed your plan's per-minute request limit. Rate limits are enforced per user across all API keys. The response includes a Retry-After header indicating how many seconds to wait before retrying.
Reproduce This Error
# Send more requests than your plan allows per minute
for i in $(seq 1 100); do
curl -s -o /dev/null -w "%{http_code}\n" \
-H "X-KEY: your-api-key" \
"https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com"
done{"error": "rate_limit_exceeded", "message": "Rate limit exceeded. Please retry after 45 seconds.", "retry_after": 45, "limit": 20}How to Fix
- 1Wait for the duration specified in the Retry-After response header
- 2Implement exponential backoff in your client code
- 3Spread your requests over time instead of sending them in bursts
- 4Upgrade to a higher plan for increased rate limits
Correct Request
# Wait for the rate limit window to reset, then retry curl -H "X-KEY: your-api-key" \ "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com" \ --output screenshot.png
200 OK — returns the screenshot with rate limit headers: X-RateLimit-Limit: 20 X-RateLimit-Remaining: 19 X-RateLimit-Reset: 1700000000
Related Errors
Frequently Asked Questions
What rate limit headers does the API return?
Every successful response includes X-RateLimit-Limit (your plan's requests per minute), X-RateLimit-Remaining (requests left in the current window), and X-RateLimit-Reset (Unix timestamp when the window resets). Use these headers to implement proactive throttling.
Are rate limits per API key or per user?
Rate limits are enforced per user, not per API key. If you have multiple API keys, they share the same rate limit pool. Creating additional keys does not increase your rate limit.
Still Having Issues?
Check your API key and subscription status in the dashboard, or explore our language guides for integration examples.
Go to Dashboard