Product analytics connector
YouTube Analytics connector for governed AI agent access
Connect YouTube Analytics with Google OAuth tokens that can read YouTube Analytics reports.
Direct answer
OneQuery supports YouTube Analytics for governed agent access.
Teams use the YouTube Analytics connector to give AI agents bounded source API calls for endpoint-specific context while OneQuery keeps credentials centralized, limits access to approved sources, and preserves audit logs for review.
Agent workflow
What this connector enables
YouTube Analytics becomes an approved OneQuery source instead of a secret copied into an agent prompt, shell session, or model tool. The agent receives a governed access path, and the source credentials stay behind OneQuery.
- Use bounded source API calls for endpoint-specific context for product analytics context.
- Keep YouTube Analytics credentials centralized and out of agent runtimes.
- Review agent access through OneQuery audit history instead of reconstructing direct service usage.
Setup checklist
Prepare the YouTube Analytics connection
Use youtube analytics credentials and connect the source through the Dashboard and CLI. Keep credentials scoped to the data the agent is allowed to read.
- Enable the YouTube Analytics API in the Google Cloud project used for OAuth.
- Authorize a Google account that owns or manages the YouTube channel or content owner data you need to analyze.
- Use the `https://www.googleapis.com/auth/youtube.readonly` and `https://www.googleapis.com/auth/yt-analytics.readonly` scopes for non-monetary metrics. Revenue and ad performance metrics require `https://www.googleapis.com/auth/yt-analytics-monetary.readonly`.
- Call `/reports` through Source API with query params such as `ids`, `startDate`, `endDate`, `metrics`, `dimensions`, and `filters`.
FAQ
YouTube Analytics connector questions
What is the OneQuery YouTube Analytics connector?
The OneQuery YouTube Analytics connector makes product analytics context from YouTube Analytics available to AI agents through bounded source API calls for endpoint-specific context. Connect YouTube Analytics with Google OAuth tokens that can read YouTube Analytics reports.
How do AI agents access YouTube Analytics through OneQuery?
Agents call OneQuery instead of receiving raw YouTube Analytics credentials. OneQuery keeps credentials centralized, applies source boundaries, and records access in audit logs while exposing bounded source API calls for endpoint-specific context.
How do I set up the YouTube Analytics connector?
Prepare youtube analytics credentials and connect YouTube Analytics from the OneQuery dashboard or CLI. Start with this setup step: Enable the YouTube Analytics API in the Google Cloud project used for OAuth.