Rate Limiting Guide
Learn how to work within rate limits and optimize your API usage.
Understanding Rate Limits
Rate Limits by Tier
| Tier | Requests/Minute | Monthly Limit |
|---|---|---|
| Free | 10 | 500 total |
| Starter | 60 | 10,000 |
| Pro | 100 | 50,000 |
| Enterprise | 1,000 | 500,000 |
What Counts as a Request
Each API call counts as one request:
- Fetching a story
- Publishing a story
- Uploading an asset
- Updating a component
Batch operations may count as multiple requests.
Handling Rate Limits
429 Error Response
When you hit rate limits, you'll receive:
Error 429: Too Many Requests
Retry-After: 60 seconds
Automatic Retry
BlokMCP automatically handles rate limiting:
- Waits for the Retry-After period
- Retries the request
- Continues processing
Manual Pacing
For large operations, pace your requests:
For 500 stories to publish:
- Process in batches of 50
- Wait 60 seconds between batches
- Should take ~10 minutes total
Optimization Strategies
Batch Operations
Instead of:
For each of 100 stories:
- Get story
- Update story
- Publish story
= 300 requests
Do this:
- Get all 100 stories (1 request with pagination)
- Update all in batch
- Publish all in batch
= ~10 requests
Caching
Cache frequently accessed data:
- Component schemas (rarely change)
- Datasource entries
- Space configuration
Request Minimization
Only fetch what you need:
# Good: Fetch specific fields
"Get title and slug for all blog posts"
# Bad: Fetch everything
"Get all data for all stories"
Monitoring Usage
Check Your Usage
Show me my current API usage:
- Requests this minute
- Requests today
- Requests this month
- Percentage of monthly limit used
Usage Alerts
Set up alerts in dashboard:
- 50% of monthly limit
- 75% of monthly limit
- 90% of monthly limit
When to Upgrade
Consider upgrading if you:
- Regularly hit rate limits
- Need to process large volumes quickly
- Run automated workflows
- Have multiple team members using API
Best Practices
- Batch operations - Group related requests
- Pagination - Use appropriate page sizes
- Cache wisely - Don't refetch static data
- Schedule bulk work - Run during off-hours
- Monitor usage - Track patterns and optimize
- Plan ahead - Estimate request needs for projects
Related Resources
Hitting rate limits? Ask Claude to help optimize your API usage!