Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/youtube:youtube-reports-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: YouTube Analytics Reports API
version: v2
description: Generated from Google's published Discovery document for YouTube Analytics API (youtubeAnalytics v2, revision 20261110). 1 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://youtubeanalytics.googleapis.com
tags:
- name: Reports
paths:
/v2/reports:
get:
operationId: youtubeAnalytics.reports.query
summary: Query reports
description: Retrieve your YouTube Analytics reports.
parameters:
- name: currency
in: query
required: false
description: 'The currency to which financial metrics should be converted. The default is US Dollar (USD). If the result contains no financial metrics, this flag will be ignored. Responds with an error if the specified currency is not recognized.", pattern: [A-Z]{3}'
schema:
type: string
- name: dimensions
in: query
required: false
description: 'A comma-separated list of YouTube Analytics dimensions, such as `views` or `ageGroup,gender`. See the [Available Reports](/youtube/analytics/v2/available_reports) document for a list of the reports that you can retrieve and the dimensions used for those reports. Also see the [Dimensions](/youtube/analytics/v2/dimsmets/dims) document for definitions of those dimensions." pattern: [0-9a-zA-Z,]+'
schema:
type: string
- name: endDate
in: query
required: false
description: 'The end date for fetching YouTube Analytics data. The value should be in `YYYY-MM-DD` format. required: true, pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}'
schema:
type: string
- name: filters
in: query
required: false
description: A list of filters that should be applied when retrieving YouTube Analytics data. The [Available Reports](/youtube/analytics/v2/available_reports) document identifies the dimensions that can be used to filter each report, and the [Dimensions](/youtube/analytics/v2/dimsmets/dims) document defines those dimensions. If a request uses multiple filters, join them together with a semicolon (`;`), and the returned result table will satisfy both filters. For example, a filters parameter value of `video==dMH0bHeiRNg;country==IT` restricts the result set to include data for the given video in Italy.",
schema:
type: string
- name: ids
in: query
required: false
description: 'Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics data. - To request data for a YouTube user, set the `ids` parameter value to `channel==CHANNEL_ID`, where `CHANNEL_ID` specifies the unique YouTube channel ID. - To request data for a YouTube CMS content owner, set the `ids` parameter value to `contentOwner==OWNER_NAME`, where `OWNER_NAME` is the CMS name of the content owner. required: true, pattern: [a-zA-Z]+==[a-zA-Z0-9_+-]+'
schema:
type: string
- name: includeHistoricalChannelData
in: query
required: false
description: If set to true historical data (i.e. channel data from before the linking of the channel to the content owner) will be retrieved.",
schema:
type: boolean
- name: maxResults
in: query
required: false
description: 'The maximum number of rows to include in the response.", minValue: 1'
schema:
format: int32
type: integer
- name: metrics
in: query
required: false
description: 'A comma-separated list of YouTube Analytics metrics, such as `views` or `likes,dislikes`. See the [Available Reports](/youtube/analytics/v2/available_reports) document for a list of the reports that you can retrieve and the metrics available in each report, and see the [Metrics](/youtube/analytics/v2/dimsmets/mets) document for definitions of those metrics. required: true, pattern: [0-9a-zA-Z,]+'
schema:
type: string
- name: sort
in: query
required: false
description: 'A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics data. By default the sort order is ascending. The ''`-`'' prefix causes descending sort order.", pattern: [-0-9a-zA-Z,]+'
schema:
type: string
- name: startDate
in: query
required: false
description: 'The start date for fetching YouTube Analytics data. The value should be in `YYYY-MM-DD` format. required: true, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}'
schema:
type: string
- name: startIndex
in: query
required: false
description: 'An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter (one-based, inclusive).", minValue: 1'
schema:
format: int32
type: integer
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/QueryResponse'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/youtube
- https://www.googleapis.com/auth/youtube.readonly
- https://www.googleapis.com/auth/youtubepartner
- https://www.googleapis.com/auth/yt-analytics-monetary.readonly
- https://www.googleapis.com/auth/yt-analytics.readonly
- apiKey: []
tags:
- Reports
components:
schemas:
ResultTableColumnHeader:
properties:
name:
type: string
description: The name of the dimension or metric.
dataType:
description: The type of the data in the column (`STRING`, `INTEGER`, `FLOAT`, etc.).
type: string
columnType:
type: string
description: The type of the column (`DIMENSION` or `METRIC`).
type: object
description: The description of a column of the result table.
GoogleRpcError:
type: object
description: The error envelope every Google API returns.
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
status:
type: string
details:
type: array
items:
type: object
Errors:
properties:
requestId:
description: Request identifier generated by the service, which can be used to identify the error in the logs
type: string
error:
type: array
description: Specific error description and codes
items:
$ref: '#/components/schemas/ErrorProto'
code:
enum:
- BAD_REQUEST
- FORBIDDEN
- NOT_FOUND
- CONFLICT
- GONE
- PRECONDITION_FAILED
- INTERNAL_ERROR
- SERVICE_UNAVAILABLE
description: Global error code. Deprecated and ignored. Set custom error codes in ErrorProto.domain and ErrorProto.code instead.
type: string
deprecated: true
type: object
description: Request Error information. The presence of an error field signals that the operation has failed.
ErrorProto:
type: object
properties:
domain:
type: string
description: 'Error domain. RoSy services can define their own domain and error codes. This should normally be the name of an enum type, such as: gdata.CoreErrorDomain'
externalErrorMessage:
description: A short explanation for the error, which can be shared outside Google. Please set domain, code and arguments whenever possible instead of this error message so that external APIs can build safe error messages themselves. External messages built in a RoSy interface will most likely refer to information and concepts that are not available externally and should not be exposed. It is safer if external APIs can understand the errors and decide what the error message should look like.
type: string
location:
description: 'Location of the error, as specified by the location type. If location_type is PATH, this should be a path to a field that''s relative to the request, using FieldPath notation (net/proto2/util/public/field_path.h). Examples: authenticated_user.gaia_id resource.address[2].country'
type: string
debugInfo:
description: Debugging information, which should not be shared externally.
type: string
argument:
type: array
items:
type: string
description: Error arguments, to be used when building user-friendly error messages given the error domain and code. Different error codes require different arguments.
locationType:
enum:
- PATH
- OTHER
- PARAMETER
type: string
code:
description: Error code in the error domain. This should correspond to a value of the enum type whose name is in domain. See the core error domain in error_domain.proto.
type: string
description: Describes one specific error.
QueryResponse:
description: Response message for TargetedQueriesService.Query.
properties:
kind:
type: string
description: This value specifies the type of data included in the API response. For the query method, the kind property value will be `youtubeAnalytics#resultTable`.
rows:
type: array
items:
type: array
items: {}
description: The list contains all rows of the result table. Each item in the list is an array that contains comma-delimited data corresponding to a single row of data. The order of the comma-delimited data fields will match the order of the columns listed in the `columnHeaders` field. If no data is available for the given query, the `rows` element will be omitted from the response. The response for a query with the `day` dimension will not contain rows for the most recent days.
columnHeaders:
type: array
description: 'This value specifies information about the data returned in the `rows` fields. Each item in the `columnHeaders` list identifies a field returned in the `rows` value, which contains a list of comma-delimited data. The `columnHeaders` list will begin with the dimensions specified in the API request, which will be followed by the metrics specified in the API request. The order of both dimensions and metrics will match the ordering in the API request. For example, if the API request contains the parameters `dimensions=ageGroup,gender&metrics=viewerPercentage`, the API response will return columns in this order: `ageGroup`, `gender`, `viewerPercentage`.'
items:
$ref: '#/components/schemas/ResultTableColumnHeader'
errors:
$ref: '#/components/schemas/Errors'
description: When set, indicates that the operation failed.
type: object
securitySchemes:
apiKey:
type: apiKey
in: query
name: key
description: API key; accepted by methods that do not need user data.
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/youtubepartner: View and manage your assets and associated content on YouTube
https://www.googleapis.com/auth/youtube.readonly: View your YouTube account
https://www.googleapis.com/auth/yt-analytics.readonly: View YouTube Analytics reports for your YouTube content
https://www.googleapis.com/auth/youtube: Manage your YouTube account
https://www.googleapis.com/auth/yt-analytics-monetary.readonly: View monetary and non-monetary YouTube Analytics reports for your YouTube content
externalDocs:
url: https://developers.google.com/youtube/analytics
x-provenance:
method: harvested
publisher: Google
source: https://youtubeanalytics.googleapis.com/$discovery/rest?version=v2
note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261110)