Support needed? Reach out! 📧

How to Scrape Youtube Live Stream Data

This tutorial shows how to use Youtube Live Stream Data API to scrape and crawl structured Youtube data in real-time.
Tap into YouTube live stream data through our API and extract concurrent viewer counts, stream duration, chat volume, and topic metadata for live content benchmarking.

Access Youtube Data in 3 Steps

Start crawling Youtube live streams data. Follow these steps to extract social media data in minutes.

1

Create Your Account

Go to our registration page and make an account. It's free, no credit card, and you get credits right away to play around with.

2

Verify Your Email Address

You'll get a verification email, click the link in it. Once that's done, you can grab your API token from the dashboard.

3

Make Your First API Call

Copy the code snippet below, swap in your API key, and run it. You'll get Youtube data back as JSON within a few seconds.

Code Sample

Here's a JavaScript example to get you going. Swap out the token and you're good, works the same way in any language that can make HTTP requests. Start collecting live streams data via our REST API!

javascript-logo JavaScript
Youtube Channel Streams
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/youtube/channel/streams'
3 const params = {
4   "browseId""UChBQgieUidXV1CmDxSdRm3g",
5   "depth"1,
6   "token""YOUR-TOKEN-HERE"
7 }
8  
9 const queryString = new URLSearchParams(params).toString();
10 const url = `${root}${endpoint}?${queryString}`;
11  
12 await fetch(url)
13   .then(response => response.json())
14   .then(data => console.log(data))
15   .catch(error => console.error(error));
16  

Parameters

browseId (string) Channel ID. REQUIRED
depth (integer) Abstraction of the API pagination. Depth 1 returns X results, depth N returns N * X results. Note that the exact number of results per depth (X) may differ per endpoint. Please refer to the specific endpoint description for more information. REQUIRED
token (string) Private token assigned to each client to access the APIs. REQUIRED

Example Response

Explore the fields returned by this endpoint. Click a row to expand nested objects and arrays, hover a value to copy it, or use "Expand all" to see everything at once.

JSON
Youtube Channel Streams
dataobject2 fields
userobject24 fields
urlCanonicalstring"https://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g"
titlestring"Citizen TV Kenya"
descriptionstring""
thumbnailobject1 field
thumbnailsarray1 item · schema from #0 1 item
urlstring"https://yt3.googleusercontent.com/vqgyK9trRKgIFfaVhikZoo1l30ANBVkgwVRI…"
widthnumber200
heightnumber200
siteNamestring"YouTube"
appNamestring"YouTube"
androidPackagestring"com.google.android.youtube"
iosAppStoreIdstring"544007664"
iosAppArgumentsstring"https://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g"
ogTypestring"yt-fb-app:channel"
urlApplinksWebstring"https://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g?feature=appli…"
urlApplinksIosstring"vnd.youtube://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g?feature…"
urlApplinksAndroidstring"vnd.youtube://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g?feature…"
urlTwitterIosstring"vnd.youtube://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g?feature…"
urlTwitterAndroidstring"vnd.youtube://www.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g?feature…"
twitterCardTypestring"summary"
twitterSiteHandlestring"@YouTube"
schemaDotOrgTypestring"http://schema.org/http://schema.org/YoutubeChannelV2"
noindexbooleanfalse
unlistedbooleanfalse
familySafebooleantrue
tagsarray5 items · schema from #0 5 items
0string"c"
1string"i"
2string"t"
3string"i"
4string"z"
5string"e"
6string"n"
7string" "
8string"t"
9string"v"
availableCountriesarray249 items · schema from #0 249 items
0string"E"
1string"G"
linkAlternatesarray3 items · schema from #0 3 items
hrefUrlstring"https://m.youtube.com/channel/UChBQgieUidXV1CmDxSdRm3g"
streamsarray1 item · schema from #0 1 item
richItemRendererobject2 fields
contentobject1 field
videoRendererobject12 fields
videoIdstring"VWdigjB_Ktc"
thumbnailobject1 field
thumbnailsarray4 items · schema from #0 4 items
urlstring"https://i.ytimg.com/vi/VWdigjB_Ktc/hqdefault.jpg?v=671ac300&sqp=-oaymw…"
widthnumber168
heightnumber94
titleobject2 fields
runsarray1 item · schema from #0 1 item
textstring"Citizen TV Live"
accessibilityobject1 field
accessibilityDataobject1 field
labelstring"Citizen TV Live by Citizen TV Kenya 2,983,206 views"
descriptionSnippetobject1 field
runsarray1 item · schema from #0 1 item
textstring"#CitizenTV #citizendigital"
viewCountTextobject1 field
runsarray2 items · schema from #0 2 items
textstring"4,673"
navigationEndpointobject3 fields
clickTrackingParamsstring"CNUBENwwIhMI2OGClI6xiQMVdUlMCB22DRIeWhhVQ2hCUWdpZVVpZFhWMUNtRHhTZFJtM2…"
commandMetadataobject1 field
webCommandMetadataobject3 fields
urlstring"/watch?v=VWdigjB_Ktc"
webPageTypestring"WEB_PAGE_TYPE_WATCH"
rootVenumber3832
watchEndpointobject2 fields
videoIdstring"VWdigjB_Ktc"
watchEndpointSupportedOnesieConfigobject1 field
html5PlaybackOnesieConfigobject1 field
commonConfigobject1 field
urlstring"https://rr3---sn-a5m7lnl6.googlevideo.com/initplayback?source=youtube&…"
ownerBadgesarray1 item · schema from #0 1 item
metadataBadgeRendererobject5 fields
iconobject1 field
iconTypestring"CHECK_CIRCLE_THICK"
stylestring"BADGE_STYLE_TYPE_VERIFIED"
tooltipstring"Verified"
trackingParamsstring"CNUBENwwIhMI2OGClI6xiQMVdUlMCB22DRIe"
accessibilityDataobject1 field
labelstring"Verified"
trackingParamsstring"CNUBENwwIhMI2OGClI6xiQMVdUlMCB22DRIeQNfV_IOj0NizVQ=="
showActionMenubooleanfalse
shortViewCountTextobject1 field
runsarray2 items · schema from #0 2 items
textstring"4.6K"
menuobject1 field
menuRendererobject3 fields
itemsarray2 items · schema from #0 2 items
menuServiceItemRendererobject4 fields
textobject1 field
runsarray1 item · schema from #0 1 item
textstring"Add to queue"
iconobject1 field
iconTypestring"ADD_TO_QUEUE_TAIL"
serviceEndpointobject3 fields
clickTrackingParamsstring"CNkBEP6YBBgHIhMI2OGClI6xiQMVdUlMCB22DRIe"
commandMetadataobject1 field
webCommandMetadataobject1 field
sendPostbooleantrue
signalServiceEndpointobject2 fields
signalstring"CLIENT_SIGNAL"
actionsarray1 item · schema from #0 1 item
clickTrackingParamsstring"CNkBEP6YBBgHIhMI2OGClI6xiQMVdUlMCB22DRIe"
addToPlaylistCommandobject5 fields
openMiniplayerbooleantrue
videoIdstring"VWdigjB_Ktc"
listTypestring"PLAYLIST_EDIT_LIST_TYPE_QUEUE"
onCreateListCommandobject3 fields
clickTrackingParamsstring"CNkBEP6YBBgHIhMI2OGClI6xiQMVdUlMCB22DRIe"
commandMetadataobject1 field
webCommandMetadataobject2 fields
sendPostbooleantrue
apiUrlstring"/youtubei/v1/playlist/create"
createPlaylistServiceEndpointobject2 fields
videoIdsarray1 item · schema from #0 1 item
0string"V"
1string"W"
2string"d"
3string"i"
4string"g"
5string"j"
6string"B"
7string"_"
8string"K"
9string"t"
10string"c"
paramsstring"CAQ%3D"
videoIdsarray1 item · schema from #0 1 item
0string"V"
1string"W"
2string"d"
3string"i"
4string"g"
5string"j"
6string"B"
7string"_"
8string"K"
9string"t"
10string"c"
trackingParamsstring"CNkBEP6YBBgHIhMI2OGClI6xiQMVdUlMCB22DRIe"
trackingParamsstring"CNUBENwwIhMI2OGClI6xiQMVdUlMCB22DRIe"
accessibilityobject1 field
accessibilityDataobject1 field
labelstring"Action menu"
thumbnailOverlaysarray4 items · schema from #0 4 items
thumbnailOverlayTimeStatusRendererobject3 fields
textobject2 fields
runsarray1 item · schema from #0 1 item
textstring"LIVE"
accessibilityobject1 field
accessibilityDataobject1 field
labelstring"LIVE"
stylestring"LIVE"
iconobject1 field
iconTypestring"LIVE"
trackingParamsstring"CNQBEJmNBRgAIhMI2OGClI6xiQMVdUlMCB22DRIe"

Response Codes

Status codes this endpoint can return, so you can handle errors before they surprise you in production.

200SuccessSuccessful Response
422Client ErrorValidation Error
491Client ErrorToken not found
492Client ErrorEmail not verified
493Client ErrorSubscription expired
495Client ErrorAll daily units used
500Server ErrorSomething went wrong

API Pricing

#returned_streams / 10 units Cost per successful call to this endpoint.
Example Cases
1
Depth 1 Result: 30 streams
3 units
2
Depth 5 but channel only has 20 streams Result: 20 streams
2 units
3
Depth 10 Result: 300 streams
30 units

Fetch Youtube Data at Scale

Crawl YouTube live stream data at scale to identify which topics and formats drive the most engagement with live audiences.

deco-icon

Live Viewers

Get concurrent viewer counts for any YouTube live stream.

deco-icon

Chat Volume

Measure audience engagement through live chat activity data.

deco-icon

Stream History

Access data on past streams, not only ones currently live.