---
title: "YouTube query analytics report API: GET /v2/reports"
description: "When PubNio calls YouTube's query analytics report request, GET /v2/reports: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube query analytics report API: GET /v2/reports

PubNio calls YouTube's `GET /v2/reports` (`youtubeAnalytics.reports.query`) to read video and channel analytics.

## How PubNio calls it

- Post analytics: the analytics sync makes this call for published posts; [`POST /api/v1/analytics/refreshes`](https://pubnio.com/api/v1/docs#tag/analytics/POST/api/v1/analytics/refreshes) asks for an early read.
- Account analytics: the account sync makes this call; [`GET /api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}`](https://pubnio.com/api/v1/docs#tag/analytics/GET/api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}) returns what it stored.
- PubNio asks for a totals report and a daily report with `dimensions=day`, filtered to the video for post analytics and to the channel for account analytics.
- YouTube's figures arrive about a day late, and PubNio reads at most 366 days back.

## Scopes

- The pinned spec accepts any one of 5 scopes: `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`, and `https://www.googleapis.com/auth/yt-analytics.readonly`.
- PubNio's Google sign-in requests `https://www.googleapis.com/auth/youtube.readonly` and `https://www.googleapis.com/auth/yt-analytics.readonly`, which satisfies it.
- Before the post analytics sync makes this call and before the account analytics sync makes this call, PubNio checks that the account granted `https://www.googleapis.com/auth/youtube.readonly` and `https://www.googleapis.com/auth/yt-analytics.readonly`.

## Errors

PubNio has no YouTube error code pages yet. [Provider error codes](https://pubnio.com/docs/errors/providers/) covers the providers that have them.

## Spec and changes

`youtubeAnalytics.reports.query` in the pinned spec, revision `20261129`. YouTube reference: [youtubeAnalytics.reports.query reference](https://developers.google.com/youtube/analytics/reference/reports/query).

Checked weekly; no change to `GET /v2/reports` recorded since this revision. [Change tracker](https://pubnio.com/docs/changes/).

## Limits

- Revenue metrics are not read, and PubNio does not ask for the monetary analytics scope.

## Sources

- [YouTube Analytics API v2 discovery document](https://youtubeanalytics.googleapis.com/$discovery/rest?version=v2)
- [youtubeAnalytics.reports.query reference](https://developers.google.com/youtube/analytics/reference/reports/query)

## Related

- [Provider API operations PubNio calls](https://pubnio.com/docs/providers/operations/)
- [YouTube rate limits and quota](https://pubnio.com/docs/providers/youtube/quota/)

Source: https://pubnio.com/docs/providers/youtube/operations/analytics-reports-query/index.mdx
