X broadcast viewer history scraper in n8n
Get a public X broadcast's title, state, start/end times, viewer counts over time, thumbnail, broadcaster profile, and an optional replay stream link, resolved from a broadcast link or ID.
What this workflow does
Import it and n8n runs the X Broadcast Viewer History & Replay Link Scraper Actor on Apify every day at 08:00 with the starter input below. Each row comes back with title, state, broadcaster.username, viewers now and 4 more; repeats with the same url are dropped. A Google Sheets append is included and stays off until you add your sheet. The only credential it needs is your Apify API token.
Read from the workflow file, built for X Broadcast Viewer History & Replay Link Scraper version 1.0.2. Updated 2026-11-14.How the rows travel
6 nodes, in the order n8n runs them. The yellow stop is the call to the Apify Actor; the dashed stop is optional.
- Daily trigger Schedule trigger
- Configure input Code
- Run Apify Actor HTTP Request
- Normalize + dedupe Code
- Rows ready No operation
- Google Sheets (optional) Google Sheets, off until you switch it on
Input
The Configure input node holds the starter input. Change it there; every setting the Actor accepts is listed below.
{
"broadcastIds": [
"https://x.com/i/broadcasts/1YGNrbPLejQGw"
],
"maxChatMessages": 100
} | Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| broadcastIds | array | Yes | – | Paste broadcast links such as https://x.com/i/broadcasts/1YGNrbPLejQGw, bare broadcast IDs, post links that announce a broadcast, or legacy Periscope links (/v/ or //). |
| includeViewerStats | boolean | No | true | Include current/total viewers, the viewer-history graph when X exposes it, and derived peak/average viewers. Turn off for a lighter output. |
| includeViewerTimeline | boolean | No | false | Push one "viewer timeline point" row per point of the broadcast's viewer-history graph. No rows are emitted when X provides no graph. |
| maxViewerTimelinePoints | integer | No | 0 | Maximum timeline rows per broadcast. 0 means all points. When capped, points are evenly sampled across the full broadcast and each row keeps its original index. |
| includeReplayVideo | boolean | No | false | Resolve the HLS playback URL and stream status. For a live broadcast the URL is the live stream; for an ended broadcast it is the replay. |
| includeChatHistory | boolean | No | false | Collect text messages from the broadcast's public chat replay after it ends. Live chat and private chats are not collected. |
| maxChatMessages | integer | No | 1000 | Maximum public chat text messages per broadcast. Older events and join/heart events are not counted. |
| includeThumbnail | boolean | No | true | Store the broadcast cover image in the run's key-value store and return its stable URL plus the original X image URL. |
| includeBroadcasterProfile | boolean | No | true | Add the broadcaster's public profile (followers, bio, location, account creation date, pinned posts). Falls back to the compact broadcaster record if the profile is unavailable. |
What each row holds
Every field the Actor returns stays in the row (8 in its dataset schema). Normalize + dedupe trims text, drops empty fields, removes repeats with the same url and adds _source and _scrapedAt. The main fields:
| Field | What it is |
|---|---|
| title | Title |
| state | State |
| broadcaster.username | Broadcaster.username |
| viewersNow | Viewers Now |
| viewersTotal | Viewers Total |
| startedAt | Started At |
| url | Url |
What the first run costs
Each run starts at $0.10 on the Free plan (1 GB of memory), then $0.99 per 1,000 results, plus platform usage.
The Actor lists $0.99 per 1,000 results; its catalogue page breaks the price down by Apify plan. The Apify Free plan includes $5 of usage a month.
The Actor behind it
X Broadcast Viewer History & Replay Link Scraper: Get a public X broadcast's title, state, start/end times, viewer counts over time, thumbnail, broadcaster profile, and an optional replay stream link, resolved from a broadcast link or ID.
The same job from an AI agent
The matching agent skill gives Claude Code, Codex, Cursor and other agents the same Actor, input and fields. Install it in one line:
npx skills add https://scraperfinder.com --skill x-broadcast-viewer-history-and-replay-link-scraper The x broadcast viewer history scraper skill, with manual install and run steps
Questions people ask
How do I import this workflow into n8n?
Copy https://scraperfinder.com/n8n/x-broadcast-viewer-history-and-replay-link-scraper.json. In n8n, open a new workflow, click the three-dot menu, choose Import from URL and paste it. Or download the JSON file and use Import from File; both give the same 6 nodes.
Do I need an Apify account?
Yes. The workflow calls the X Broadcast Viewer History & Replay Link Scraper Actor through the Apify API with your own token, and each run is billed to your Apify account. The Free plan includes $5 of usage a month.
What does a run cost?
Each run starts at $0.10 on the Free plan (1 GB of memory), then $0.99 per 1,000 results, plus platform usage. The Actor's Store page shows the current price.
Can I change what it collects?
Yes: edit the input object in the Configure input node. The Actor takes 9 settings; the table on this page lists each one with its default.
Does it work without Google Sheets?
Yes. The rows wait in the Rows ready node, so you can connect any other node there: a database, Airtable, a webhook or an email. The Google Sheets node is only one option.