Skip to content

Full Periods ​

GET /period

Returns 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 ​

ParameterRequiredTypeDescription
game_id_nbaOne of these twostringNBA game ID, as in the data feed
game_idOne of these twoUUIDVideo game ID from /available_game_periods. See Game IDs
periodYesintegerPeriod number

Response ​

FieldTypeDescription
resultstringSuccess or an error message
clip_urlstringURL of the period's MP4 video
first_video_secondsnumber or nullSeconds into the video where play in the period begins
first_clock_timenumber or nullFirst 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
}