Rate Limits
Learn how Pullbay API rate limits work, how to monitor your usage, and proven strategies to handle rate limits without disrupting your application. This guide covers rate limit headers, best practices, and production-ready code examples.
How Rate Limits Work
Pullbay implements request rate limiting to ensure fair usage and maintain service stability for all users.
Rate Limit Basics
Scope: Rate limits are applied per API key, not per IP address
Time Window: Rate limits reset on a per-minute basis (60-second rolling window)
Enforcement: When you exceed your plan's limit, the API returns a
429 Too Many Requestsstatus codeCharges: Failed requests due to rate limiting still consume API credits
What Happens When You Exceed Rate Limits
When you exceed your plan's rate limit:
The API returns HTTP status
429 Too Many RequestsAn error response is sent with the
code: "rate_limit_exceeded"Subsequent requests are rejected until the time window resets
The
resetheader tells you exactly when limits reset (Unix timestamp)
Error Response Example:
Plan-Based Rate Limits
Your rate limit depends on your Pullbay plan. Upgrade your plan to increase your request capacity.
Free
10
Exploration and testing
Hobby
20
Small side projects and light automation
Builder
40
Production use and growing apps
Scale
60
High-volume usage
See the Pullbay dashboard or the Plans page for current pricing and limits.
Example: With the Scale plan (60 req/min), you can sustain about 1 request per second.
Checking Your Current Rate Limit
Your API key's rate limit is shown:
In the Pullbay dashboard under Billing
In the
limitresponse header from any API call
Look for:
Rate Limit Response Headers
Every Pullbay API response includes rate limit information in the response headers:
Integer
Your plan's maximum requests per minute
Integer
Requests remaining in this minute
Unix Timestamp
When the current rate limit window resets (seconds since Jan 1, 1970)
Example Response Headers:
Converting the Unix Timestamp:
Monitoring Rate Limit Status
Always inspect rate limit headers after each request:
Rate Limit Handling Strategies
Strategy 1: Proactive Throttling
Best for: Predictable, steady-state usage with varying load
Monitor the remaining header and proactively slow down requests when approaching the limit. This prevents rate limit errors entirely.
Advantages:
Prevents rate limit errors
Smooth, predictable request flow
Works well with steady pagination
Disadvantages:
May add unnecessary delays
Not ideal for bursty traffic patterns
Strategy 2: Reactive Backoff
Best for: Simple implementations, occasional rate limit hits
Wait when you encounter a 429 error. Extract the reset time from the X-RateLimit-Reset header and retry after the window resets.
Advantages:
Simple to implement
No overhead if rate limits aren't hit
Works for occasional bursts
Disadvantages:
Still results in some 429 errors
Less efficient than proactive throttling
Cumulative delay when frequently hitting limits
Strategy 3: Exponential Backoff with Jitter
Best for: Robust production systems, highly resilient applications
Implement exponential backoff with randomized jitter. When a rate limit (or other transient error) occurs, wait an exponentially increasing duration with random variance to avoid thundering herd problems.
Advantages:
Most robust approach for production
Handles transient errors (429, 5xx) gracefully
Jitter prevents thundering herd
Exponential backoff allows service recovery time
Disadvantages:
More complex implementation
Can introduce significant delays during outages
Backoff Sequence Example:
Best Practices for Rate Limit Management
1. Monitor Rate Limit Headers After Every Request
Always extract and log rate limit information:
2. Batch Requests Efficiently
Combine multiple logical requests into fewer API calls when possible:
3. Use Managed Pagination Endpoints
Pullbay's managed pagination endpoints (e.g., /reviews) handle pagination internally and consume fewer API credits:
4. Cache API Responses
Cache responses to avoid redundant API calls:
5. Request Only the Data You Need
Use parameters to limit the amount of data returned:
6. Implement Request Queuing
For applications that need to make many requests, queue requests and process them at a controlled rate:
7. Upgrade Your Plan When Needed
If you consistently hit rate limits:
Add bandwidth: Upgrade to a higher plan for more requests/minute
Monitor trends: Track rate limit hits in your logs
Optimize queries: Reduce API calls through caching and batching
Contact sales: For enterprise scale needs, contact Pullbay sales for custom limits
8. Set Up Rate Limit Alerts
Log rate limit status and alert when approaching the limit:
Production-Ready Rate Limit Tracking
Here's a complete example tracking rate limit usage over time:
Frequently Asked Questions
Last updated