Overview
KaggleIngest uses rate limiting to ensure fair usage and maintain service stability. Rate limits are applied per IP address using the client’s real IP (extracted fromX-Forwarded-For headers when behind load balancers).
Rate limit structure
Search endpoint
The search endpoint has the following rate limit:- Endpoint:
/api/search - Limit: 20 requests per minute
- Scope: Per IP address
Other endpoints
Competition metadata endpoints (/api/competitions/{slug}) and authentication endpoints are not currently rate limited, but may be subject to rate limiting in future versions.
Rate limit implementation
KaggleIngest uses slowapi for rate limiting, with IP address extraction from:X-Forwarded-Forheader (for requests behind load balancers/proxies)- Direct client IP (fallback for development environments)
X-Forwarded-For chain to prevent rate limit bypass attempts.
Rate limit responses
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
X-RateLimit-Limit: Maximum requests allowed in the time windowX-RateLimit-Remaining: Requests remaining in current windowX-RateLimit-Reset: Unix timestamp when the rate limit resetsRetry-After: Seconds until you can make another request
Handling rate limits
Retry strategy
When you receive a 429 response, implement exponential backoff:Best practices
- Cache responses: Store search results locally to avoid repeated API calls
- Batch requests: Group multiple operations when possible
- Monitor rate limit headers: Track
X-RateLimit-Remainingto avoid hitting limits - Implement client-side rate limiting: Space out requests to stay under the limit
- Use webhooks: For long-running operations, consider polling less frequently
Request throttling
Implement client-side throttling to avoid hitting rate limits:Increasing rate limits
Rate limits are currently fixed at the application level. If you require higher rate limits for production use:- Contact support at [email protected]
- Describe your use case and expected request volume
- Enterprise plans may offer custom rate limits
Performance monitoring
All API responses include theX-Process-Time-Ms header, which shows the server-side processing time in milliseconds. This helps you:
- Monitor API performance
- Identify slow queries
- Optimize your request patterns