Skip to main content
AI Studio  add-on for Spider.
twitch.tv · HTTP 200

Twitch Scraper

Spider read twitch.tv in 1.4 s without a browser and returned 118 lines of clean markdown, including sections like "Clips", "Getting a game’s clips" and "Getting a specific clip".

Get your free API key
Free balance on signup No card. Failed requests cost $0.
Response dev.twitch.tv/docs/api/clips.md markdown · 118 lines
# ClipsThe clips are returned in descending order of views. Because the request could return thousands of results to page through, you could use the *first* query parameter to get the top 10 clips with the most views. Or, to get clips captured within a specific date range, use the *started_at* and *ended_at* query parameters (see Getting clips captured within a specific date range).### Getting a game’s clipsTo get clips captured from a specific game, use the *game_id* query parameter. The following example shows how to get all clips captured from broadcasters that were playing Minecraft.`curl -X GET 'https://api.twitch.tv/helix/clips?game_id=27471' \To get a game’s ID, use the Search Categories API.### Getting a specific clipTo get specific clips, use the *id* query parameter. Include the *id* query parameter for each ID that you specify. You may specify a maximum of 100 IDs.`curl -X GET 'https://api.twitch.tv/helix/clips?id=SpillYummyPigeonPieHuhu&id=DillDiligentTireOneHand' \If you specify the *id* query parameter, the API ignores the pagination query parameters and date range parameters.### Getting clips captured within a specific date rangeBy default, Get Clips returns all clips that were captured for the specified game or broadcaster. If you’re only interested in clips for a specific date range like the last week or yesterday, use the *started_at* and *ended_at* query parameters. Dates are UTC.The following example shows how to get clips that were captured in the last week from the specified broadcaster’s streams.`curl -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=123456&started_at=2022-07-03T00:00:00Z&ended_at=2022-07-09T00:00:00Z' \The *ended_at* parameter is optional. If you don’t specify it, the date range is one week from the start date. The following example shows how the above request could have been written:`curl -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=123456&started_at=2022-07-03T00:00:00Z' \
Code · Fields · Cost · Run it keyless, no account

The same call, in code.

The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on twitch.tv.

twitch-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://www.twitch.tv/directory");

// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();

console.log(data);
await spider.close();
ready to run · spider-browser, no selectors

Ready for volume? Get an API key →

Fields you can pull.

Stream titleStreamerViewersGameTagsLanguageUptimeThumbnail

Spider names these from the page. The capture above came back as markdown; the same call with return_format: "json" returns them as keys.

What twitch.tv costs to scrape.

The capture above cost $0.000079 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.

  • Free balance on signup
  • No card required to test
  • Balance never expires
See the full pricing →

Run it keyless, no account

curl -X POST https://api.spider.cloud/scrape -H "Content-Type: application/json" -d '{"url": "https://dev.twitch.tv/docs/api/clips/", "return_format": "markdown"}'

More Media scrapers.

Start scraping twitch.tv.

You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.