Social Media
YouTube Streams
Get direct, playable media stream URLs for a video — progressive and adaptive formats with itag, resolution, bitrate, codecs, and content length — as JSON.
POST/api/v1/youtube/streams
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonvideo_idstringrequiredThe YouTube video id (11 characters).
Example: n61ULEU7CO0
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.youtube.streams(video_id="n61ULEU7CO0")
print(results)Response
"video_id": "n61ULEU7CO0",
"title": "Best of lofi hip hop 2021 [beats to relax/study to]",
"author": "Lofi Girl",
"length_seconds": 22258,
"view_count": 55696608,
"is_live": false,
"expires_in_seconds": 21600
},
"response_time": 1487,
"credits_used": 3,
"credits_remaining": 4744
}