惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security
WordPress大学
WordPress大学
博客园_首页
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
The Cloudflare Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tenable Blog
Google Online Security Blog
Google Online Security Blog
PCI Perspectives
PCI Perspectives
博客园 - 三生石上(FineUI控件)
Recent Commits to openclaw:main
Recent Commits to openclaw:main
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
Security Latest
Security Latest
小众软件
小众软件
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
量子位
P
Privacy & Cybersecurity Law Blog
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
C
Cyber Attacks, Cyber Crime and Cyber Security
Scott Helme
Scott Helme
Cisco Talos Blog
Cisco Talos Blog
S
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
U
Unit 42
腾讯CDC
博客园 - 聂微东
博客园 - 【当耐特】
B
Blog
P
Proofpoint News Feed
B
Blog RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Twitch Chat Scraper: export any VOD's full chat replay for $1.05/1K
Devil Scrapes · 2026-06-03 · via DEV Community

Quick answer: Twitch stores a complete timestamped chat replay for every public VOD but exposes no public API or bulk-export endpoint for it. To get the data programmatically you walk the same VideoCommentsByOffsetOrCursor GraphQL endpoint the web player uses. The Apify Actor below does that for $0.001 per message (~$1.05 per 1,000), with TLS fingerprinting, residential-proxy rotation, and pagination handled for you — no login required.

Twitch chat looks straightforward until you try to pull it at volume. The web player loads it fine; the Twitch Helix API does not expose VOD chat at all — that endpoint was never built. A handful of third-party Apify Actors covered the gap for years, but most are now deprecated and delisted. If you are training a moderation classifier, building a hype-peak esports dashboard, or doing post-broadcast review, and you need more than you can scroll through by hand, you are writing your own extractor. Here is what that involves, and how I turned it into one API call.

What is a Twitch VOD chat replay? 🎮

A Twitch VOD is the archived recording of a live broadcast. As long as the VOD exists, Twitch retains the full chat history — every message, its timestamp, the commenter's identity, chat color, badges, and structured emote data — and presents it in its own player as a replay synced to the timeline.

What it does not give you: a download button, a CSV export, or any documented REST endpoint. The data is public — anyone can watch it in the browser — but bulk extraction means working with an undocumented GraphQL interface that the Twitch Developer documentation does not cover.

Does Twitch have a chat replay API? 🔎

No. As of 2026, the Twitch Helix API does not expose VOD chat replay. The only programmatic surface is the internal VideoCommentsByOffsetOrCursor persisted GraphQL query the web player itself calls — and it requires a specific public Client-Id header, a non-obvious pagination scheme to dodge Twitch's integrity-check challenge, and aggressive single-IP rate limits past roughly 10,000 messages. Getting all of that right is the whole job.

What the data looks like 📤

Each chat message comes back as one flat, typed row. Here is a real one from a verified VOD scrape:

{
  "vod_id": "2773625679",
  "vod_title": "never played forza but i definitely have a drivers license so it should be easy",
  "channel_login": "shroud",
  "message_id": "1292e052-0561-4db5-86c7-adfc4556d628",
  "message_offset_seconds": 12,
  "posted_at": "2026-05-16T18:42:35.297Z",
  "commenter_id": "142680597",
  "commenter_login": "tabrexs",
  "commenter_display_name": "tabrexs",
  "message_text": "PewPewPew",
  "message_fragments": [
    {
      "type": "emote",
      "text": "PewPewPew",
      "emote_id": "emotesv2_587405136a8147148c77df74baaa1bf4"
    }
  ],
  "user_color": "#DAA520",
  "badges": [],
  "is_subscriber": false,
  "scraped_at": "2026-05-16T19:00:00Z"
}

Fifteen fields per row, the same shape every time, Pydantic-validated before it hits the dataset. Every emote is broken out into a structured fragment carrying its Twitch emote ID, so you can rebuild the CDN image URL without extra parsing.

The naive approach (and why it falls apart) ⚙️

The first pass most developers take:

  1. Open Chrome DevTools on a VOD page, find the VideoCommentsByOffsetOrCursor request in the Network tab
  2. Copy as curl, replay it with Python's requests
  3. Page through the cursor field in the response

It fails on step 2, then again differently on step 3.

TLS fingerprinting. Twitch's GraphQL endpoint inspects the TLS ClientHello of incoming requests. Python's requests, httpx, and everything else built on urllib3 produce a fingerprint no real browser sends — the server sees a bot and returns 403 before it reads the body. We impersonate a real browser's TLS and HTTP/2 handshake via curl-cffi, rotating across Chrome 131, Chrome 124, Firefox 147, and Safari 180 profiles so the handshake matches what those browsers send.

The cursor pagination integrity check. The GraphQL response carries both a per-edge cursor and pageInfo.hasNextPage. Paging forward on the cursor triggers Twitch's KPSDK browser-integrity challenge on the very next request — {"errors":[{"message":"failed integrity check"}]} — which needs a live browser to solve. We page by offset instead: pass the last message's contentOffsetSeconds + 1 as the next page's start. The integrity check does not fire on offset-based requests (live-verified 2026-05-16).

Rate limiting on sustained runs. Twitch rate-limits a single IP aggressively past roughly 10,000 messages. We thread Apify residential proxies with a fresh session_id on every retry so each block rotates to a new exit IP, and on 408 / 429 / 5xx we retry with exponential backoff — 2 seconds, doubling, capped at 30, up to 5 attempts per page. Partial successes surface with a clear status message; the Actor never silently returns a half-empty dataset.

None of it is glamorous. All of it is the gap between a notebook script that worked once and a feed that survives Twitch's quarterly infra changes.

The Actor 🔥

The result is packaged as an Apify Actor: Twitch VOD Chat Archive. Run it from the Apify Console by pasting a VOD URL, or call it programmatically:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("DevilScrapes/twitch-vod-chat-archive").call(
    run_input={
        "vodIds": ["2773625679"],
        "maxMessagesPerVod": 5000,
        "startOffsetSeconds": 0,
        "proxyConfiguration": {
            "useApifyProxy": True,
            "apifyProxyGroups": ["RESIDENTIAL"]
        }
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["message_text"], item["commenter_login"])

Target a VOD by ID or URL, or use channel mode — pass a channel login (e.g. "shroud") and the Actor fetches that channel's most recent archive VODs (maxRecentVods, 1–50). The maxMessagesPerVod cap (1–200,000) samples long broadcasts without the full run; startOffsetSeconds skips to a point in the timeline.

What you would actually use this for 💡

Five concrete patterns:

  • Moderation-classifier training. Pull chat from 50+ public VODs, label toxic vs benign, feed it into a fine-tuning run. A 6-hour mid-size broadcast produces 5,000–30,000 messages; fifty VODs is a training set in the hundreds of thousands.

  • Hype-peak detection for esports analytics. Join message_offset_seconds to the VOD timeline and compute message-velocity over 30-second windows. The spikes map onto game events — kills, objectives, clutch plays — with surprising precision. Commercial esports dashboards charge for exactly this; here you get the raw source.

  • Post-broadcast review. Streamers and mods export chat from their last 20 broadcasts and search it for usernames, coordinated raids, or emote spikes — without scrubbing the VOD player by hand.

  • Community sentiment analysis. Run a VOD corpus through a sentiment model and chart positivity over the timeline. Use the is_subscriber boolean to compare sub vs non-sub chat tone.

  • Academic research. Public Twitch chat is a rich corpus for media-studies work; the wall-clock timestamps, commenter IDs, badge context, and emote breakdowns load into R or pandas with no extra normalization.

Pricing — exact numbers 💰

Pay-per-event. You pay for messages that land in your dataset, nothing for ones that fail.

Event Rate What triggers it
actor-start $0.05 Once per run, at Actor boot
result-row $0.001 Per chat message pushed to the dataset
Pull Cost
100 messages $0.15
1,000 messages $1.05
10,000 messages $10.05
100,000 messages $100.05

A 6-hour broadcast from a busy channel produces roughly 10,000–30,000 messages, so $10.05–$30.05 a run. Apify's free trial gives every new account $5 of credit, no card required — about 4,900 messages, enough for two or three shorter VODs.

The technically interesting bit 🧠

The offset-based pagination trick is undocumented anywhere, so it is worth one paragraph. Twitch's VOD-chat endpoint supports two pagination modes. Cursor mode — get a cursor per page, pass it forward — trips the KPSDK integrity challenge on the second request of any session. Offset mode (pass the last message's contentOffsetSeconds as the next page's start) does not (verified across repeated calls, 2026-05-16). The challenge needs a full browser to solve, so the "obvious" implementation fails at scale and the working one requires knowing which mode to pick before you write a line of code. This Actor uses offset mode exclusively. The Apify proxy documentation covers the residential-proxy rotation that keeps long-VOD runs alive.

Limitations 🚧

  • VOD chat only — no live chat. Live chat is a separate IRC-over-WSS protocol. Once the broadcast ends and the VOD is processed, its chat becomes accessible; while live, it is out of scope.
  • Subscriber-only chat returns zero messages. Anonymous queries against a subscriber-gated VOD get empty edges, not an error. The Actor reports this in the run status message.
  • VOD expiry. Default Twitch accounts retain VODs for 60 days; Partners, Affiliates, and Turbo users retain them indefinitely. The Actor cannot recover chat for an expired VOD.
  • No moderator action log. Bans, timeouts, and deleted messages are not in the public chat-replay endpoint. Deleted messages may appear as <message deleted> or be absent.
  • Persisted-query hash dependency. The Actor relies on a specific GraphQL persisted-query hash for VideoCommentsByOffsetOrCursor. If Twitch rotates it after a schema change, the Actor returns PersistedQueryNotFound and exits non-zero — we pull the new hash and ship a patch.

FAQ ❓

Is scraping Twitch VOD chat legal?
The chat replay is public data Twitch presents to any logged-out visitor. This Actor retrieves only what the VOD player shows anonymously, at a paced rate, collecting no personal data beyond what is already publicly displayed. We are not affiliated with Twitch. Check your own jurisdiction and use case; the Twitch Terms of Service governs what you may do with the data.

Can I export to CSV or connect this to a warehouse?
Yes — export CSV, Excel, or JSON from the Apify Console dataset view, webhook the result to Make / Zapier / n8n on ACTOR.RUN.SUCCEEDED, or pull the dataset directly via the Apify API using the run's defaultDatasetId.

How is this different from the open-source chat-downloader tool?
chat-downloader is a Python library you run and maintain locally. This Actor runs on Apify's infrastructure — no local environment, no proxy management, no dependency pinning. For one-off pulls the library is fine; for scheduled runs, multi-VOD batch jobs, or team use, the hosted Actor fits better.

Why does a long VOD take a while?
Twitch returns roughly 50–60 messages per page and rate-limits single-IP sessions on sustained runs. The Actor uses one in-flight request at a time and backs off on 429. The proxyConfiguration field defaults to RESIDENTIAL for this reason.

Try it

The Actor is live on the Apify Store: apify.com/DevilScrapes/twitch-vod-chat-archive. Free $5 trial credit, no credit card. Run it on a VOD from your favorite channel and you will have the first 5,000 messages in a typed dataset in minutes. Need a field that is not there yet? Drop it in the comments — I ship what people actually need.


Built by Devil Scrapes — Apify Actors with attitude. Pay-per-event, transparent pricing. 😈