Rate Limiting Overview
The Metaculus API implements rate limiting to ensure fair usage and protect the service from abuse. All API requests are subject to throttling policies.Why Rate Limits Exist
Rate limits help:- Ensure fair access for all users
- Prevent abuse and malicious activity
- Maintain API performance and stability
- Protect server resources
Rate Limit Policy
While Metaculus throttles requests to prevent abuse, specific rate limit thresholds may vary based on:- Authentication status (authenticated vs. unauthenticated)
- Endpoint being accessed
- Request patterns and historical usage
- Account standing
Rate limits are subject to change as we optimize the API. We’ll notify developers of significant changes to rate limiting policies.
Rate Limit Response
When you exceed the rate limit, the API returns a 429 Too Many Requests error:HTTP Response Headers
Rate limit responses may include headers indicating your current limit status:Best Practices
1. Implement Exponential Backoff
When you receive a 429 error, wait before retrying. Use exponential backoff to gradually increase wait times:2. Cache Responses
Reduce API calls by caching responses that don’t change frequently:3. Batch Requests
Instead of making many individual requests, use pagination and filters to retrieve multiple items at once:4. Use Webhooks (Future)
While webhooks are not currently available, they may be added in future API versions to reduce the need for polling.
- Polling at reasonable intervals (e.g., every 5-15 minutes)
- Using efficient filters to minimize data transfer
- Implementing conditional requests (if supported)
5. Monitor Your Usage
Keep track of your API usage to avoid hitting rate limits:Rate Limit Troubleshooting
I’m Getting 429 Errors
- Implement backoff logic - Wait before retrying failed requests
- Reduce request frequency - Spread requests over time
- Use pagination efficiently - Fetch more data per request with larger
limitvalues (max 100) - Cache responses - Don’t re-fetch data that hasn’t changed
- Check your code - Ensure you’re not making requests in tight loops
My Bot Is Being Rate Limited
For automated bots:- Add delays between requests - Wait 1-2 seconds between API calls
- Implement request queuing - Queue requests and process them at a controlled rate
- Monitor and log - Track your request patterns to identify issues
- Contact support - If you have legitimate high-volume needs, contact api-requests@metaculus.com
Example: Rate-Limited Bot
Fair Use Guidelines
To maintain good standing with the API:- Be respectful - Don’t hammer the API with excessive requests
- Use efficient queries - Filter and paginate appropriately
- Handle errors gracefully - Implement proper retry logic
- Cache when possible - Don’t repeatedly fetch the same data
- Monitor your usage - Keep track of request volumes
Requesting Higher Limits
If you have a legitimate use case requiring higher rate limits:- Document your use case and expected request volume
- Explain how your application benefits the forecasting community
- Contact us at api-requests@metaculus.com
Additional Resources
- Authentication Guide - Learn about API token management
- API Overview - Understand the API structure
- Best Practices - Contact us for guidance
