YouTube - Get Live Chat Comments

Get plain text:

curl -H "Accept: text/plain" https://jugoya.ai/guides/youtube/live-chat

Overview

Retrieve real-time comments from YouTube Live streams. Live chat differs from regular video comments - it's a continuous stream of messages during the broadcast.

Prerequisites

  • YouTube account (optional for viewing, required for posting)
  • Navigate to an active live stream

Finding Live Streams

Method 1: YouTube Live Channel

Navigate to https://www.youtube.com/channel/{CHANNEL_ID}/streams

This page shows:

  • "Live Now" section - currently streaming
  • "Recent Live Streams" section - ended streams (archived)
  • "Upcoming Live Streams" section - scheduled streams

Method 2: Live Indicator on Videos

Active live streams show:

  • button "Tap to watch live" on thumbnails
  • "LIVE" badge on video cards
  • Red "LIVE" indicator on video player

Accessing Live Chat

Step 1: Open Live Stream

Click on any video in the "Live Now" section. Active streams have continuous playback (no fixed duration).

Step 2: Locate Chat Panel

Live chat appears on the right side of the video player:

  • heading "Live chat"
  • button "Live Chat mode selection: Top chat" - filter options
  • link "Create a channel to join the chat" - if not logged in

Step 3: Capture Chat Messages

Take a browser snapshot. Chat messages appear with this structure:

button "@username"
[Message text appears here]
button "Chat actions"

For Super Chats (paid messages):

button "@username"
button "Like"
button "Reply to this Super Chat"
[Message text]
button "Chat actions"

Chat Mode Options

Click button "Live Chat mode selection" to toggle:

  • Top chat - Filtered, slower, moderated
  • Live chat - All messages, faster, unfiltered

Key Elements

ElementPurpose
button "Live Chat mode selection: Top chat"Switch chat filter mode
button "More options"Chat settings
button "Close"Minimize chat panel
button "Open panel"Expand collapsed chat
button "Chat actions"Per-message options (report, etc.)

Live vs Archived Streams

IndicatorLive StreamArchived Stream
Duration display"0 Minutes 0 Seconds of 0 Minutes 0 Seconds"Fixed duration shown
Chat section"Live chat""X Comments" (regular comments)
PlaybackContinuous, no seeking to endFull seekable video

Extracting Chat Data

From snapshot, parse each message block:

  • Username: @username button text
  • Content: text between username and "Chat actions" button
  • Type: Check for "Like" and "Reply to this Super Chat" buttons (indicates Super Chat)

Rate Considerations

  • Popular streams: 10-50+ messages per second
  • Chat updates continuously - take multiple snapshots for comprehensive capture
  • Messages scroll off quickly - snapshot frequency matters

Tips

  • Skip ads with button "Skip" when entering stream
  • YouTube Premium popup may appear - dismiss with button "No thanks"
  • Chat may require page scroll to fully load
  • Membership badges appear before usernames for channel members

Limitations

  • Cannot access chat on member-only streams without membership
  • Some streams disable chat entirely
  • Chat replay on archived streams may differ from live chat