# YouTube Live Chat Scraper - Messages & Super Chats (`seemuapps/youtube-live-chat-scraper`) Actor

Extract the full chat from any YouTube livestream or premiere - every message with its author, timestamp, membership badge and Super Chat amount.

- **URL**: https://apify.com/seemuapps/youtube-live-chat-scraper.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 chat messages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## YouTube Live Chat Scraper - Messages & Super Chats

Pull the complete chat out of any YouTube livestream, premiere or archived stream replay. Every message comes back with its author, the exact moment in the stream it was posted, membership badges, and — for Super Chats, Super Stickers and memberships — the amount paid and its currency.

No login, no extension, no watching a four-hour VOD to find what people said.

### What you get

One row per chat message:

- **message** — the text, with custom emoji as their `:shortcut:` form
- **messageType** — `text`, `super_chat`, `super_sticker`, `membership` or `membership_gift`
- **amountText**, **amountValue**, **amountCurrency** — `"CA$69.99"` → `69.99` + `CAD`, parsed across every currency YouTube supports
- **offsetSeconds** and **offsetTimestamp** — where in the stream the message appeared (`1:24:07`)
- **publishedAt** — the real clock time the message was sent
- **authorName**, **authorChannelId**, **authorChannelUrl**, **authorPhotoUrl**
- **isOwner**, **isModerator**, **isVerified**, **isMember**, **memberBadge** (`"Member (2 years)"`)
- **giftCount** for gifted-membership announcements

Plus a `CHAT_SUMMARY` record in the key-value store with, per video: message counts by type, unique chatters, **Super Chat totals per currency**, the top 10 chatters and the chat time range.

### Use cases

- **Super Chat revenue analysis** — total what a stream earned, per currency, and see who paid
- **Audience research** — the questions, reactions and requests your viewers actually typed
- **Community management** — export a full chat log for moderation review or record-keeping
- **Highlight finding** — chat spikes mark the moments worth clipping
- **Creator and sponsor due diligence** — measure real engagement on a streamer's audience
- **Esports and event archives** — keep the chat alongside the broadcast

### How to use

1. Paste one or more **Livestream URLs** — a live stream, a premiere, or the replay of a finished stream.
2. Set **Max messages per video** (0 reads the whole chat).
3. Optionally set **Message types** to `Paid only` to pull nothing but Super Chats, stickers and memberships — the cheapest way to get a stream's revenue picture.
4. Run the actor. Messages land in the **Dataset** tab, totals in the **Key-value store** tab under `CHAT_SUMMARY`.

#### Streams that are live right now

If the stream is still running, the actor listens for new messages for the length of the **Live collection window** (60 seconds by default, up to an hour) and then finishes.

### Output format

```json
{
  "videoId": "VIDEO_ID",
  "videoTitle": "Graduation 3D Mini Live",
  "channelTitle": "Example Channel",
  "isReplay": true,
  "messageType": "super_chat",
  "offsetSeconds": 184,
  "offsetTimestamp": "3:04",
  "publishedAt": "2026-09-18T20:38:59.500Z",
  "authorName": "@example_viewer",
  "authorChannelId": "UC...",
  "isMember": true,
  "memberBadge": "Member (2 years)",
  "message": "Thank you for everything!",
  "amountText": "$20.00",
  "amountValue": 20,
  "amountCurrency": "USD"
}
```

### Notes

- Chat replay must be enabled on the video. Some creators and most news broadcasters turn it off; those rows come back with an explanation in `CHAT_SUMMARY` instead of messages.
- YouTube serves chat replay in order from the start of the stream, so **Start offset** filters what is returned rather than skipping ahead — the earlier chat is still read, just not written to the dataset.
- Dense streams produce a lot of rows: a busy two-hour stream can carry tens of thousands of messages. Use **Max messages per video** or the **End offset** to keep runs bounded.

# Actor input Schema

## `videoUrls` (type: `array`):

URLs or IDs of YouTube livestreams, premieres or their archived replays. Up to 20 per run.

## `maxMessagesPerVideo` (type: `integer`):

Stop after this many chat messages per video. Set 0 to read the whole chat.

## `messageTypes` (type: `string`):

Which chat items to keep. Paid only is the cheapest way to pull a stream's Super Chat revenue.

## `startOffsetSecs` (type: `integer`):

For replays: only keep chat from this point in the video onwards. 0 starts at the beginning. YouTube serves chat replay in order, so earlier chat is still read - it is simply not returned.

## `endOffsetSecs` (type: `integer`):

For replays: stop at this point in the video. 0 reads to the end of the stream.

## `liveCollectSecs` (type: `integer`):

For streams that are live right now: how long to keep listening for new messages before finishing the run.

## `proxyConfiguration` (type: `object`):

Optional proxy. Not normally needed - leave it off unless you are running a very large batch.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=Z1sqWFs86uU"
  ],
  "maxMessagesPerVideo": 5000,
  "messageTypes": "all",
  "startOffsetSecs": 0,
  "endOffsetSecs": 0,
  "liveCollectSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One record per message: videoId, videoTitle, channelTitle, isReplay, messageId, messageType, offsetSeconds, offsetTimestamp, publishedAt, authorName, authorChannelId, authorChannelUrl, authorPhotoUrl, isOwner, isModerator, isVerified, isMember, memberBadge, message, amountText, amountValue, amountCurrency, giftCount.

## `summary` (type: `string`):

CHAT\_SUMMARY record in the key-value store: message counts by type, unique chatters, Super Chat totals per currency, top 10 chatters and the chat time range for each video.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=Z1sqWFs86uU"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/youtube-live-chat-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 = { "videoUrls": ["https://www.youtube.com/watch?v=Z1sqWFs86uU"] }

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/youtube-live-chat-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=Z1sqWFs86uU"
  ]
}' |
apify call seemuapps/youtube-live-chat-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seemuapps/youtube-live-chat-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/j3IdggzKmRghS9HMP/builds/PwHY8zGnnVrJsmZo8/openapi.json
