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:
| 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:
/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:
| 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:
sport → country → tournament
The complete menu structure is documented in the menu method.
If the First Request Does Not Work
Check the following:
- The base URL is correct.
- The
Packageheader was sent. - There are no spaces before or after the API key.
- The key has not expired.
- The
enlanguage is included in your subscription. - 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:
- Retrieve the available sports, countries, and tournaments.
- Select the required
sportIdandtournamentId. - Request the match list using the
eventsmethod. - Take the required match’s
game_id. - Request full match details using the
eventmethod. - Refresh Prematch or Live data at the recommended interval.
Next: Authentication and Access.