Knowi connects natively to YouTube Analytics through its YouTube integration, available under Cloud Services. After authenticating with your Google account via OAuth, you can query 19 pre-built endpoints covering channel analytics, video performance, audience demographics, traffic sources, revenue, and more, then build live dashboards directly in Knowi.
Quick Summary (TL;DR)
- Knowi connects to YouTube via Google OAuth 2.0 with read-only access. No API keys to manage; token stays active while the connection is live.
- 19 endpoints are available including Channel Analytics, Video Details, Demographics, Traffic Sources, Geography, Device Types, Audience Retention, Revenue, and Custom Analytics Query.
- Channel Analytics supports configurable date ranges, dimensions (day, month, video, country), and default metrics including views, estimatedMinutesWatched, averageViewDuration, likes, comments, shares, subscribersGained, and subscribersLost.
- Revenue data is available for YouTube Partner Program channels. Non-monetized channels return empty results for the Revenue endpoint.
- Analytics data has a 2-3 day processing delay. Historical data is available from June 2008.
- Knowi’s AI dashboard builder generates visualizations from your YouTube data using plain language questions of your dataset.
Table of Contents
How to Connect YouTube to Knowi
The YouTube connector is available natively in Knowi under Cloud Services. Authentication uses Google OAuth 2.0 so no API key is required.
- Go to Queries in Knowi and select New Data Source.
- Find YouTube under Cloud Services.
- Click Authenticate. A popup window opens where you select which Google account to connect.
- Once authorized, click Save. Your YouTube datasource is ready to query.
The OAuth refresh token does not expire while the connection remains active. You can revoke access at any time at myaccount.google.com/permissions.
What Data Can You Pull from YouTube?
The Query Builder includes 19 pre-built YouTube endpoints. All analytics endpoints require an active YouTube channel. The Revenue endpoint additionally requires YouTube Partner Program enrollment.
| Endpoint | What It Returns | Key Parameters |
|---|---|---|
| My Channel | channelId, title, description, publishedAt, totalViews, subscribers, videoCount, uploadsPlaylistId | None required |
| Channel Videos | videoId, title, description, publishedAt, thumbnailUrl, privacyStatus | Uploads Playlist ID (required), Results Per Page (1-50) |
| Video Details | videoId, title, publishedAt, views, likes, comments, duration, privacyStatus | Video ID(s), comma-separated, up to 50 |
| Channel Analytics | Time-series data: views, estimatedMinutesWatched, averageViewDuration, likes, comments, shares, subscribersGained, subscribersLost | Start Date, End Date, Metrics, Dimensions (day/month/video/country) |
| Video Analytics | Per-video performance over a date range. Same metrics as Channel Analytics. | Video ID, Start Date, End Date, Dimensions (default: day) |
| Demographics | ageGroup, gender, viewerPercentage | Start Date, End Date |
| Traffic Sources | Views and watch time by source (YouTube Search, External URLs, Related Videos, etc.) | Start Date, End Date |
| Traffic Source Detail | Drill-down by source type: search terms, external URLs, related videos | Source Type (9 options), Start Date, End Date, Max Results (up to 200) |
| Geography | Views and watch time by country | Start Date, End Date |
| US States/Provinces | Views and watch time by US state (ISO 3166-2 codes) | Start Date, End Date |
| Device Types | Views and watch time by device type and operating system | Start Date, End Date |
| Playback Locations | Views and watch time by location (watch page, embedded player, search results) | Start Date, End Date |
| Audience Retention | elapsedVideoTimeRatio, audienceWatchRatio, relativeRetentionPerformance | Video ID (required), Start Date (default: last 90 days), End Date |
| Content Type | Analytics by content type: SHORTS, VIDEO_ON_DEMAND, LIVE_STREAM | Start Date, End Date |
| Sharing Services | Share counts by platform (Twitter, Facebook, email, etc.) | Start Date, End Date |
| Playlists | title, videoCount, privacyStatus for all channel playlists | Results Per Page (default 25) |
| Revenue | estimatedRevenue, estimatedAdRevenue, grossRevenue, cpm, adImpressions, monetizedPlaybacks | Start Date, End Date, Dimensions (default: day). Requires YouTube Partner Program. |
| Custom Analytics Query | Full control over the YouTube Analytics API | Start Date, End Date, Metrics (required), optional Dimensions/Filters/Sort |
| Custom Data API Query | Access any YouTube Data API v3 resource | Resource name (channels, videos, search, playlists, subscriptions, commentThreads) + Query Parameters |
Technical Details
Date Range and Data Availability
- Analytics data has a 2-3 day processing delay. Data for the current or previous 1-2 days may be incomplete.
- Historical data is available from June 2008 onward.
- Knowi date tokens work with the YYYY-MM-DD format required by YouTube Analytics:
{$c9_today:yyyy-MM-dd},{$c9_today-30d:yyyy-MM-dd}.
Data Format and Cloud9QL
- Analytics API responses use a
columnHeaders[]androws[][]structure. Useselect expand(rows)in Cloud9QL to flatten into tabular rows, then reference columns positionally:rows[0],rows[1], etc. - Data API responses use an
items[]array. Useselect expand(items)to flatten.
How to Build a YouTube Dashboard in Knowi
- Select an endpoint from the Query Builder. Channel Analytics is a common starting point for overall channel performance.
- Set your date range. The default is 30 days; you can extend to any range back to June 2008.
- Choose your metrics and dimensions. Default metrics are pre-filled; add or remove from the comma-separated list.
- Preview and run your query, then use the AI dashboard builder to generate visualizations with plain language questions.
- Example dashboard from the integration video: monthly views and average minutes watched per month.
Watch the Video Walkthrough
Frequently Asked Questions
How does Knowi connect to YouTube?
Knowi uses Google OAuth 2.0. Click Authenticate in the datasource setup, select your Google account, and Knowi receives read-only access. The refresh token stays active while the connection is live. You can revoke access at myaccount.google.com/permissions.
How many YouTube endpoints does Knowi support?
19 endpoints: My Channel, Channel Videos, Video Details, Channel Analytics, Video Analytics, Demographics, Traffic Sources, Traffic Source Detail, Geography, US States/Provinces, Device Types, Playback Locations, Audience Retention, Content Type, Sharing Services, Playlists, Revenue, Custom Analytics Query, and Custom Data API Query.
Why is my YouTube analytics data showing incomplete numbers for recent dates?
YouTube Analytics has a 2-3 day processing delay. Data for the most recent 1-2 days may be incomplete or change as YouTube finalizes it. Use a start date that is at least 3 days in the past for reliable data.
Can I pull YouTube revenue data into Knowi?
Yes, if your channel is enrolled in the YouTube Partner Program. The Revenue endpoint returns estimatedRevenue, estimatedAdRevenue, grossRevenue, CPM, adImpressions, and monetizedPlaybacks. Non-monetized channels return empty results.
Can I analyze Shorts, live streams, and regular videos separately?
Yes. The Content Type endpoint breaks analytics down by SHORTS, VIDEO_ON_DEMAND, and LIVE_STREAM.
How far back can I pull YouTube data?
Historical data is available from June 2008 onward.
How do I flatten YouTube Analytics API responses in Knowi?
YouTube Analytics API responses use a columnHeaders and rows array structure. Use select expand(rows) in Cloud9QL to convert to flat tabular rows, then reference columns by position: rows[0], rows[1], etc.
Ready to connect your YouTube channel to Knowi? Read the YouTube connector documentation to get started, or schedule a demo to see it in action with your channel data.