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](https://developers.google.com/youtube/data/reference/rest/v3/activities/list.md.txt)
:   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](https://developers.google.com/youtube/data/reference/rest/v3/activities/list.md.txt#usage).

## 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:

| Properties ||
|---|---|
| `kind` | `string` Identifies the API resource's type. The value will be `youtube#activity`. |
| `etag` | `etag` The Etag of this resource. |
| `id` | `string` The ID that YouTube uses to uniquely identify the activity. |
| `snippet` | `object` The `snippet` object contains basic details about the activity, including the activity's type and group ID. |
| `snippet.publishedAt` | `datetime` The date and time that the activity occurred. The value is specified in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. |
| `snippet.channelId` | `string` The ID that YouTube uses to uniquely identify the channel associated with the activity. |
| `snippet.title` | `string` The title of the resource primarily associated with the activity. |
| `snippet.description` | `string` The description of the resource primarily associated with the activity. |
| `snippet.thumbnails` | `object` A map of thumbnail images associated with the resource that is primarily associated with the activity. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. |
| `snippet.thumbnails.(key)` | `object` Valid key values are: - `default` -- The default thumbnail image. The default thumbnail for a video -- or a resource that refers to a video, such as a playlist item or search result -- is 120px wide and 90px tall. The default thumbnail for a channel is 88px wide and 88px tall. - `medium` -- A higher resolution version of the thumbnail image. For a video (or a resource that refers to a video), this image is 320px wide and 180px tall. For a channel, this image is 240px wide and 240px tall. - `high` -- A high resolution version of the thumbnail image. For a video (or a resource that refers to a video), this image is 480px wide and 360px tall. For a channel, this image is 800px wide and 800px tall. - `standard` -- An even higher resolution version of the thumbnail image than the `high` resolution image. This image is available for some videos and other resources that refer to videos, like playlist items or search results. This image is 640px wide and 480px tall. - `maxres` -- A high resolution version of the thumbnail image. This image size is available for some videos and other resources that refer to videos, like playlist items or search results. This image is 1280px wide and 720px tall. - `fhd` -- The full high definition (1080p) version of the thumbnail image. This image size is available for some videos. This image is 1920px wide and 1080px tall. - `qhd` -- The quad high definition (1440p / 2K) version of the thumbnail image. This image size is available for some videos. This image is 2560px wide and 1440px tall. - `uhd` -- The ultra-high resolution (4K) version of the thumbnail image. This image size is available for some videos. This image is 3840px wide and 2160px tall. |
| `snippet.thumbnails.(key).url` | `string` The image's URL. |
| `snippet.thumbnails.(key).width` | `unsigned integer` The image's width. |
| `snippet.thumbnails.(key).height` | `unsigned integer` The image's height. |
| `snippet.channelTitle` | `string` Channel title for the channel responsible for this activity |
| `snippet.type` | `string` The type of activity that the resource describes. Valid values for this property are: - `channelItem` - `comment` -- (not currently returned) - `playlistItem` - `promotedItem` - `recommendation` - `social` - `subscription` - `upload` |
| `snippet.groupId` | `string` The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user uploads a video and watches the same video, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same `groupId` value. |
| `contentDetails` | `object` The `contentDetails` object contains information about the content associated with the activity. For example, if the `snippet.type` value is `videoRated`, then the `contentDetails` object's content identifies the rated video. |
| `contentDetails.upload` | `object` The `upload` object contains information about the uploaded video. This property is only present if the `snippet.type` is `upload`. |
| `contentDetails.upload.videoId` | `string` The ID that YouTube uses to uniquely identify the uploaded video. |
| `contentDetails.comment` | `object` The `comment` object contains information about a resource that received a comment. This property is only present if the `snippet.type` is `comment`. |
| `contentDetails.comment.resourceId` | `object` The `resourceId` object contains information that identifies the resource associated with the comment. |
| `contentDetails.comment.resourceId.kind` | `string` The type of the API resource. |
| `contentDetails.comment.resourceId.videoId` | `string` The ID that YouTube uses to uniquely identify the video associated with a comment. This property is only present if the `resourceId.kind` is `youtube#video`. |
| `contentDetails.comment.resourceId.channelId` | `string` The ID that YouTube uses to uniquely identify the channel associated with a comment. This property is only present if the `resourceId.kind` is `youtube#channel`. |
| `contentDetails.subscription` | `object` The `subscription` object contains information about a channel that a user subscribed to. Only public subscriptions are returned. This property is only present if the `snippet.type` is `subscription`. |
| `contentDetails.subscription.resourceId` | `object` The `resourceId` object contains information that identifies the resource that the user subscribed to. |
| `contentDetails.subscription.resourceId.kind` | `string` The type of the API resource. |
| `contentDetails.subscription.resourceId.channelId` | `string` The ID that YouTube uses to uniquely identify the channel that the user subscribed to. This property is only present if the `resourceId.kind` is `youtube#channel`. |
| `contentDetails.playlistItem` | `object` The `playlistItem` object contains information about a new playlist item. This property is only present if the `snippet.type` is `playlistItem`. |
| `contentDetails.playlistItem.resourceId` | `object` The `resourceId` object contains information that identifies the resource that was added to the playlist. |
| `contentDetails.playlistItem.resourceId.kind` | `string` The type of the API resource. |
| `contentDetails.playlistItem.resourceId.videoId` | `string` The ID that YouTube uses to uniquely identify the video that was added to the playlist. This property is only present if the `resourceId.kind` is `youtube#video`. |
| `contentDetails.playlistItem.playlistId` | `string` The value that YouTube uses to uniquely identify the playlist. |
| `contentDetails.playlistItem.playlistItemId` | `string` The value that YouTube uses to uniquely identify the item in the playlist. |
| `contentDetails.recommendation` | `object` The `recommendation` object contains information about a recommended resource. This property is only present if the `snippet.type` is `recommendation`. |
| `contentDetails.recommendation.resourceId` | `object` The `resourceId` object contains information that identifies the recommended resource. |
| `contentDetails.recommendation.resourceId.kind` | `string` The type of the API resource. |
| `contentDetails.recommendation.resourceId.videoId` | `string` The ID that YouTube uses to uniquely identify the video, if the recommended resource is a video. This property is only present if the `resourceId.kind` is `youtube#video`. |
| `contentDetails.recommendation.resourceId.channelId` | `string` The ID that YouTube uses to uniquely identify the channel, if the recommended resource is a channel. This property is only present if the `resourceId.kind` is `youtube#channel`. |
| `contentDetails.recommendation.reason` | `string` The reason that the resource is recommended to the user. Valid values for this property are: - `videoWatched` |
| `contentDetails.recommendation.seedResourceId` | `object` The `seedResourceId` object contains information about the resource that caused the recommendation. |
| `contentDetails.recommendation.seedResourceId.kind` | `string` The type of the API resource. |
| `contentDetails.recommendation.seedResourceId.videoId` | `string` The ID that YouTube uses to uniquely identify the video, if the recommendation was caused by a particular video. This property is only present if the `seedResourceId.kind` is `youtube#video`. |
| `contentDetails.recommendation.seedResourceId.channelId` | `string` The ID that YouTube uses to uniquely identify the channel, if the recommendation was caused by a particular channel. This property is only present if the `seedResourceId.kind` is `youtube#channel`. |
| `contentDetails.recommendation.seedResourceId.playlistId` | `string` The ID that YouTube uses to uniquely identify the playlist, if the recommendation was caused by a particular playlist. This property is only present if the `seedResourceId.kind` is `youtube#playlist`. |
| `contentDetails.social` | `object` The `social` object contains details about a social network post. This property is only present if the `snippet.type` is `social`. |
| `contentDetails.social.type` | `string` The name of the social network. Valid values for this property are: - `facebook` - `googlePlus` - `twitter` - `unspecified` |
| `contentDetails.social.resourceId` | `object` The `resourceId` object encapsulates information that identifies the resource associated with a social network post. |
| `contentDetails.social.resourceId.kind` | `string` The type of the API resource. |
| `contentDetails.social.resourceId.videoId` | `string` The ID that YouTube uses to uniquely identify the video featured in a social network post, if the post refers to a video. This property will only be present if the value of the `social.resourceId.kind` property is `youtube#video`. |
| `contentDetails.social.resourceId.channelId` | `string` The ID that YouTube uses to uniquely identify the channel featured in a social network post, if the post refers to a channel. This property will only be present if the value of the `social.resourceId.kind` property is `youtube#channel`. |
| `contentDetails.social.resourceId.playlistId` | `string` The ID that YouTube uses to uniquely identify the playlist featured in a social network post, if the post refers to a playlist. This property will only be present if the value of the `social.resourceId.kind` property is `youtube#playlist`. |
| `contentDetails.social.author` | `string` The author of the social network post. |
| `contentDetails.social.referenceUrl` | `string` The URL of the social network post. |
| `contentDetails.social.imageUrl` | `string` An image of the post's author. |
| `contentDetails.channelItem` | `object` The `channelItem` object contains details about a resource that was added to a channel. This property is only present if the `snippet.type` is `channelItem`. |
| `contentDetails.channelItem.resourceId` | `object` The `resourceId` object contains information that identifies the resource that was added to the channel. |