# YouTube Live Chat Replay Scraper - Ended Streams (`logiover/youtube-live-chat-replay-scraper`) Actor

Export the full chat replay of ended YouTube livestreams & premieres: messages, Super Chats, memberships. No API key. The official API cannot do this.

- **URL**: https://apify.com/logiover/youtube-live-chat-replay-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Videos, Social media
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## YouTube Live Chat Replay Scraper — Ended Streams & Premieres (No API Key)

Export the **complete chat replay** of any **ended YouTube livestream or premiere** — every message, **Super Chat** (with the dollar amount), Super Sticker, and membership event — as clean structured data. **No API key, no login.**

**Why this is special:** the official YouTube Data API *structurally cannot* do this. Its `liveChatMessages` endpoint only returns chat **while a stream is live** — the moment a broadcast ends, that data is gone from the API. The chat survives only in the watch page's "replay" panel. This actor reads that replay directly, so you can mine the chat of streams that ended months or years ago.

### What you get per chat item

```json
{
  "videoId": "_USAoRuPdl4",
  "messageId": "CjkKGkN...",
  "type": "superchat",
  "authorName": "SomeFan",
  "authorChannelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
  "authorBadges": ["Member (2 years)"],
  "message": "LET'S GO!!! 🎉",
  "superChatAmount": "$20.00",
  "timestampText": "1:32:07",
  "timestampUsec": "1699999999000000",
  "videoOffsetTimeMsec": "5527000",
  "source": "youtube-live-chat-replay"
}
````

`type` is one of `message`, `superchat`, `supersticker`, `membership`. `videoOffsetTimeMsec` tells you exactly when in the video the message appeared.

### Example input

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=_USAoRuPdl4"],
  "includeSuperChats": true,
  "includeMemberships": true,
  "maxMessagesPerVideo": 0
}
```

### Use cases

- **Creator & sponsor analytics** — total Super Chat revenue, top supporters, engagement over a stream's timeline.
- **Community & sentiment research** — mine tens of thousands of real chat messages per stream.
- **Esports & events** — capture the crowd reaction synced to video time offsets.
- **AI / dataset building** — real conversational chat data with paid‑message and membership signals.
- **Moderation & brand safety** — audit what was said in a past broadcast's chat.

### Notes & limits

- Videos must be **ended livestreams or premieres with chat replay enabled**. Normal uploads, currently‑live videos, and streams whose chat was disabled have no replay (the actor reports this per video).
- Big streams can contain **tens of thousands** of messages; use `maxMessagesPerVideo` to cap, or `0` for everything.
- The creator can delete the chat replay, after which it's unavailable to anyone.

### FAQ

**Do I need the YouTube API or a key?** No. It reads YouTube's public internal endpoint.

**Can it get chat from a stream that ended long ago?** Yes — as long as the replay still exists on the watch page.

**Does it include Super Chat amounts?** Yes, with the displayed currency amount, plus Super Stickers and memberships.

**Live (ongoing) streams?** This actor targets **replay** (ended) chat. Point it at a stream after it ends.

***

*Not affiliated with YouTube or Google. "YouTube" is a trademark of Google LLC. This tool reads publicly available endpoints.*

# Actor input Schema

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

YouTube video URLs of ENDED livestreams or premieres that have chat replay. Example: \['https://www.youtube.com/watch?v=\_USAoRuPdl4']. Normal uploads and currently-live videos have no replay.

## `videoIds` (type: `array`):

Alternatively, 11-character YouTube video IDs. Example: \['\_USAoRuPdl4'].

## `includeNormalMessages` (type: `boolean`):

Include regular text chat messages.

## `includeSuperChats` (type: `boolean`):

Include paid Super Chats and Super Stickers (with the amount paid).

## `includeMemberships` (type: `boolean`):

Include channel membership / gift events.

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

Cap per video. 0 = the entire chat replay (can be tens of thousands for big streams).

## `maxItems` (type: `integer`):

Hard cap on total chat items across all videos. 0 = the entire chat replay (can be tens of thousands for big streams). Tip: a full replay of a huge livestream may need a higher run timeout — the actor always stops cleanly and returns what it has before the timeout.

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

Proxy settings. Apify Proxy is on by default. If you see blocks, try Residential.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=_USAoRuPdl4"
  ],
  "videoIds": [],
  "includeNormalMessages": true,
  "includeSuperChats": true,
  "includeMemberships": true,
  "maxMessagesPerVideo": 0,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All chat items extracted by this run. Open the Dataset tab to browse, filter, and export as CSV, JSON, or Excel.

# 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=_USAoRuPdl4"
    ],
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/youtube-live-chat-replay-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=_USAoRuPdl4"],
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/youtube-live-chat-replay-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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=_USAoRuPdl4"
  ],
  "maxItems": 1000
}' |
apify call logiover/youtube-live-chat-replay-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/youtube-live-chat-replay-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Live Chat Replay Scraper - Ended Streams",
        "description": "Export the full chat replay of ended YouTube livestreams & premieres: messages, Super Chats, memberships. No API key. The official API cannot do this.",
        "version": "0.1",
        "x-build-id": "NaDPqjr03NE0dfv9A"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~youtube-live-chat-replay-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-youtube-live-chat-replay-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~youtube-live-chat-replay-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-youtube-live-chat-replay-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~youtube-live-chat-replay-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-youtube-live-chat-replay-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "YouTube video URLs of ENDED livestreams or premieres that have chat replay. Example: ['https://www.youtube.com/watch?v=_USAoRuPdl4']. Normal uploads and currently-live videos have no replay.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoIds": {
                        "title": "Video IDs",
                        "type": "array",
                        "description": "Alternatively, 11-character YouTube video IDs. Example: ['_USAoRuPdl4'].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeNormalMessages": {
                        "title": "Include normal messages",
                        "type": "boolean",
                        "description": "Include regular text chat messages.",
                        "default": true
                    },
                    "includeSuperChats": {
                        "title": "Include Super Chats & Stickers",
                        "type": "boolean",
                        "description": "Include paid Super Chats and Super Stickers (with the amount paid).",
                        "default": true
                    },
                    "includeMemberships": {
                        "title": "Include memberships",
                        "type": "boolean",
                        "description": "Include channel membership / gift events.",
                        "default": true
                    },
                    "maxMessagesPerVideo": {
                        "title": "Max Messages Per Video",
                        "type": "integer",
                        "description": "Cap per video. 0 = the entire chat replay (can be tens of thousands for big streams).",
                        "default": 0
                    },
                    "maxItems": {
                        "title": "Max Items (total)",
                        "type": "integer",
                        "description": "Hard cap on total chat items across all videos. 0 = the entire chat replay (can be tens of thousands for big streams). Tip: a full replay of a huge livestream may need a higher run timeout — the actor always stops cleanly and returns what it has before the timeout.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy settings. Apify Proxy is on by default. If you see blocks, try Residential.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
