API Key Authentication
Odds-API.io uses API key authentication to secure access to the API. Your API key identifies your account and tracks your usage.Getting Your API Key
- Sign up for free at odds-api.io
- Check your email for the API key
- Copy and securely store your API key
Using Your API Key
Include your API key as a query parameter in all authenticated requests:Security Best Practices
Use Environment Variables
Store your API key in environment variables instead of hardcoding it:Server-Side Only
Bad Practice:Rotate Keys Regularly
For enhanced security:- Rotate your API keys periodically
- Generate separate keys for development and production
- Immediately revoke compromised keys
Rate Limiting
API requests are rate-limited based on your subscription plan:
Additional Request Packages:
- +10K requests/hour: £139/month ($185)
- +20K requests/hour: £229/month ($299)
- +30K requests/hour: £309/month ($409)
- Custom volumes available on request
Monitoring Rate Limits
The API returns rate limit information in response headers with every request:- x-ratelimit-limit: Total requests allowed in the current window
- x-ratelimit-remaining: Requests remaining in the current window
- x-ratelimit-reset: ISO 8601 timestamp when the rate limit resets
429 Too Many Requests response:
Best Practices for Rate Limiting
- Monitor response headers to track your usage and remaining requests
- Implement exponential backoff when you receive 429 errors
- Cache responses when appropriate to reduce API calls
- Use the multi-odds endpoint to fetch odds for multiple events in a single request
Error Responses
The API uses standard HTTP status codes:
All errors return a JSON response with an error message:
Next Steps
Quickstart
Make your first API call
Best Practices
Learn optimization techniques