Google

YouTube Analytics API

Retrieves your YouTube Analytics data.

Media & content#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Retrieves your YouTube Analytics data.

Endpoints 8

groupItems

  • GETReturns a collection of group items that match the API request parameters./v2/groupItems?groupId=string&onBehalfOfContentOwner=stringReturns a collection of group items that match the API request parameters.
  • POSTCreates a group item./v2/groupItems?onBehalfOfContentOwner=stringCreates a group item.
  • DELETERemoves an item from a group./v2/groupItems?id=string&onBehalfOfContentOwner=stringRemoves an item from a group.

groups

  • GETReturns a collection of groups that match the API request parameters/v2/groups?id=string&mine=true&onBehalfOfContentOwner=string&pageToken=stringReturns a collection of groups that match the API request parameters. For example, you can retrieve all groups that the authenticated user owns, or you can…
  • PUTModifies a group/v2/groups?onBehalfOfContentOwner=stringModifies a group. For example, you could change a group's title.
  • POSTCreates a group./v2/groups?onBehalfOfContentOwner=stringCreates a group.
  • DELETEDeletes a group./v2/groups?id=string&onBehalfOfContentOwner=stringDeletes a group.

reports

  • GETRetrieve your YouTube Analytics reports./v2/reports?currency=string&dimensions=string&endDate=string&filters=string&ids=string&includeHistoricalChannelData=true&maxResults=0&metrics=string&sort=string&startDate=string&startIndex=0Retrieve your YouTube Analytics reports.

API details

Base URL
https://youtubeanalytics.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 5 scopes
An API key in the key query parameter
Operations
8 operations on 3 pathsGET 3POST 2DELETE 2PUT 1
Main resources
groups 4groupItems 3reports 1
Response formats
application/json
Description format
Google API Discovery, API version v2

How to test the YouTube Analytics API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the YouTube Analytics API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 5 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Returns a collection of group items that match the API request parameters.” (GET /v2/groupItems?groupId=string&onBehalfOfContentOwner=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the YouTube Analytics API?

Retrieves your YouTube Analytics data. It is listed under Media & content and has 8 endpoints.

Who publishes the YouTube Analytics API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the YouTube Analytics API?

Requests go to https://youtubeanalytics.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the YouTube Analytics API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 5 scopes; an API key in the key query parameter.

How many endpoints does the YouTube Analytics API have?

8 operations on 3 paths (3 GET, 2 POST, 2 DELETE, 1 PUT). The largest groups are groups, groupItems, reports.

Is forking the YouTube Analytics API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.