Support needed? Reach out! 📧

How to Scrape Youtube Hashtag Search Results

This tutorial shows how to use Youtube Hashtag Search Results API to scrape and crawl structured Youtube data in real-time.
Search YouTube by hashtag through our API and collect associated videos, view totals, and engagement signals to evaluate hashtag reach and inform campaign decisions.

Access Youtube Data in 3 Steps

Start crawling Youtube hashtag search 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 hashtag search data via our REST API!

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

Parameters

name (string) The hashtag to base the search on. 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
only_shorts (boolean) If true, only fetches shorts.
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 Hashtag Search
dataobject2 fields
infoobject2 fields
pageTitlestring"#magic"
contentobject1 field
pageHeaderViewModelobject3 fields
titleobject1 field
dynamicTextViewModelobject2 fields
textobject1 field
contentstring"#magic"
rendererContextobject2 fields
loggingContextobject1 field
loggingDirectivesobject3 fields
trackingParamsstring"CA8Qj-QKIhMI9MjVjbXYhQMVcBDWAB2z3QTj"
visibilityobject1 field
typesstring"12"
clientVeSpecobject2 fields
uiTypenumber176655
veCounternumber1073355674
accessibilityContextobject1 field
labelstring"#magic"
metadataobject1 field
contentMetadataViewModelobject2 fields
metadataRowsarray1 item · schema from #0 1 item
metadataPartsarray1 item · schema from #0 1 item
textobject1 field
contentstring"2.2M videos • 573K channels"
rendererContextobject1 field
loggingContextobject1 field
loggingDirectivesobject3 fields
trackingParamsstring"CA4Q9eQKIhMI9MjVjbXYhQMVcBDWAB2z3QTj"
visibilityobject1 field
typesstring"12"
clientVeSpecobject2 fields
uiTypenumber176757
veCounternumber1073355672
rendererContextobject1 field
loggingContextobject1 field
loggingDirectivesobject3 fields
trackingParamsstring"CA0Qot8KIhMI9MjVjbXYhQMVcBDWAB2z3QTj"
visibilityobject1 field
typesstring"12"
clientVeSpecobject2 fields
uiTypenumber176034
veCounternumber1073355670
videosarray1 item · schema from #0 1 item
richItemRendererobject2 fields
contentobject1 field
reelItemRendererobject10 fields
videoIdstring"xJ7oVv2vo9U"
headlineobject1 field
simpleTextstring"Nico reveals magic! #dog #smartnico #nico #funny #magic"
thumbnailobject2 fields
thumbnailsarray1 item · schema from #0 1 item
urlstring"https://i.ytimg.com/vi/xJ7oVv2vo9U/oardefault.jpg?sqp=-oaymwEdCJUDENAF…"
widthnumber405
heightnumber720
isOriginalAspectRatiobooleantrue
viewCountTextobject2 fields
accessibilityobject1 field
accessibilityDataobject1 field
labelstring"5.4 million views"
simpleTextstring"5.4M views"
navigationEndpointobject3 fields
clickTrackingParamsstring"CHwQh_YEGAAiEwj0yNWNtdiFAxVwENYAHbPdBONaCUZFaGFzaHRhZ5oBBQg-EIRn"
commandMetadataobject1 field
webCommandMetadataobject3 fields
urlstring"/shorts/xJ7oVv2vo9U"
webPageTypestring"WEB_PAGE_TYPE_SHORTS"
rootVenumber37414
reelWatchEndpointobject9 fields
videoIdstring"xJ7oVv2vo9U"
playerParamsstring"8AEBoAMDyAM-uAQN0gQHGgVtYWdpY6IGFQHV2fo7QOL6bJzEppycRBL7krufdQ%3D%3D"
thumbnailobject2 fields
thumbnailsarray1 item · schema from #0 1 item
urlstring"https://i.ytimg.com/vi/xJ7oVv2vo9U/frame0.jpg"
widthnumber1080
heightnumber1920
isOriginalAspectRatiobooleantrue
overlayobject1 field
reelPlayerOverlayRendererobject3 fields
stylestring"REEL_PLAYER_OVERLAY_STYLE_SHORTS"
trackingParamsstring"CH0QsLUEIhMI9MjVjbXYhQMVcBDWAB2z3QTj"
reelPlayerNavigationModelstring"REEL_PLAYER_NAVIGATION_MODEL_UNSPECIFIED"
paramsstring"CA0qAggCMAI%3D"
sequenceProviderstring"REEL_WATCH_SEQUENCE_PROVIDER_RPC"
sequenceParamsstring"GlogAUJWCAAQBRouwgYrCgVtYWdpYxIiSFQ5UkY2YWZBNDNGdEJaZmNJVnYtUkM1QjA4cW…"
loggingContextobject2 fields
vssLoggingContextobject1 field
serializedContextDatastring"CgIIDA%3D%3D"
qoeLoggingContextobject1 field
serializedContextDatastring"CgIIDA%3D%3D"
ustreamerConfigstring"CAwSGG1MdndaZU9qYzlpR3pxNnFMMkxGS1Q0PQ=="
trackingParamsstring"CHwQh_YEGAAiEwj0yNWNtdiFAxVwENYAHbPdBONA1ce-7e-Kus_EAQ=="
accessibilityobject1 field
accessibilityDataobject1 field
labelstring"Nico reveals magic! #dog #smartnico #nico #funny #magic - play Short"
stylestring"REEL_ITEM_STYLE_SHORTS_SLIM"
videoTypestring"REEL_VIDEO_TYPE_VIDEO"
loggingDirectivesobject3 fields
trackingParamsstring"CHwQh_YEGAAiEwj0yNWNtdiFAxVwENYAHbPdBOM="
visibilityobject1 field
typesstring"12"
enableDisplayloggerExperimentbooleantrue
trackingParamsstring"CHsQmY0FGAAiEwj0yNWNtdiFAxVwENYAHbPdBOM="

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_videos / 20 units Cost per successful call to this endpoint.

Fetch Youtube Data at Scale

Crawl YouTube hashtag data at scale including associated videos, view counts, and engagement and turn it into actionable campaign insights.

deco-icon

Hashtag Videos

Get every public video associated with a YouTube hashtag.

deco-icon

Reach Metrics

See aggregate view and engagement data to measure hashtag reach.

deco-icon

Campaign Data

Track branded hashtag campaigns with real engagement numbers.