Appearance
Full Periods
GET /periodReturns a URL for the complete video of one period, to play or download. The video is not trimmed, so it can include time and commercials before and after play.
The URL works for 12 hours. After that, call this endpoint again for a new one.
A game or period that has no video returns a 404 error.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
game_id_nba | One of these two | string | NBA game ID, as in the data feed |
game_id | One of these two | UUID | Video game ID from /available_game_periods. See Game IDs |
period | Yes | integer | Period number |
Response
| Field | Type | Description |
|---|---|---|
result | string | Success or an error message |
clip_url | string | URL of the period's MP4 video |
first_video_seconds | number or null | Seconds into the video where play in the period begins |
first_clock_time | number or null | First game clock time with video, in seconds left in the period. null for NBA games |
Examples
NBA:
bash
curl --request GET \
--url 'https://api.cleaningtheglass.com/video/period?game_id=00124539-08e3-4174-bd7f-db5e96a904fb&period=2' \
--header 'X-API-KEY: YOUR_VIDEO_API_KEY'json
{
"result": "Success",
"clip_url": "https://...",
"first_video_seconds": 126.9,
"first_clock_time": null
}G League or Summer League, where video starts at 11:58 of the period:
json
{
"result": "Success",
"clip_url": "https://...",
"first_video_seconds": 244.3,
"first_clock_time": 718
}