Knowi enables visualization, analysis, and reporting automation from your YouTube channel data.
Connect your YouTube account to pull channel analytics, video performance, audience demographics, revenue, and more into Knowi for dashboards and automated reports - no manual exports needed.
Overview
Connect to YouTube using Google OAuth. Knowi requests read-only access to your channel data, analytics, and revenue reports. If your channel is not monetized, you can safely approve - revenue reports will simply show no data.
Connecting
- Log in to Knowi and select "Queries" from the left sidebar.
- Click on the "New Datasource +" button and select YouTube from the list of datasources under Cloud Services.
-
Configure the following details:
a. Datasource Name: Enter a name for your datasource (e.g., "My YouTube Channel")
b. Refresh Token: Click "Authenticate" to connect your YouTube account via Google OAuth. You will be redirected to Google to approve access.
- After selecting your Google account, you may see a warning screen that says "Google hasn't verified this app." This is expected for staging and internal environments. To proceed, click Advanced at the bottom left of the warning screen, then click "Go to Knowi (unsafe)". Review the requested permissions and click Allow to complete the connection.
- After approving, you will be redirected back to Knowi. Click "Save" to finish setting up the datasource.
To revoke access at any time, visit https://myaccount.google.com/permissions.
Report Types
After connecting, select a report type from the dropdown to query your YouTube data.
My Channel
Retrieves your channel profile and aggregate statistics including total views, subscriber count, and video count.
Default Cloud9QL:
select expand(items); select id as channelId, snippet.title as channelTitle, snippet.description as description, snippet.publishedAt as createdAt, statistics.viewCount as totalViews, statistics.subscriberCount as subscribers, statistics.videoCount as videoCount, contentDetails.relatedPlaylists.uploads as uploadsPlaylistId;
Channel Videos
Retrieves the list of videos uploaded to your channel. Requires your uploads playlist ID, which can be found in the My Channel report (uploadsPlaylistId field). Playlist IDs start with UU.
Parameters:
-
Uploads Playlist ID (required) - Your channel's uploads playlist ID (starts with
UU). - Results Per Page (optional) - Number of results per page (1-50, default 25). Knowi handles pagination automatically.
Default Cloud9QL:
select expand(items); select contentDetails.videoId as videoId, snippet.title as title, snippet.description as description, snippet.publishedAt as publishedAt, snippet.thumbnails.default.url as thumbnailUrl, status.privacyStatus as privacyStatus;
Video Details
Retrieves detailed metadata and statistics for specific videos including views, likes, comments, and duration.
Parameters:
-
Video ID(s) (required) - Comma-separated video IDs (up to 50). The video ID is the part after
v=in the YouTube URL.
Default Cloud9QL:
select expand(items); select id as videoId, snippet.title as title, snippet.publishedAt as publishedAt, statistics.viewCount as views, statistics.likeCount as likes, statistics.commentCount as comments, contentDetails.duration as duration, status.privacyStatus as privacyStatus;
Channel Analytics
Retrieves time-series analytics for your channel including views, watch time, likes, comments, shares, and subscriber changes.
Parameters:
-
Start Date (required) - Start date in
YYYY-MM-DDformat. Supports Knowi date tokens, e.g.{$c9_today-30d:yyyy-MM-dd}. -
End Date (required) - End date in
YYYY-MM-DDformat. Supports Knowi date tokens, e.g.{$c9_today:yyyy-MM-dd}. -
Metrics (required) - Comma-separated metrics. Default:
views,estimatedMinutesWatched,averageViewDuration,likes,comments,shares,subscribersGained,subscribersLost. See the full metrics list. -
Dimensions (required) - Comma-separated dimensions (e.g.
day,month,video,country). See the full dimensions list. -
Filters (optional) - Semicolon-separated filters. Example:
video==VIDEO_ID;country==US. -
Sort (optional) - Comma-separated sort fields. Prefix with
-for descending. Example:-views. - Max Results (optional) - Maximum number of rows to return.
Note: Analytics report types require a YouTube channel. Accounts without a channel will receive a 403 Forbidden error.
Default Cloud9QL:
select expand(rows); select col[0] as day, col[1] as views, col[2] as estimatedMinutesWatched, col[3] as averageViewDuration, col[4] as likes, col[5] as comments, col[6] as shares, col[7] as subscribersGained, col[8] as subscribersLost;
Video Analytics
Retrieves analytics for a single video over a date range.
Parameters:
-
Video ID (required) - The YouTube video ID (the part after
v=in the URL). -
Start Date (required), End Date (required) - Date range in
YYYY-MM-DDformat. -
Metrics (required) - Default:
views,estimatedMinutesWatched,averageViewDuration,likes,comments,shares. -
Dimensions (required) - Default:
day. - Sort, Max Results (optional).
Demographics
Retrieves viewer percentage broken down by age group and gender.
Parameters:
- Start Date (required), End Date (required).
-
Filters (optional) - Example:
video==VIDEO_IDorcountry==US.
Default Cloud9QL:
select expand(rows); select col[0] as ageGroup, col[1] as gender, col[2] as viewerPercentage;
Traffic Sources
Retrieves views and watch time broken down by traffic source type (e.g. YouTube Search, External URLs, Related Videos).
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched. -
Filters (optional), Sort (optional) - Default sort:
-views.
Traffic Source Detail
Drills into a specific traffic source type to see the top referring search terms, external URLs, or related videos.
Parameters:
- Source Type (required) - Select from: YouTube Search, External URLs, Related Videos, Playlist Pages, Other YouTube Pages, Channel Pages, Notifications, Subscriber Feed, Embedded Players.
- Start Date (required), End Date (required).
- Max Results (optional) - Default 25, max 200.
Geography
Retrieves views and watch time broken down by country.
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched,averageViewDuration. - Filters (optional), Sort (optional).
US States / Provinces
Retrieves views and watch time broken down by US state (returns ISO 3166-2 codes, e.g. US-CA, US-NY).
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched,averageViewDuration. - Sort (optional).
Device Types
Retrieves views and watch time broken down by device type and operating system.
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched. - Filters (optional), Sort (optional).
Playback Locations
Retrieves views and watch time broken down by where content was watched (e.g. YouTube watch page, embedded player, YouTube search results).
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched. - Filters (optional), Sort (optional).
Audience Retention
Retrieves the audience retention curve for a specific video, showing the ratio of viewers still watching at each point in the video.
Parameters:
- Video ID (required) - The video to analyze.
- Start Date (required) - Default: last 90 days.
- End Date (required).
Default Cloud9QL:
select expand(rows); select col[0] as elapsedVideoTimeRatio, col[1] as audienceWatchRatio, col[2] as relativeRetentionPerformance;
Content Type (Shorts vs Videos vs Live)
Retrieves analytics broken down by content type: SHORTS, VIDEO_ON_DEMAND, or LIVE_STREAM.
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
views,estimatedMinutesWatched,averageViewDuration,likes,shares,subscribersGained. - Filters (optional), Sort (optional).
Sharing Services
Retrieves share counts broken down by the platform where content was shared (e.g. Twitter, Facebook, email).
Parameters:
- Start Date (required), End Date (required).
-
Filters (optional), Sort (optional) - Default sort:
-shares.
Playlists
Retrieves all playlists on your channel including title, video count, and privacy status.
Parameters:
- Results Per Page (optional) - Default 25. Knowi handles pagination automatically.
Revenue
Retrieves monetization data including estimated revenue, ad revenue, CPM, ad impressions, and monetized playbacks.
Parameters:
- Start Date (required), End Date (required).
-
Metrics (required) - Default:
estimatedRevenue,estimatedAdRevenue,grossRevenue,cpm,adImpressions,monetizedPlaybacks. -
Dimensions (required) - Default:
day. - Filters (optional), Sort (optional).
Note: Revenue data is only available for channels in the YouTube Partner Program (monetized channels). Non-monetized channels will receive empty results.
Custom Analytics Query
For advanced users who need full control over the YouTube Analytics API. Specify any combination of metrics, dimensions, filters, and sort fields.
Parameters:
- Start Date (required), End Date (required).
- Metrics (required) - See full metrics reference.
- Dimensions (optional) - See full dimensions reference.
- Filters (optional), Sort (optional), Max Results (optional).
Custom Data API Query
For advanced users who need to access any YouTube Data API v3 resource not covered by the predefined report types.
Parameters:
-
Resource (required) - YouTube Data API v3 resource name (e.g.
channels,videos,search,playlists,playlistItems,subscriptions,commentThreads). See the API reference. -
Query Parameters (required) - URL query parameters without the leading
?. Example:part=snippet,statistics&mine=true.
Querying
YouTube Analytics API responses return a columnHeaders[] array and a rows[][] array. Use select expand(rows) to flatten rows, then reference columns positionally with col[0], col[1], etc.
YouTube Data API v3 responses (My Channel, Channel Videos, Video Details, Playlists) use an items[] array. Use select expand(items) to flatten, then reference nested fields with dot notation.
Common transformations:
- Flatten rows:
select expand(rows); - Map columns:
select col[0] as day, col[1] as views; - Flatten items:
select expand(items); - Filter by metric:
select * where views > 1000; - Aggregate:
select country, sum(views) group by country order by sum(views) desc;
Scheduling
Once your query is configured, schedule it to run automatically (e.g. daily) to keep your dashboards current. Knowi handles pagination automatically for paginated report types.
Notes
- The Google OAuth refresh token does not expire as long as your Knowi connection remains active. No manual token refresh is needed.
- All analytics report types (Channel Analytics, Video Analytics, Demographics, etc.) require an active YouTube channel. Accounts without a channel will receive a 403 Forbidden error.
- Revenue report types are only available for channels enrolled in the YouTube Partner Program.
- YouTube Analytics API data typically has a 2-3 day processing delay. Today's data may be incomplete.
- Date range limits: The YouTube Analytics API supports data from June 2008 onward.