Skip to main content
SportXAPI authenticates API requests using an API key passed in the request headers.

API Key Header

Send your key in the X-API-Key HTTP header with each request:

Header Example

Security Best Practices

Never commit your API key to client-side code, public GitHub repositories, or browser-accessible scripts.
  1. Keep Keys Server-Side: Make requests from backend servers, serverless functions, or reverse proxies.
  2. Environment Variables: Store keys in environment variables (e.g. SPORTXAPI_KEY) rather than hardcoding.
  3. Key Rotation: If a key is accidentally exposed, immediately revoke it from the Dashboard and generate a replacement.