Skip to main content
Feed events form a discriminated union on the type field. Inspect type before reading the fields unique to that event.

Fields on every event

FieldTypeMeaning
idstringMonitor YT’s 24-character event ID.
typestringOne of the event types below.
createdAtintegerObservation time in Unix epoch milliseconds.
channel.idstringMonitor YT channel ID used by the feed’s channelIds filter.
channel.youtubeChannelIdstringYouTube’s permanent UC… channel ID.
channel.titlestringCurrent observed channel title.
channel.thumbnailUrlstring or nullCurrent observed avatar URL.
Most video event types also include:
FieldTypeMeaning
video.youtubeVideoIdstringYouTube video ID.
video.currentTitlestringLatest title known when the response was built.
video.currentThumbnailUrlstringLatest thumbnail known when the response was built.
video.publishedAtintegerYouTube publish time in Unix epoch milliseconds.

Video event variants

typeAdditional fields
video_publishedvideo.isMembersOnly, video.viewCount, video.likeCount, video.commentCount
title_changedoldTitle, newTitle
thumbnail_changedoldThumbnailUrl, newThumbnailUrl
title_ab_testtitles
title_ab_test_concludedtitles, finalTitle
thumbnail_ab_testthumbnailUrls
thumbnail_ab_test_concludedthumbnailUrls, finalThumbnailUrl
members_only_changedisMembersOnly

Channel event variants

Channel events do not contain a video object.
typeAdditional fields
subscriber_changeoldSubscriberCount, newSubscriberCount
channel_renamedoldChannelTitle, newChannelTitle
channel_avatar_changedoldAvatarUrl, newAvatarUrl

TypeScript example

for (const event of page.events) {
  switch (event.type) {
    case "title_changed":
      console.log(`${event.oldTitle} -> ${event.newTitle}`);
      break;
    case "thumbnail_ab_test_concluded":
      console.log(event.thumbnailUrls, event.finalThumbnailUrl);
      break;
    case "subscriber_change":
      console.log(event.oldSubscriberCount, event.newSubscriberCount);
      break;
  }
}
Current titles, thumbnails, and channel metadata can be newer than the event itself. Use the type-specific old/new fields to understand the recorded transition.