Subscribe to Push Notifications

The YouTube Data API (v3) supports push notifications via PubSubHubbub, a server-to-server publish/subscribe protocol for Web-accessible resources. Notifications are pushed out to subscribers via HTTP webhooks, which is much more efficient than polling-based solutions. With PubSubHubbub, your server finds out about events in near real-time, without having to determine the optimal polling interval or repeatedly fetching data that hasn’t changed.

Your PubSubHubbub callback server receives Atom feed notifications when a channel does any of the following activities:

  • uploads a video
  • updates a video's title
  • updates a video's description

The following steps explain how to subscribe to notifications:

  1. Set up a callback server that can handle incoming Atom feed notifications.

  2. Use the Google hub to subscribe to receive push notifications:

    • Set the mode to subscribe. (Or set the mode to unsubscribe to cancel a subscription.)

    • Set the callback URL to the URL that you set up in step 1.

    • Set the topic URL to, where CHANNEL_ID is the YouTube channel ID for which you want to retrieve push notifications.

  3. Process notifications sent to your callback server. The notification format is shown below. Note that you can use the <yt:videoId> element's value to identify the newly added or updated video. You can also use the <yt:channelId> element's value to identify the channel that owns that video.

    <feed xmlns:yt=""
      <link rel="hub" href=""/>
      <link rel="self" href=""/>
      <title>YouTube video feed</title>
        <title>Video title</title>
        <link rel="alternate" href=""/>
         <name>Channel title</name>