Subscriptions

  • A YouTube subscription notifies users about new videos or actions on a channel, such as uploads, ratings, or comments.

  • The API supports methods to list, insert, and delete subscription resources, allowing for management of user subscriptions.

  • Subscription resources contain details like the subscription's title, the channel subscribed to, creation time, and thumbnail images.

  • Content details in a subscription resource include the total item count, new item count, and the type of activity the subscription covers.

  • The subscription resource contains information about the subscriber, such as title, description, and thumbnails.

A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.

Methods

The API supports the following methods for subscriptions resources:

list
Returns subscription resources that match the API request criteria. Try it now.
insert
Adds a subscription for the authenticated user's channel. Try it now.
delete
Deletes a subscription. Try it now.

Resource representation

The following JSON structure shows the format of a subscriptions resource:

{
  "kind": "youtube#subscription",
  "etag": etag,
  "id": string,
  "snippet": {
    "publishedAt": datetime,
    "channelTitle": string,
    "title": string,
    "description": string,
    "resourceId": {
      "kind": string,
      "channelId": string,
    },
    "channelId": string,
    "thumbnails": {
      (key): {
        "url": string,
        "width": unsigned integer,
        "height": unsigned integer
      }
    }
  },
  "contentDetails": {
    "totalItemCount": unsigned integer,
    "newItemCount": unsigned integer,
    "activityType": string
  },
  "subscriberSnippet": {
    "title": string,
    "description": string,
    "channelId": string,
    "thumbnails": {
      (key): {
        "url": string,
        "width": unsigned integer,
        "height": unsigned integer
      }
    }
  }
}

Properties

The following table defines the properties that appear in this resource: