Scrape Twitch with a JSON API. This repo has working Python examples for DataGuru's Twitch scraper APIs: Twitch Channel Profile, Twitch Game Category and Twitch Live Stream.
DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0012 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.
| API | What it returns | Price | Page |
|---|---|---|---|
| Twitch Channel Profile | Scrape Twitch streamer channel info, follower count, bio, social links, and broadcaster status. | $0.0022 | https://dataguru.cc/apis/twitch-profile/ |
| Twitch Game Category | Scrape active streams, viewers, and channels for a Twitch game or category. | $0.0012 | https://dataguru.cc/apis/twitch-category/ |
| Twitch Live Stream | Scrape live stream status, stream title, game/category, viewer count, and uptime on Twitch. | $0.0022 | https://dataguru.cc/apis/twitch-stream/ |
- Create a free account and an API key at dashboard.dataguru.cc.
- Install and run:
git clone https://github.com/dataguru-cc/twitch-scraper-api.git
cd twitch-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py twitch-profileEvery example covers all 3 Twitch APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.
| File | Style | Run |
|---|---|---|
examples/sdk_example.py |
DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ |
python examples/sdk_example.py |
examples/requests_example.py |
Plain requests, synchronous |
python examples/requests_example.py |
examples/async_example.py |
asyncio + httpx, concurrent with a limit |
python examples/async_example.py |
examples/scrapy_spider.py |
Scrapy spider, items to JSON/CSV | scrapy runspider examples/scrapy_spider.py -O twitch.json |
All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.
Scrape Twitch streamer channel info, follower count, bio, social links, and broadcaster status.
- Endpoint:
POST https://api.dataguru.cc/api/v1/twitch/profile - Price: $0.0022 per successful request ($2.20 per 1,000)
- Rate limit: 60 requests/minute
- Page and live playground: https://dataguru.cc/apis/twitch-profile/
- Documentation: https://dataguru.cc/documentation/twitch-profile/
| Parameter | Type | Required | Description |
|---|---|---|---|
username |
string | yes | Twitch channel username or URL, e.g. ninja |
Response fields: id, username, name, profile_url, profile_photo, banner, bio, followers, following, is_partner, is_affiliate, is_live, stream, last_broadcast, last_broadcast_url, color_hex, counts, external_links, social_links, panels, videos, clips, plus _metadata
curl -X POST "https://api.dataguru.cc/api/v1/twitch/profile" \
-H "Authorization: Api-Key $DATAGURU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "ninja"}'Response schema
Values are type placeholders from the API's published schema, not real data.
{
"id": "1234567890",
"username": "string",
"name": "string",
"profile_url": "https://example.com/...",
"profile_photo": "https://example.com/...",
"banner": "https://example.com/...",
"bio": "string",
"followers": 0,
"following": 0,
"is_partner": false,
"is_affiliate": false,
"is_live": false,
"stream": {
"id": "1234567890",
"title": "string",
"viewers": 0,
"started_at": "2026-01-01T12:00:00Z",
"game": "string"
},
"last_broadcast": {
"id": "1234567890",
"title": "string",
"game": "string",
"started_at": "2026-01-01T12:00:00Z",
"url": "https://example.com/...",
"is_mature": false
},
"last_broadcast_url": "https://example.com/...",
"color_hex": "string",
"counts": {
"followers": 0,
"following": 0,
"videos_posted": 0,
"clips_posted": 0
},
"external_links": [
"string"
],
"social_links": [
{
"platform": "string",
"title": "string",
"url": "https://example.com/..."
}
],
"panels": [
{
"id": "1234567890",
"title": "string",
"description": "string",
"link_url": "https://example.com/...",
"image_url": "https://example.com/..."
}
],
"videos": [
{
"id": "1234567890",
"title": "string",
"url": "https://example.com/...",
"views": 0,
"duration": 0,
"published_at": "2026-01-01T12:00:00Z",
"thumbnail": "string"
}
],
"clips": [
{
"id": "1234567890",
"title": "string",
"url": "https://example.com/...",
"views": 0,
"duration": 0.0,
"created_at": "2026-01-01T12:00:00Z",
"game": "string",
"thumbnail": "string"
}
],
"_metadata": {
"request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
"execution_time_ms": 842,
"endpoint": "Twitch Channel Profile",
"mode": "live",
"format": "json",
"timestamp": "2026-01-01T12:00:00+00:00"
}
}Scrape active streams, viewers, and channels for a Twitch game or category.
- Endpoint:
POST https://api.dataguru.cc/api/v1/twitch/category - Price: $0.0012 per successful request ($1.20 per 1,000)
- Rate limit: 60 requests/minute
- Page and live playground: https://dataguru.cc/apis/twitch-category/
- Documentation: https://dataguru.cc/documentation/twitch-category/
| Parameter | Type | Required | Description |
|---|---|---|---|
category_slug |
string | yes | Game or category name/slug, e.g. counter-strike, just-chatting |
Response fields: category, scraped_at, live_streams_count, total_viewers, streams, plus _metadata
curl -X POST "https://api.dataguru.cc/api/v1/twitch/category" \
-H "Authorization: Api-Key $DATAGURU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"category_slug": "counter-strike"}'Response schema
Values are type placeholders from the API's published schema, not real data.
{
"category": {
"id": "1234567890",
"name": "string",
"slug": "string",
"url": "https://example.com/...",
"box_art": "https://example.com/...",
"description": "string"
},
"scraped_at": "2026-01-01T12:00:00Z",
"live_streams_count": 0,
"total_viewers": 0,
"streams": [
{
"rank": 0,
"stream_id": "1234567890",
"title": "string",
"username": "string",
"broadcaster_name": "string",
"viewers": 0,
"started_at": "2026-01-01T12:00:00Z",
"language": "string",
"tags": [
"string"
],
"stream_url": "https://example.com/...",
"thumbnail": "https://example.com/...",
"profile_photo": "https://example.com/..."
}
],
"_metadata": {
"request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
"execution_time_ms": 842,
"endpoint": "Twitch Game Category",
"mode": "live",
"format": "json",
"timestamp": "2026-01-01T12:00:00+00:00"
}
}Scrape live stream status, stream title, game/category, viewer count, and uptime on Twitch.
- Endpoint:
POST https://api.dataguru.cc/api/v1/twitch/stream - Price: $0.0022 per successful request ($2.20 per 1,000)
- Rate limit: 60 requests/minute
- Page and live playground: https://dataguru.cc/apis/twitch-stream/
- Documentation: https://dataguru.cc/documentation/twitch-stream/
| Parameter | Type | Required | Description |
|---|---|---|---|
username |
string | no | Twitch username or omit to browse top active streams |
Response fields: is_live, username, name, message, stream, last_broadcast, broadcaster, plus _metadata
curl -X POST "https://api.dataguru.cc/api/v1/twitch/stream" \
-H "Authorization: Api-Key $DATAGURU_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response schema
Values are type placeholders from the API's published schema, not real data.
{
"is_live": false,
"username": "string",
"name": "string",
"message": "string",
"stream": {
"id": "1234567890",
"title": "string",
"game": "string",
"viewers": 0,
"started_at": "2026-01-01T12:00:00Z",
"language": "string",
"tags": [
"string"
],
"stream_url": "https://example.com/...",
"embed_url": "https://example.com/...",
"thumbnail": "https://example.com/..."
},
"last_broadcast": {
"id": "1234567890",
"title": "string",
"game": "string",
"started_at": "2026-01-01T12:00:00Z",
"url": "https://example.com/..."
},
"broadcaster": {
"id": "1234567890",
"username": "string",
"name": "string",
"profile_url": "https://example.com/...",
"profile_photo": "https://example.com/...",
"banner": "https://example.com/...",
"bio": "string",
"followers": 0,
"is_partner": false,
"is_affiliate": false
},
"_metadata": {
"request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
"execution_time_ms": 842,
"endpoint": "Twitch Live Stream",
"mode": "live",
"format": "json",
"timestamp": "2026-01-01T12:00:00+00:00"
}
}- Python SDK and examples for all DataGuru APIs: github.com/dataguru-cc/dataguru-python (docs)
- Every API, with a live playground: https://dataguru.cc/apis/
- Use DataGuru from Claude, ChatGPT or Cursor through the MCP server: https://dataguru.cc/mcp/
- Run thousands of inputs from a CSV at half price with batch jobs: https://dataguru.cc/documentation/
- Other scraper APIs: 1688, Airbnb, Alibaba, AliExpress, Amazon, arXiv, ASOS, Best Buy, Booking.com, Brave Search, CA State Bar, Capterra, CoinGecko, CoinMarketCap, Companies House, Costco, CourtListener, Crunchbase, Discord, DoorDash, eBay, Etsy, Expedia, Fiverr, Flipkart, Glassdoor, Google Flights, Google Patents, Google Scholar, Google Search, Grubhub, Home Depot, Instagram, Investing.com, Justia, Kayak, Kick, Lazada, MarketWatch, Mercado Libre, Monster, OpenCorporates, OpenTable, PACER, PitchBook, PubMed, Reddit, Redfin, Resy, Rightmove, SEC EDGAR, Seeking Alpha, Shopee, Skyscanner, Target, TikTok, TradingView, TripAdvisor, Trulia, TrustRadius, Uber Eats, Upwork, Vrbo, Walmart, Wayfair, X (Twitter), Yahoo Finance, YouTube, Zillow, ZoomInfo, Zoopla
The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.