> ## Documentation Index
> Fetch the complete documentation index at: https://docsv2.sportxapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Start querying live cricket data with SportXAPI in minutes.

Every request starts with your API key. Keep your API key secure on your server and call SportXAPI from backend code whenever possible.

## 1. Get Your API Key

Log in to your [SportXAPI Dashboard](https://dashboard.sportxapi.com/) to retrieve your secret production API key. If you need custom quotas or a commercial plan, you can request an API key via our [contact form](https://sportxapi.com/contact?intent=api-key).

***

## 2. Choose Your Environment

Select the environment that fits your current stage of development:

* **Paid plans:** Point your requests to `https://apiv2.sportxapi.com` with your production key.
* **Free / demo testing:** Point your requests to `https://api.sportxapi.com` (capped at 100 requests per month).

***

## 3. Make Your First Request

Pass your API key in the `X-API-Key` request header. Here is an example fetching the live match schedule:

```bash cURL theme={null}
curl -H "X-API-Key: YOUR_API_KEY" \
  https://apiv2.sportxapi.com/cricket/api/v2/match/schedule?status=live
```

```javascript Node.js theme={null}
const response = await fetch("https://apiv2.sportxapi.com/cricket/api/v2/match/schedule?status=live", {
  headers: {
    "X-API-Key": process.env.SPORTXAPI_KEY,
    "Accept": "application/json"
  }
});
const data = await response.json();
console.log(data);
```

```python Python theme={null}
import os
import requests

response = requests.get(
    "https://apiv2.sportxapi.com/cricket/api/v2/match/schedule?status=live",
    headers={
        "X-API-Key": os.getenv("SPORTXAPI_KEY"),
        "Accept": "application/json"
    }
)
print(response.json())
```

> [!TIP]
>
> Demo previews in the interactive API reference are rate-limited and do not expose your production credentials.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.