Skip to main content

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

  1. Sign up for free at odds-api.io
  2. Check your email for the API key
  3. Copy and securely store your API key
Keep your API key secure! Never share it publicly, commit it to version control, or expose it in client-side code.

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

Never expose your API key in client-side JavaScript code. Always make API calls from your backend server.
Bad Practice:
Good 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
Checkout is priced in your local currency where supported (USD, EUR, BRL, CNY, JPY, KRW), otherwise USD or GBP.

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
When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:

Best Practices for Rate Limiting

  1. Monitor response headers to track your usage and remaining requests
  2. Implement exponential backoff when you receive 429 errors
  3. Cache responses when appropriate to reduce API calls
  4. 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