Video Streaming in Sport Line API
What Sport Line API Provides
Sport Line API indicates whether video streaming is available for a specific Live match and returns its identifier.
Two fields are used:
| Field | Type | Purpose |
|---|---|---|
va | number or null | Video availability indicator: 1 means a stream is available; null means no stream is available |
vi | string or null | Live match video stream ID |
The value va: 0 is not used.
Coverage Restriction
SportAPI does not stream matches from top sports leagues. Video streams are available only for some other competitions.
Do not promise video availability for a specific tournament, country, sport, or Live
match in advance. Determine availability separately for each match using va and vi
from the current sports line response.
The topmatches method name also does not mean that SportAPI streams top leagues. It is
the name of a separate match selection in the API, not a description of the tournament
level.
When Video Is Available
In verified responses, an available stream has both fields populated:
{
"va": 1,
"vi": "20064614"
}
When no stream is available, the fields are returned as:
{
"va": null,
"vi": null
}
Client logic must check both fields:
va | vi | Action |
|---|---|---|
1 | non-empty string | The stream is marked as available; pass vi to the connected video component |
null | null | Do not show the video button or video section |
| any other combination | any value | Do not start video automatically; treat the response as inconsistent and refresh the data |
Do not store the presence of vi as a permanent match property. Check availability in
the current Live response.
vi Format
vi is a string identifier, not a number or a ready-to-use URL.
Actual responses contained different formats:
{
"vi": "20064614"
}
{
"vi": "DR_3_1783061985"
}
Even when the string contains only digits, do not convert it to a numeric type. Store
and pass vi exactly as received from Sport Line API.
vi is not a ready-made iframe or video-stream URL. It is an ID passed to the
ready-made video widget.
Ready-made Video Widget and iframe
The video stream is embedded in the website as a separate ready-made widget through an
iframe. The client does not need to obtain the stream independently or develop a
video player.
Sport Line API → va and vi → ready-made video widget → iframe on the client's website
The widget receives vi as the ID of the selected stream. Do not use vi itself as the
complete iframe src: the widget address and other integration parameters are
specified in the separate video-streaming service guide.
This document describes only the relationship between the video widget and Sport Line
API. The complete video embedding guide for iframe will be provided separately.
Where Video Fields Are Returned
va and vi are part of the match object. They can be retrieved with a Live match, for
example through:
events— the Live match list;event— a specific Live match;topmatches— the fields are present in both short and extended Live match summaries.
Video is not yet available in Prematch. The fields may technically be present as
null, but this does not indicate video availability.
Example from a Live Match List
{
"game_id": 746049368,
"sport_id": 1,
"tournament_name": "Russia. Youth Championship. Division A",
"opp_1_name": "Akron-Yuri Konoplyov Academy (Youth)",
"opp_2_name": "Zenit Saint Petersburg (Youth)",
"va": 1,
"vi": "20064614"
}
game_id and vi serve different purposes:
game_idis used to request match data throughevent;viidentifies the video stream in the separate video service.
Do not substitute game_id for vi.
Interface Behavior
Recommended logic for a Live match card:
- Check
vaandvi. - If
va: 1andviis populated, show a “Watch Stream” button or video section. - If
va: nullorvi: null, do not show an unavailable video player. - Check both fields again after every match update.
- If the stream disappears from the response, disable the button and stop using the
stored
vi.
Sport Line API does not define the appearance of the video player. Video is displayed
by a separate ready-made widget embedded through an iframe.
Important Considerations
- Video is available only for Live matches.
- Not every Live match has a stream.
- SportAPI does not stream matches from top leagues.
vacan only be1ornull.- Always process
vias a string ornull. viis an ID, not a video-stream URL.- Check availability after every match-object update.
Practical Integration Rules
- Show video only when
va: 1andviis populated. - Pass
viwithout converting or modifying it. - Do not use
game_idor other fields in place ofvi. - Do not promise video for a particular league or match before checking the Live response.
- If
vidisappears, stop showing the stream as available. - Use the ready-made video widget embedded through an
iframe.