Support needed? Reach out! 📧

How to Scrape Twitch Keyword Search Streams

This tutorial shows how to use Twitch Keyword Search Streams API to scrape and crawl structured Twitch data in real-time.
Search live and recent Twitch content by keyword through our API and retrieve matching streams, channel data, viewer counts, and category tags for gaming trend research and streamer discovery.

Access Twitch Data in 3 Steps

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

javascript-logo JavaScript
Twitch Keyword Search
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/twitch/search'
3 const params = {
4   "keyword""magic",
5   "depth"1,
6   "type""videos",
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

keyword (string) Keyword to be searched. 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
type Type of results to show. 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
Twitch Keyword Search
dataarray1 item · schema from #0 1 item
trackingIDstring"d3931a1a-16c1-4589-9ff5-1979a987165c"
itemobject11 fields
createdAtstring"2025-11-08T19:01:37Z"
ownerobject5 fields
idstring"26991613"
displayNamestring"Magic"
loginstring"magic"
rolesobject2 fields
isPartnerbooleantrue
__typenamestring"UserRoles"
__typenamestring"User"
idstring"2613189376"
gameobject5 fields
idstring"2748"
slugstring"magic-the-gathering"
namestring"Magic: The Gathering"
displayNamestring"Magic: The Gathering"
__typenamestring"Game"
lengthSecondsnumber35317
previewThumbnailURLstring"https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/820bb5fb0112276824…"
templatePreviewThumbnailURLstring"https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/820bb5fb0112276824…"
titlestring"MAGIC EXTRA LIFE 2025 GAME DAY STREAM"
viewCountnumber14337
previewThumbnailPropertiesobject2 fields
blurReasonstring"BLUR_NOT_REQUIRED"
__typenamestring"PreviewThumbnailProperties"
__typenamestring"Video"
__typenamestring"SearchForEdge"

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

depth units Cost per successful call to this endpoint.

Fetch Twitch Data at Scale

Scrape Twitch search results at scale to identify trending streams, popular games, and active gaming communities for any topic or genre.

deco-icon

Live Streams

Get matching live and recent Twitch streams for any keyword.

deco-icon

Viewer Counts

See current viewer counts to gauge a stream's popularity.

deco-icon

Category Tags

Discover which game categories are active for a search term.