Menu

How to Scrape Twitch with Go: Chat Logs over IRC WebSockets, Moderation Events, Full-Text Search, and Chat Stats (2026)
📰

How to Scrape Twitch with Go: Chat Logs over IRC WebSockets, Moderation Events, Full-Text Search, and Chat Stats (2026)

DEV Community: go·Viktor·11 days ago
#o2IOIouK
#devtogo#devto#dev#xqc#kaicenat
Long article (8623 words) — no AI summary yet.
Reading 0:00
15s threshold

People search "twitch chat logs" about 6,600 times a month in the US, and most of them hit the same wall: Twitch has no API that returns chat from the past. Helix doesn't have one, and neither does EventSub. If a message isn't captured while it scrolls by, it's gone for you. So a chat log is something you build going forward: connect, listen, store.

This post builds twitchlog , a small Go program that does exactly that:

log connects to Twitch chat over its IRC WebSocket, joins channels, and writes every message to SQLite, along with subs, raids, timeouts, bans, and room settings

search runs full-text queries (FTS5) across everything you've logged

export prints a plain-text log for one channel and day, or for one chatter

stats summarizes a channel: messages per minute, unique chatters, subscriber share, moderation, top Twitch emotes, events

import rebuilds the database from the raw IRC log, so the raw log is your source of truth

live (optional) checks which channels are live before you join them

It's…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.