# Twitch Live Streams Scraper - Stream Search & Viewer Data API (`captainhandsome/twitch-live-streams-scraper`) Actor

Find live Twitch streams and export channel, stream title, game category, viewer count, language, tags and stream URL. A live streams API for influencer discovery, audience research and category tracking, with JSON, CSV and Excel export.

- **URL**: https://apify.com/captainhandsome/twitch-live-streams-scraper.md
- **Developed by:** [Joseph McRell](https://apify.com/captainhandsome) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitch Live Streams Scraper

Discover live Twitch channels by category. Export twelve columns per live channel - channel URL, login and display name, stream title, category, tags, viewer count, verified badge, avatar, preview thumbnail and live status - without an API key. Results are returned as clean, typed dataset rows suitable for CSV, JSON, automation, and AI-agent workflows.

### What data can I extract?

Every record carries twelve columns. The dataset schema documents each one, with a real example value, before a run starts.

| Field | What it holds |
| --- | --- |
| `stream_title` | Stream title as the streamer wrote it, original capitalization |
| `channel_name` | Lowercase channel login used in the Twitch URL |
| `channel_display_name` | Public display name, capitalization and non-Latin characters preserved |
| `channel_url` | Canonical `twitch.tv/<channel>` URL |
| `stream_category` | Game or category the stream is listed under |
| `stream_tags` | Card tags, comma-separated (language, content and community tags) |
| `viewer_count` | Point-in-time viewer count label, for example `1.7k viewers` |
| `verified_badge` | `Verified` when Twitch shows the badge, otherwise empty |
| `profile_image_url` | Channel avatar image URL |
| `thumbnail_url` | Live preview thumbnail URL |
| `live_status` | Point-in-time live-state label |
| `stream_label` | Accessibility label combining title and channel |

`stream_category` is filled when you scrape a multi-category listing URL such as `twitch.tv/directory/all` through `start_urls`. On a single-category page the category is your input, so Twitch omits it from the card and the column is empty.

### Input example

```json
{
  "search_query": "just-chatting",
  "max_items": 10,
  "max_pages": 1
}
```

`max_items` is a hard output and billing ceiling. Source fields may be null when the upstream public record does not provide them.

### Output example

Each dataset item is one live channel, emitted as typed JSON properties and exportable as CSV, Excel, XML, or RSS.

```json
{
  "stream_label": "subtember! - fri- games - reacts - no order - lowtiergod",
  "channel_url": "https://www.twitch.tv/lowtiergod",
  "channel_name": "lowtiergod",
  "viewer_count": "1.7k viewers",
  "thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_lowtiergod-640x360.jpg",
  "live_status": "live",
  "stream_title": "SUBTEMBER! - FRI- GAMES - REACTS - NO ORDER",
  "channel_display_name": "LowTierGod",
  "verified_badge": "Verified",
  "stream_tags": "justchatting, drops, DropsEnabled",
  "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/f5a3e1e9-4acb-4b46-a807-9c27dfeb54f9-profile_image-50x50.jpeg",
  "stream_category": null
}
```

### Common use cases

- Lead, market, compliance, and competitive research
- Scheduled monitoring and change detection
- CSV/JSON enrichment pipelines
- AI-agent retrieval and workflow automation

### Pricing and cost control

Output is billed per result at **$0.003 per result** (about $3.00 per 1,000 results), plus a $0.001 Actor-start charge billed once per gigabyte of memory at run start. Use `max_items` to cap both output volume and charges. The price shown on the Apify Store listing is authoritative.

### Use with AI agents and MCP

Apify's MCP server can discover and call this Actor. Example intent:

> Find 50 currently live Twitch channels in the just-chatting category.

Use the JSON input above as the tool arguments, changing filters and `max_items` as needed. The strict input schema rejects unknown properties, and the typed dataset schema describes the returned tool data.

### Reliability

Runs use bounded retries, deduplication, hard result limits, and explicit failure handling. Browser-based sources are monitored by contract canaries and staged selector repair; official-API sources use deterministic contract canaries rather than DOM repair.

### Limitations and responsible use

- Publicly available source data only; coverage and field availability depend on the upstream source.
- A successful search can legitimately return no matching records.
- Point-in-time fields can change after collection.
- Use the data in accordance with applicable law and source terms.
- Do not use results for prohibited eligibility, discrimination, or sensitive-person profiling decisions.

### FAQ

#### What search phrases does this Actor support?

The input schema lists exact accepted fields and examples. Primary discovery terms: Twitch scraper, live stream search, Twitch channel discovery, stream viewer counts.

#### Can I control cost?

Yes. Set `max_items`; it is enforced as the maximum number of output records.

#### Can an AI agent call it?

Yes. Use Apify MCP `search-actors`, inspect this Actor's schema, then call it with the same JSON accepted in Console.

#### Does it require a Twitch account or API credentials?

No external API key or Twitch account is required. The Actor queries live channel listings directly.

### Changes

See [CHANGELOG.md](./CHANGELOG.md) for contract and maintenance updates.

# Changelog

This Actor's version history is a separate document: https://apify.com/captainhandsome/twitch-live-streams-scraper/changelog.md

# Actor input Schema

## `search_query` (type: `string`):

Twitch directory category slug, for example just-chatting, minecraft, or fortnite.

## `search_queries` (type: `array`):

Optional batch of category slugs; overrides search\_query.

## `start_urls` (type: `array`):

Optional public Twitch category URLs; these override category slugs.

## `max_items` (type: `integer`):

Hard result and billing ceiling.

## `max_pages` (type: `integer`):

Maximum category traversal rounds.

## Actor input object example

```json
{
  "search_query": "just-chatting",
  "max_items": 10,
  "max_pages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

Extracted records, one object per row on the source page.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("captainhandsome/twitch-live-streams-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("captainhandsome/twitch-live-streams-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call captainhandsome/twitch-live-streams-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,captainhandsome/twitch-live-streams-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qYefJPkup0kcXe54P/builds/082NIeYUbDUX4Wq6n/openapi.json
