Returns subscription resources that match the API request criteria.
Requests that use channelId to retrieve public subscriptions don't require OAuth 2.0 authorization. Requests that use id, mine, mySubscribers, or myRecentSubscribers require OAuth 2.0 authorization. For method-specific error responses, see subscriptions.list errors. For code examples, see subscriptions.list code snippets.
HTTP request
GET https://youtube.googleapis.com/youtube/v3/subscriptions
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
id[] |
Specifies a comma-separated list of up to 50 YouTube subscription IDs to retrieve. Specify exactly one filter parameter ( Requires OAuth 2.0 authorization and returns only subscriptions belonging to the authenticated user (IDs belonging to other users are skipped). |
mine |
Set to |
channelId |
Specifies a YouTube channel ID to return that channel's public subscriptions (or the authenticated user's subscriptions when matching the caller's channel). Requests for public subscriptions don't require OAuth 2.0 authorization. Specify exactly one filter parameter ( |
forChannelId |
Specifies a comma-separated list of channel IDs. The API response includes only subscriptions matching those channels. |
order |
Specifies how to sort returned subscriptions when listing the authenticated user's own subscriptions ( Valid values of this enum field are:
|
mySubscribers |
Set to |
myRecentSubscribers |
Set to |
maxResults |
Specifies the maximum number of items returned in the result set. Acceptable values are |
pageToken |
Identifies a specific page in the result set to return (up to 1,000 reachable results). In an API response, the |
part[] |
Required. Specifies a comma-separated list of one or more If the parameter identifies a property that contains child properties, the child properties are included in the response. For example, in a Valid values are |
onBehalfOfContentOwner |
Intended exclusively for YouTube content partners. Indicates that the request's authorization credentials identify a YouTube CMS user acting on behalf of the content owner specified in the parameter value. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. Although the API validates content owner authorization (and requires |
onBehalfOfContentOwnerChannel |
Intended exclusively for YouTube content partners and valid only in a properly authorized request. Specifies a YouTube channel ID and can only be used together with Although the API validates these permissions, |
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,
"nextPageToken": string,
"prevPageToken": string,
"pageInfo": {
"totalResults": integer,
"resultsPerPage": integer
},
"items": [
{
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
nextPageToken |
The token that can be used as the value of the |
prevPageToken |
The token that can be used as the value of the |
pageInfo |
General pagination information for the result set. |
pageInfo.totalResults |
The total number of results in the result set. |
pageInfo.resultsPerPage |
The number of results included in the API response. |
items[] |
A list of subscriptions that match the request criteria. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtubepartnerhttps://www.googleapis.com/auth/youtube.readonlyhttps://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.