Method: activities.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 authenticated user's channel.

Requests that use the channelId filter don't require OAuth 2.0 authorization. Requests that use mine=true or home=true require authorization. For method-specific error responses, see activities.list errors. For code examples, see activities.list code snippets.

HTTP request

GET https://youtube.googleapis.com/youtube/v3/activities

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
channelId

string

Specifies a unique YouTube channel ID to retrieve that channel's activities. Specify exactly one filter parameter (channelId or mine). Requests that specify channelId don't require OAuth 2.0 authorization.

home
(deprecated)

boolean

Deprecated: Home activity feeds are no longer supported; use channelId or mine to retrieve a channel's activities instead. Requires OAuth 2.0 authorization and returns an empty response when set to true.

mine

boolean

Set this parameter's value to true to retrieve a feed of the authenticated user's activities. Requires OAuth 2.0 authorization. Specify exactly one filter parameter (channelId or mine).

publishedAfter

string (Timestamp format)

Specifies the earliest date and time that an activity must occur to be included in the response.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

publishedBefore

string (Timestamp format)

Specifies the latest date and time before which an activity must occur to be included in the response.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

maxResults

integer (uint32 format)

Specifies the maximum number of items returned in the result set. Acceptable values are 0 to 50, inclusive. The default value is 5.

pageToken

string

The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

part[]

string

Required. Specifies a comma-separated list of one or more activity resource properties that the API response includes.

If the parameter identifies a property that contains child properties, the child properties are included in the response. For example, in an activity resource, the snippet property contains properties that identify the activity type, display title, and description. Setting part=snippet returns all of those nested properties.

Valid values are contentDetails, id, and snippet.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "etag": string,
  "items": [
    {
      object (Activity)
    }
  ],
  "nextPageToken": string,
  "prevPageToken": string,
  "pageInfo": {
    "totalResults": integer,
    "resultsPerPage": integer
  }
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "youtube#activityListResponse".

etag

string

Etag of this resource.

items[]

object (Activity)

A list of activities that match the request criteria.

nextPageToken

string

The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.

prevPageToken

string

The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.

pageInfo

object

General pagination information.

pageInfo.totalResults

integer

The total number of results in the result set.

pageInfo.resultsPerPage

integer

The number of results included in the API response.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.