Activities

An activity resource contains information about an action that a particular channel, or user, has taken on YouTube. The actions reported in activity feeds include sharing a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded.

Methods

The API supports the following methods for activities resources:

list
Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel or with the user's own channel. Try it now.

Resource representation

The following JSON structure shows the format of an activities resource:

{
  "kind": "youtube#activity",
  "etag": etag,
  "id": string,
  "snippet": {
    "publishedAt": datetime,
    "channelId": string,
    "title": string,
    "description": string,
    "thumbnails": {
      (key): {
        "url": string,
        "width": unsigned integer,
        "height": unsigned integer
      }
    },
    "channelTitle": string,
    "type": string,
    "groupId": string
  },
  "contentDetails": {
    "upload": {
      "videoId": string
    },
    "comment": {
      "resourceId": {
        "kind": string,
        "videoId": string,
        "channelId": string,
      }
    },
    "subscription": {
      "resourceId": {
        "kind": string,
        "channelId": string,
      }
    },
    "playlistItem": {
      "resourceId": {
        "kind": string,
        "videoId": string,
      },
      "playlistId": string,
      "playlistItemId": string
    },
    "recommendation": {
      "resourceId": {
        "kind": string,
        "videoId": string,
        "channelId": string,
      },
      "reason": string,
      "seedResourceId": {
        "kind": string,
        "videoId": string,
        "channelId": string,
        "playlistId": string
      }
    },
    "social": {
      "type": string,
      "resourceId": {
        "kind": string,
        "videoId": string,
        "channelId": string,
        "playlistId": string
      },
      "author": string,
      "referenceUrl": string,
      "imageUrl": string
    },
    "channelItem": {
      "resourceId": {
      }
    },
  }
}

Properties

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