---
id: quick-start
title: Sport Line API — Quick Start
description: Quick guide to obtaining access and sending the first request to Sport Line API.
version: v1
language: en
---

# Sport Line API — Quick Start

## What You Will Get

Sport Line API provides sports data for websites and applications, including:

- sports;
- countries and tournaments;
- Prematch and Live matches;
- teams, scores, and match status;
- betting markets and odds.

This guide explains how to obtain access, make your first API request, and verify the
response.

## Connection Method

Sport Line API is currently available to clients only through REST API. Your application
retrieves data by sending standard HTTP requests to Sport Line API methods.

WebSocket support is under development and is not yet available for production
integrations.

## Step 1. Obtain Access

To get started, contact the
[SportAPI manager on Telegram](https://t.me/suport_sportapi) and request access to Sport
Line API.

The manager will provide:

- the sports line base URL;
- your personal API key;
- information about the available sports and languages;
- the access expiration date;
- the terms of your selected subscription package.

The base URL may differ between client connections. In every example below, replace
`https://YOUR_API_DOMAIN` with the address provided by the manager.

## Step 2. Send the Key with the Request

The API key must be sent in the `Package` HTTP header with every request:

```http
Package: YOUR_API_KEY
```

Do not include the key in the request URL or publish it in public documentation, chats,
or repositories.

## Step 3. Select the Sports Line Type

Sport Line API supports two data types:

| Value | Data returned |
|---|---|
| `line` | Prematch — matches that have not started yet |
| `live` | Live — matches currently in progress |

The value is included directly in the request path.

For example:

```text
/v1/menu/live/en
```

## Step 4. Make Your First Request

Use the `menu` method for your first request. It returns the hierarchy of available
sports, countries, and tournaments.

### Live Menu Request

```http
GET https://YOUR_API_DOMAIN/v1/menu/live/en
```

HTTP headers:

```http
Package: YOUR_API_KEY
Accept: application/json
```

The API key is sent in the `Package` header and is not added to the URL.

### cURL Example

```bash
curl --request GET \
  --url 'https://YOUR_API_DOMAIN/v1/menu/live/en' \
  --header 'Package: YOUR_API_KEY'
```

This example requests the `en` language. The requested language must be included in
your key's subscription package.

## Step 5. Verify the Response

A successful response uses the following common structure:

```json
{
  "status": 1,
  "page": "/v1/menu",
  "body": [
    {
      "id": 1,
      "name": "Football",
      "counter": 126,
      "sub": []
    }
  ]
}
```

The values above demonstrate the response structure and may differ from the actual
response.

Main fields:

| Field | Description |
|---|---|
| `status` | Request status. A value of `1` indicates a successful response |
| `page` | The API method that generated the response |
| `body` | Data returned by the method |

Within `body`, the `menu` method returns the following nested hierarchy:

```text
sport → country → tournament
```

The complete menu structure is documented in the [`menu` method](../api-reference/menu.md).

## If the First Request Does Not Work

Check the following:

1. The base URL is correct.
2. The `Package` header was sent.
3. There are no spaces before or after the API key.
4. The key has not expired.
5. The `en` language is included in your subscription.
6. The key provides access to the requested sports.

If the request fails, the API returns `error_code` and `error_message` fields:

```json
{
  "error_code": 100,
  "error_message": "Missing Package header"
}
```

Error causes and troubleshooting steps are documented in
[Error Handling](error-handling.md).

If you cannot identify the cause, send the following information to support:

- the request URL without the API key;
- the time when the request was made;
- the error response body;
- a code example with all sensitive data removed.

SportAPI support: [@suport_sportapi](https://t.me/suport_sportapi).

Official website: [sportapi.net](https://sportapi.net).

## Next Steps

After successfully retrieving `menu`, follow this general integration flow:

1. Retrieve the available sports, countries, and tournaments.
2. Select the required `sportId` and `tournamentId`.
3. Request the match list using the `events` method.
4. Take the required match's `game_id`.
5. Request full match details using the `event` method.
6. Refresh Prematch or Live data at the recommended interval.

Next: [Authentication and Access](authentication-and-access.md).
