SportAPI Documentation
EN
S Product documentationSport Line API
v1
Service & pricing ↗ Get access ↗
Sport Line API / Quick Start

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 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:

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:

ValueData returned
linePrematch — matches that have not started yet
liveLive — matches currently in progress

The value is included directly in the request path.

For example:

/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

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

HTTP headers:

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

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:

{
  "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:

FieldDescription
statusRequest status. A value of 1 indicates a successful response
pageThe API method that generated the response
bodyData returned by the method

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

sport → country → tournament

The complete menu structure is documented in the menu method.

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:

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

Error causes and troubleshooting steps are documented in Error Handling.

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.

Official website: 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.