Sample API Requests

This page shows sample YouTube Analytics API requests. Each example briefly describes the report being retrieved and then shows the corresponding dimensions, metrics, filters, and sort parameter values. (The channel reports and content owner reports documents identify the reports that the API supports.)

Each example links to and populates the Google APIs Explorer with the values shown. The examples also use default start and end dates (YYYY-MM-DD) of 2023-01-01 and 2023-06-30.

After linking to the APIs Explorer, you must still specify the channel or content owner for which you are retrieving reports. The APIs Explorer will populate the ids parameter value with either channel==MINE or contentOwner==CONTENT_OWNER_ID, depending on the query that you have clicked. For channel reports, you could change MINE to the authenticated user's channel ID. For content owner reports, you need to replace CONTENT_OWNER_ID with your content owner ID.

You also have to be authenticated as the specified channel or content owner so that the APIs Explorer can authorize your API requests using OAuth 2.0.

  1. Sorting requests by multiple dimensions/metrics
  2. Channel reports
  3. Content owner reports

Sorting requests by multiple dimensions/metrics

The API supports the ability to sort response data using multiple dimensions or metrics. For example, the request below retrieves daily traffic source data for a particular channel's videos. Each row in the result set identifies the number of views and the estimated watch time that originated from a particular type of traffic source (e.g. EXT_URL) on a particular day.

dimensions=day,insightTrafficSourceType
metrics=views,estimatedWatchTime
sort=day,-views

In the response, results are sorted chronologically. Within the set of results for each day, results are sorted in descending order by view count. So, the first row in the result set contains data for the traffic source that generated the most views on the first day in the requested date range. The second row contains data for the traffic source that generated the next highest number of views on the first day.

Channel reports

Basic stats

Video reports

Total view counts, estimated watch time, and more for a channel

This query retrieves aggregated metrics for the channel's content. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,estimatedMinutesWatched,averageViewDuration

Country-specific view counts (and more) for a channel

This query retrieves metrics for a specific country for a channel's videos. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,estimatedMinutesWatched
filters=country==US

Top 10 – Most watched videos for a channel

This query retrieves a channel's 10 most watched videos, as measured by estimated minutes watched during the specified date range. Results are sorted by estimated minutes watched in descending order.

Note: This report requires you to specify a value for the sort request parameter and to set the maxResults parameter to an integer value of 10 or less.

dimensions=video
metrics=estimatedMinutesWatched,views,likes,subscribersGained
maxResults=10
sort=-estimatedMinutesWatched

Top 10 – Annotation click-through rates for a channel's most viewed videos

This request retrieves view counts, annotation click-through rates, annotation close rates, and annotation impressions for the channel's 10 most viewed videos. Results are sorted by view count in descending order, which means that the most viewed video will be listed first.

Note: This report requires you to specify a value for the sort request parameter and to set the maxResults parameter to an integer value of 10 or less.

dimensions=video
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
maxResults=10
sort=-views

Playlist reports

Total playlist views for a channel

This request retrieves total playlist starts, estimated minutes watched, views (an aggregated video metric), playlist views (an in-playlist metric), and views per playlist start for playlists in the authenticated user's channel.

metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews,viewsPerPlaylistStart

Statistics for a specific playlist

This request retrieves total playlist starts, estimated minutes watched, views (an aggregated video metric), playlist views (an in-playlist metric), and views per playlist start for a specific playlist. Note that to run this query in the APIs Explorer, you must replace the string PLAYLIST_ID in the filters parameter value with the playlist ID for a playlist in the authenticated user's channel.

metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews,viewsPerPlaylistStart
filters=playlist==PLAYLIST_ID

To retrieve aggregate statistics for multiple playlists, you can also replace the string PLAYLIST_ID with a comma-separated list of up to 500 playlists IDs for playlists in the authenticated user's channel.

Top 10 – Most watched playlists for a channel

This query retrieves a channel's 10 most watched playlists, as measured by estimated minutes watched during the specified date range. It also retrieves several other playlist metrics, such as the number of times that viewers initiated playback of each playlist and the average amount of time that a viewer watched videos in the playlist after it was started. Results are sorted by estimated minutes watched in descending order.

Note: Since this report uses the playlist dimension, you must specify a value for the sort request parameter and also set the maxResults parameter to an integer value of 10 or less.

dimensions=playlist
metrics=views,estimatedMinutesWatched,playlistStarts,averageTimeInPlaylist
filters=isCurated==1
maxResults=10
sort=-estimatedMinutesWatched
Time-based

Video reports

Daily watch time metrics for a channel's videos

This query retrieves daily view counts, watch time metrics, and new subscriber counts for a channel's videos. The report returns one row of data for each day in the requested date range. Rows are sorted in chronological order.

dimensions=day
metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=day

Daily annotation metrics for a channel's videos

This request retrieves daily view counts, annotation click-through rates, annotation close rates, and annotation impressions for the channel's content. Results are sorted in chronological order.

dimensions=day
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
sort=day

Playlist reports

Daily playlist views for a channel

This request retrieves daily view counts (an aggregated video metric), playlist views (an in-playlist metric), playlist starts, estimated minutes watched, and views per playlist start for the authenticated user's channel. Results are sorted in chronological order.

dimensions=day
metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews,viewsPerPlaylistStart
sort=day
Geographic

Video reports

Country-specific watch time metrics for a channel's videos

This query retrieves country-specific view counts, watch time metrics, and subscription figures for a channel's videos. The report returns one row of data for each country where the channel's videos were watched. Rows are sorted in descending order of number of minutes watched.

dimensions=country
metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=-estimatedMinutesWatched

Country-specific annotation metrics for a channel's videos

This request retrieves country-specific view counts, annotation click-through rates, annotation close rates, and annotation impressions for the channel's videos. Results are sorted by annotation click-through rate in descending order, which means that the country with the highest annotation click-through rate will be listed first.

dimensions=country
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
sort=-annotationClickThroughRate

Province-specific metrics for U.S. states and Washington D.C.

This request retrieves a province-by-province breakdown of view counts, estimated minutes watched, and average view duration for the channel's videos. The data covers U.S. states and Washington D.C. Results are sorted alphabetically by provinces' ISO 3166-2 codes.

dimensions=province
metrics=views,estimatedMinutesWatched,averageViewDuration
filters=claimedStatus==claimed;country==US
sort=province

Top 10 – Most viewed videos in a specific country

This query retrieves the channel's 10 most viewed videos, as measured by number of views during the specified date range, in a specified country. Results are sorted by view count in descending order.

Note: This report requires you to specify a value for the sort request parameter and to set the maxResults parameter to an integer value of 10 or less.

dimensions=video
metrics=views,estimatedMinutesWatched,likes,subscribersGained
filters=country==US
maxResults=10
sort=-views

Top 10 U.S. cities by total views

This query retrieves a list of the 10 U.S. cities that accounted for the most views of the channel's content during the specified date range. The query could be modified to request data for another country by choosing another valid value for that filter. Similarly, the query could be modified to retrieve data for a subcontinent, such as Western Europe or Southeastern Asia, by using the subContinent filter and one of its valid values. Other filters are supported, too. Results are sorted by view count in descending order.

    dimensions=city
metrics=views
filters=country==US
maxResults=10
sort=-views

Top 10 U.S. cities by total views for each content type

This query retrieves a list of the 10 U.S. cities that accounted for the most views of the channel's content during the specified date range for each supported creatorContentType. Results are sorted by view count in descending order.

    dimensions=city,creatorContentType
metrics=views
filters=country==US
maxResults=10
sort=-views

Top 10 U.S. cities by total watch time

This query retrieves a list of the top 10 days during the specified date range when any U.S. city accounted for the greatest total daily watch time of the channel's content. The query results identify the total watch time, the date on which the watch time occurred, and the city where the content was estimated to have been viewed. Results are sorted in descending order of total watch time.

    dimensions=city,day
metrics=estimatedWatchTime
filters=country==US
maxResults=10
sort=-estimatedWatchTime

Top 10 – Most viewed videos in Europe

This query retrieves the channel's 10 most viewed videos in Europe, as measured by number of views during the specified date range. The query could be modified to request data for another continent by choosing another valid value for that filter. Similarly, the query could be modified to retrieve data for a subcontinent, such as Western Europe or Southeastern Asia, by using the subContinent filter and one of its valid values. Results are sorted by view count in descending order.

Note: This report requires you to specify a value for the sort request parameter and to set the maxResults parameter to an integer value of 10 or less.

dimensions=video
metrics=views,estimatedMinutesWatched,likes,subscribersGained
filters=continent==150
maxResults=10
sort=-views

Playlist reports

Country-specific watch time metrics for a channel's playlists

This query retrieves country-specific view counts (an aggregated video metric), playlist views (an in-playlist metric), and watch time metrics for a channel's playlists. The report returns one row of data for each country where the channel's playlists were watched. Rows are sorted in descending order of number of minutes watched.

dimensions=country
metrics=views,estimatedMinutesWatched,playlistStarts,averageTimeInPlaylist
sort=-estimatedMinutesWatched

Top 10 – Most started playlists in the United States

This query retrieves the 10 playlists that viewers in the United States started watching most frequently during the specified date range. Results are sorted by number of playlist starts in descending order.

Note: Since this report uses the playlist dimension, you must specify a value for the sort request parameter and also set the maxResults parameter to an integer value of 10 or less.

dimensions=playlist
metrics=playlistStarts,views,estimatedMinutesWatched,averageViewDuration
filters=isCurated==1;country==US
maxResults=10
sort=-playlistStarts
Playback location

Video reports

Viewcounts and watch time from different playback locations

This query retrieves the number of views and estimated watch time for a particular channel's videos. Results are aggregated based on the type of page or application where video playbacks occurred, and results are sorted in descending order by view count.

dimensions=insightPlaybackLocationType
metrics=estimatedMinutesWatched,views
sort=-views

Daily view counts and watch time from different playback locations

This query retrieves daily view counts and estimated watch time in the United States for a particular channel's videos. Results are grouped by day for each type of page or application where video playbacks occurred. Results are sorted in chronological order.

dimensions=day,insightPlaybackLocationType
metrics=estimatedMinutesWatched,views
filters=country==US
sort=day

Top 10 – Third-party sites that generate the most views for an embedded video

This query retrieves view counts and estimated watch time for a particular video or group of videos. Results are grouped by the third-party site where the video was embedded. Results are sorted in descending order by view count. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of one or more video IDs for your uploaded videos.

dimensions=insightPlaybackLocationDetail
metrics=views,estimatedMinutesWatched
filters=video==VIDEO_ID;insightPlaybackLocationType==EMBEDDED
maxResults=10
sort=-views

Playlist reports

Playlist view counts and watch time from different playback locations

This query retrieves the number of view counts (an aggregated video metric), playlist views (an in-playlist metric), estimated watch time, and playlist starts for a particular channel's playlists. Results are aggregated based on the type of page or application where video playbacks occurred, and results are sorted in descending order by playlist starts.

dimensions=insightPlaybackLocationType
metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews
sort=-playlistStarts

Daily playlist view counts and watch time from different playback locations

This query retrieves daily playlist starts, view counts (an aggregated video metric), playlist views (an in-playlist metric), and estimated watch time in the United States for a particular channel's playlists. Results are grouped by day for each type of page or application where playlist views occurred. Results are sorted in chronological order.

dimensions=day,insightPlaybackLocationType
metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews
filters=country==US
sort=day
Traffic source

Video reports

Viewcounts and watch time from different traffic sources in a country

This request retrieves the number of views and estimated watch time for the channel's videos in a specified country. The metrics are aggregated by traffic source, which describes the manner in which users reached the video.

dimensions=insightTrafficSourceType
metrics=views,estimatedMinutesWatched
filters=country==US

Daily view counts and watch time from different traffic sources

This request retrieves daily view counts and daily estimated watch time for the channel's videos. The metrics are aggregated on a daily basis by traffic source and sorted in chronological order.

dimensions=day,insightTrafficSourceType
metrics=views,estimatedMinutesWatched
sort=day

Top 10 – YouTube search terms that generate the most traffic for a video

This query retrieves the 10 search terms that generated the most views from YouTube search results for one or more specific videos. Results are sorted by view count in descending order. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of up to 500 video IDs.

For example, you could run the query for a single video or replace VIDEO_ID to identify the search terms that generate the most traffic for that video. You could also list all of the videos in a particular playlist to determine which search terms generate the most traffic for any of the videos in that playlist.

dimensions=insightTrafficSourceDetail
metrics=views
filters=video==VIDEO_ID;insightTrafficSourceType==YT_SEARCH
maxResults=10
sort=-views

Top 10 – External websites that generate the most traffic for a video

This query retrieves the 10 external websites that generated the most views for a specific video or group of videos. Results are sorted by estimated watch time in descending order. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of up to 500 video IDs for your uploaded videos.

dimensions=insightTrafficSourceDetail
metrics=estimatedMinutesWatched,views
filters=video==VIDEO_ID;insightTrafficSourceType==EXT_URL
maxResults=25
sort=-estimatedMinutesWatched

Playlist reports

Playlist view counts and watch time from different traffic sources in a country

This request retrieves the number of views (an aggregated video metric), playlist views (an in-playlist metric), playlist starts, and estimated watch time for playlist views in a specified country. The metrics are aggregated by traffic source, which describes the manner in which users reached the playlist.

dimensions=insightTrafficSourceType
metrics=views,estimatedMinutesWatchedplaylistStarts,playlistViews
filters=country==US

Daily playlist view counts and watch time from different traffic sources

This request retrieves a channel's daily playlist views (an in-playlist metric), playlist starts, and estimated watch time. It also retrieves total views (an aggregated video metric). The metrics are aggregated on a daily basis by traffic source and sorted in chronological order.

dimensions=day,insightTrafficSourceType
metrics=views,estimatedMinutesWatched,playlistStarts,playlistViews
sort=day
Device/OS

Video reports

Daily device type metrics for the Android operating system

This query retrieves daily view counts and estimated watch time on Android devices for a particular channel's videos. Results are grouped by day for each type of device where video playbacks occurred. Results are sorted in chronological order.

dimensions=day,deviceType
metrics=estimatedMinutesWatched,views
filters=operatingSystem==ANDROID
sort=day

Daily operating system metrics for mobile devices

This query retrieves daily view counts and estimated watch time on mobile devices for a particular channel's videos. Results are grouped by day for each operating system on which video playbacks occurred. Results are sorted in chronological order.

dimensions=day,operatingSystem
metrics=estimatedMinutesWatched,views
filters=deviceType==MOBILE
sort=day

Daily operating system and device type metrics

This query retrieves daily view counts and estimated watch time for a channel. Statistics are grouped by operating system and device type. Results are sorted in chronological order.

dimensions=day,operatingSystem,deviceType
metrics=estimatedMinutesWatched,views
sort=day

Playlist reports

Daily device type metrics for playlist views on the Android operating system

This query retrieves daily views (an aggregated video metric), playlist views (an in-playlist metric), and estimated watch time on Android devices for a particular channel's playlists. Results are grouped by day for each type of device where playlist views occurred. Results are sorted in chronological order.

dimensions=day,deviceType
metrics=views,estimatedMinutesWatched,playlistViews
filters=operatingSystem==ANDROID
sort=day

Daily operating system metrics for playlist views on mobile devices

This query retrieves daily views (an aggregated video metric), playlist views (an in-playlist metric), and estimated watch time on mobile devices for a particular channel's playlists. Results are grouped by day for each operating system on which playlist views occurred. Results are sorted in chronological order.

dimensions=day,operatingSystem
metrics=views,estimatedMinutesWatched
filters=deviceType==MOBILE
sort=day
Demographic

Video reports

Viewer demographics in California (age group and gender)

This report retrieves statistics about the age group and gender of viewers in California who watched the channel's videos. Results are sorted by gender and then by age group. This query could be modified to retrieve the same statistics for all viewers worldwide or all viewers in a country, continent, subcontinent, or another U.S. state by adjusting the filters parameter value.

dimensions=ageGroup,gender
metrics=viewerPercentage
filters=province==US-CA
sort=gender,ageGroup

Playlist reports

Playlist viewer demographics in California (age group and gender)

This report retrieves statistics about the age group and gender of viewers in California who watched the channel's playlists. Results are sorted by gender and then by age group. This query could be modified to retrieve the same statistics for all viewers worldwide or all viewers in a country, continent, subcontinent, or another U.S. state by adjusting the filters parameter value.

dimensions=ageGroup,gender
metrics=viewerPercentage
filters=province==US-CA
sort=gender,ageGroup
Social

Sharing metrics, aggregated by service where videos were shared

This request retrieves the number of times that users used the Share button to share a channel's videos. Results are aggregated by sharing service (Google+, Twitter, etc.) and sorted in descending order of number of shares.

dimensions=sharingService
metrics=shares
sort=-shares
Audience retention

Audience retention metrics for a video

This report measures a video's ability to retain its audience. The report can only be retrieved for a single video at a time. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with the video ID for one of your uploaded videos. Note that audience retention reports do not support the ability to specify multiple values for the video filter.

In this example, the report uses the audienceType filter to restrict the response so that it only contains data for organic views, which are the result of a direct user action, such as a search for a video or a click on a suggested video. As such, the report does not include data for views from TrueView in-stream or TrueView in-display ads. You can remove the filter to retrieve the video's audience retention data from all audience types.

Note that data for the audienceType filter is available as of September 25, 2013. The API will not return data for queries that use the filter to try to retrieve data from earlier dates. Queries that do not use the filter work for any date after July 1, 2008.

dimensions=elapsedVideoTimeRatio
metrics=audienceWatchRatio,relativeRetentionPerformance
filters=video==VIDEO_ID;audienceType==ORGANIC
Revenue/Ads

Channel revenue and ad performance metrics

This request retrieves a channel's revenue and ad performance metrics. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks

Daily revenue and ad performance metrics

This request retrieves a channel's daily revenue and ad performance metrics.

dimensions=day
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks

Country-specific revenue and ad performance metrics

This request retrieves a channel's country-specific revenue and ad performance metrics. Results are sorted in descending order by revenue amount, which means that the first country listed will be the one where the partner had the greatest net revenue.

dimensions=country
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
sort=-estimatedRevenue

Top 10 – Videos with the highest revenue

This request retrieves revenue and ad performance metrics for the channel's 10 videos with the greatest revenue. Results are sorted in descending order by revenue amount, which means that the first video will be the one that had the highest estimated revenue.

dimensions=video
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
maxResults=10
sort=-estimatedRevenue

Ad performance metrics for different ad types

This request retrieves ad performance metrics for the content owner's claimed content. Results are grouped by ad type, which enables you to compare revenue and CPM values across different ad types.

dimensions=adType
metrics=grossRevenue,adImpressions,cpm
filters=claimedStatus==claimed
sort=-adType

Content owner reports

Basic stats

Video reports

Total view counts, estimated watch time, and more for all claimed content

This query retrieves aggregated metrics for the content owner's claimed content. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,estimatedMinutesWatched,averageViewDuration
filters=claimedStatus==claimed

Country-specific view counts (and more) for all self-uploaded videos

This query retrieves metrics for a specific country for videos that the content owner uploaded. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,shares
filters=uploaderType==self;country==FR

Total view counts (and more) for all claimed third-party content

This query retrieves aggregated metrics for videos that the content owner claimed but did not upload. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,shares
filters=uploaderType==thirdParty;claimedStatus==claimed

Total view counts (and more) for all self-uploaded content

This query retrieves aggregated metrics for videos that the content owner uploaded. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,estimatedMinutesWatched
filters=uploaderType==self

Total view counts (and more) for all claimed, self-uploaded content

This query retrieves aggregated metrics for videos that the content owner uploaded and also claimed. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,comments,likes,dislikes,estimatedMinutesWatched
filters=uploaderType==self;claimedStatus==claimed

Top 10 – Most viewed videos for a content owner

This query retrieves the 10 most viewed videos, as measured by number of views during the specified date range, that the content owner uploaded. Results are sorted by view count in descending order.

dimensions=video
metrics=views,estimatedMinutesWatched,estimatedRevenue,estimatedAdRevenue,monetizedPlaybacks,adImpressions
filters=uploaderType==self
maxResults=10
sort=-views

Top 10 – Most watched videos for a content owner

This query retrieves the 10 most watched videos, as measured by estimated minutes watched during the specified date range, that the content owner uploaded. Results are sorted by estimated minutes watched in descending order.

dimensions=video
metrics=estimatedMinutesWatched,averageViewDuration,averageViewPercentage,views,subscribersGained
filters=uploaderType==self
maxResults=10
sort=-estimatedMinutesWatched

Top 10 – Most viewed videos for a content owner's channel

This query retrieves the 10 most viewed videos for a specific channel or group of channels that the content owner manages. Results are sorted by view count in descending order. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=video
metrics=views
filters=channel==CHANNEL_ID
maxResults=10
sort=-views

Top 10 – Annotation click-through rates for a channel's most viewed videos

This request retrieves view counts, annotation click-through rates, annotation close rates, and annotation impressions for the 10 most viewed videos in a specified channel or group of channels. Results are sorted by view count in descending order, which means that the most viewed video will be listed first. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=video
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
filters=channel==CHANNEL_ID
maxResults=10
sort=-views

Playlist reports

Playlist views for a content owner's channels

This request retrieves total playlist starts, estimated minutes watched, views, and views per playlist start for playlists in the content owner's channels. The views metric only counts video views that occurred in the context of a playlist.

metrics=views,playlistStarts,estimatedMinutesWatched,viewsPerPlaylistStart
filters=isCurated=1

Playlist views for a particular channel

This request retrieves total playlist starts, estimated minutes watched, views, and views per playlist start for playlists in the content owner's channels. The views metric only counts video views that occurred in the context of a playlist. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

metrics=views,playlistStarts,estimatedMinutesWatched,viewsPerPlaylistStart
filters=isCurated=1;channel==CHANNEL_ID

Statistics for a playlist

This request retrieves total playlist starts, estimated minutes watched, views, and views per playlist start for a specific playlist. The views metric only counts video views that occurred in the context of a playlist. Note that to run this query in the APIs Explorer, you must replace the string PLAYLIST_ID in the filters parameter value with the playlist ID for a playlist in one of the content owner's channels.

metrics=views,playlistStarts,estimatedMinutesWatched,viewsPerPlaylistStart
filters=isCurated=1;playlist==PLAYLIST_ID

To retrieve aggregate statistics for multiple playlists, you can also replace the string PLAYLIST_ID with a comma-separated list of up to 500 playlists IDs for playlists in the content owner's channels.

Top 10 – Most watched playlists for a content owner

This query retrieves a content owner's 10 most watched playlists, as measured by estimated minutes watched during the specified date range. It also retrieves several other playlist metrics, such as the number of times that viewers initiated playback of each playlist and the average amount of time that a viewer watched videos in the playlist after it was started. Results are sorted by estimated minutes watched in descending order.

Note: Since this report uses the playlist dimension, you must specify a value for the sort request parameter and also set the maxResults parameter to an integer value of 10 or less.

dimensions=playlist
metrics=estimatedMinutesWatched,views,playlistStarts,averageTimeInPlaylist
filters=isCurated==1
maxResults=10
sort=-estimatedMinutesWatched
Time-based

Video reports

Daily watch time metrics for self-uploaded content

This query retrieves daily watch time metrics, as well as view counts, monetized playback counts, and impression counts for videos that the content owner uploaded. The report returns one row of data for each day in the requested date range, and rows are sorted in chronological order.

dimensions=day
metrics=estimatedMinutesWatched,averageViewPercentage,views,monetizedPlaybacks,adImpressions
filters=uploaderType==self
sort=day

Annotation metrics for claimed content

This request retrieves daily view counts, annotation click-through rates, annotation close rates, and annotation impressions for the content owner's claimed content. Results are sorted in chronological order.

dimensions=day
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
filters=claimedStatus==claimed
sort=day

Playlist reports

Daily playlist views for a content owner

This request retrieves daily view counts, playlist starts, estimated minutes watched, and views per playlist start for all playlists in the content owner's channels. Results are sorted in chronological order.

dimensions=day
metrics=views,playlistStarts,estimatedMinutesWatched,viewsPerPlaylistStart
filters=isCurated=1
sort=day
Geographic

Video reports

Country-specific watch time metrics for self-uploaded content

This query retrieves view counts, watch time metrics, and estimated ad revenue for each country. The metrics are for videos that the content owner uploaded. The report returns one row of data for each country where the videos were watched, and rows are sorted in descending order of number of minutes watched.

dimensions=country
metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,estimatedRevenue,estimatedAdRevenue,grossRevenue
filters=uploaderType==self
sort=-estimatedMinutesWatched

Country-specific annotation metrics for self-uploaded content

This request retrieves country-specific view counts, annotation click-through rates, annotation close rates, and annotation impressions for the content owner's uploaded videos. Results are sorted by annotation click-through rate in descending order, which means that the country with the highest annotation click-through rate will be listed first.

dimensions=country
metrics=views,likes,annotationClickThroughRate,annotationCloseRate,annotationImpressions
filters=uploaderType==self
sort=-annotationClickThroughRate

Province-specific metrics for U.S. states and Washington D.C.

This request retrieves a province-by-province breakdown of view counts, estimated minutes watched, and average view duration for the content owner's claimed videos. The data covers U.S. states and Washington D.C. Results are sorted alphabetically by provinces' ISO 3166-2 codes.

dimensions=province
metrics=views,estimatedMinutesWatched,averageViewDuration
filters=claimedStatus==claimed;country==US
sort=province

Top 10 U.S. cities by total views

This query retrieves a list of the 10 U.S. cities that accounted for the most views of the content owner's claimed videos during the specified date range. The query could be modified to request data for another country by choosing another valid value for that filter. Similarly, the query could be modified to retrieve data for a subcontinent, such as Western Europe or Southeastern Asia, by using the subContinent filter and one of its valid values. Other filters are supported, too. Results are sorted by view count in descending order.

    dimensions=city
metrics=views
filters=claimedStatus==claimed;country==US
maxResults=10
sort=-views

Top 10 U.S. cities by total views for each content type

This query retrieves a list of the 10 U.S. cities that accounted for the most views of the content owner's claimed content during the specified date range for each supported creatorContentType. Results are sorted by view count in descending order.

    dimensions=city,creatorContentType
metrics=views
filters=claimedStatus==claimed;country==US
maxResults=10
sort=-views

Top 10 U.S. cities by total watch time

This query retrieves a list of the top 10 days during the specified date range when any U.S. city accounted for the greatest total daily watch time of the content owner's claimed content. The query results identify the total watch time, the date on which the watch time occurred, and the city where the content was estimated to have been viewed. Results are sorted in descending order of total watch time.

    dimensions=city,day
metrics=estimatedWatchTime
filters=claimedStatus==claimed;country==US
maxResults=10
sort=-estimatedWatchTime

Top 10 – Most watched videos in Europe

This query retrieves the 10 most watched videos in Europe, among videos claimed by the content owner, as measured by number of views during the specified date range. The query could be modified to request data for another continent by choosing another valid value for that filter. Similarly, the query could be modified to retrieve data for a subcontinent, such as Western Europe or Southeastern Asia, by using the subContinent filter and one of its valid values. Results are sorted by view count in descending order.

dimensions=video
metrics=views,estimatedMinutesWatched,likes,subscribersGained
filters=claimedStatus==claimed;filters=continent==150
maxResults=10
sort=-estimatedMinutesWatched

Playlist reports

Country-specific watch time metrics for a content owner's playlists

This query retrieves country-specific view counts and watch time metrics for all playlists in the content owner's channels. The report returns one row of data for each country where the playlists were watched. Rows are sorted in descending order of number of minutes watched.

dimensions=country
metrics=views,estimatedMinutesWatched,playlistStarts,averageTimeInPlaylist
filters=isCurated==1
sort=-estimatedMinutesWatched

Top 10 – Most started playlists in the United States

This query retrieves the 10 playlists from the content owner's channels that viewers in the United States started watching most frequently during the specified date range. Results are sorted by number of playlist starts in descending order.

Note: Since this report uses the playlist dimension, you must specify a value for the sort request parameter and also set the maxResults parameter to an integer value of 10 or less.

dimensions=playlist
metrics=playlistStarts,views,estimatedMinutesWatched,averageViewDuration
filters=isCurated==1;country==US
maxResults=10
sort=-playlistStarts
Playback details

Video reports

Likes and dislikes by content type

This query retrieves the number of likes and dislikes for each type of content on a particular channel or group of channels. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=creatorContentType
metrics=likes,dislikes
filters=channel==CHANNEL_ID
Playback location

Video reports

Viewcounts and watch time from different playback locations

This query retrieves the number of views and estimated watch time for videos uploaded to a particular channel or group of channels. Results are aggregated based on the type of page or application where video playbacks occurred, and results are sorted in descending order by view count. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=insightPlaybackLocationType
metrics=estimatedMinutesWatched,views
filters=channel==CHANNEL_ID
sort=-views

Daily view counts and watch time from different playback locations

This query retrieves daily view counts and estimated watch time in the United States for videos uploaded to a particular channel or group of channels. Results are grouped by day for each type of page or application where video playbacks occurred. Results are sorted in reverse chronological order. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=day,insightPlaybackLocationType
metrics=estimatedMinutesWatched,views
filters=country==US;channel==CHANNEL_ID
sort=-day

Top 10 – Third-party sites that generate the most views for an embedded video

This query retrieves view counts and estimated watch time for a particular video or group of videos. Results are grouped by the third-party site where the video was embedded. Results are sorted in descending order by view count. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of up to 500 video IDs for your uploaded videos.

dimensions=insightPlaybackLocationDetail
metrics=views,estimatedMinutesWatched
filters=video==VIDEO_ID;insightPlaybackLocationType==EMBEDDED
maxResults=10
sort=-views

Playlist reports

Playlist view counts and watch time from different playback locations

This query retrieves the number of views, estimated watch time, and playlist starts for all playlists in a content owner's channels. Results are aggregated based on the type of page or application where video playbacks occurred, and results are sorted in descending order by playlist starts.

dimensions=insightPlaybackLocationType
metrics=views,estimatedMinutesWatched,playlistStarts
filters=isCurated==1
sort=-playlistStarts

Daily playlist view counts and watch time from different playback locations

This query retrieves daily playlist starts, view counts, and estimated watch time in the United States for all playlists in a content owner's channels. Results are grouped by day for each type of page or application where playlist views occurred. Results are sorted in chronological order.

dimensions=day,insightPlaybackLocationType
metrics=playlistStarts,views,estimatedMinutesWatched
filters=isCurated==1;country==US
sort=day
Traffic source

Video reports

Viewcounts and watch time from different traffic sources

This request retrieves the number of views and estimated watch time for the content owner's videos. The metrics are aggregated by traffic source, which describes the manner in which users reached the video.

dimensions=insightTrafficSourceType
metrics=views,estimatedMinutesWatched
filters=uploaderType==self

Daily view counts and watch time from different traffic sources

This request retrieves daily view counts and daily estimated watch time for the content owner's videos. The metrics are aggregated on a daily basis by traffic source and sorted in reverse chronological order.

dimensions=day,insightTrafficSourceType
metrics=views,estimatedMinutesWatched
filters=uploaderType==self
sort=-day

Note: The next two sample reports are only supported for specific traffic sources. For example, the NO_LINK_EMBEDDED traffic source does not have additional details and, therefore, these reports are not available for that source. See the insightTrafficSourceType definition for details about the traffic sources for which these types of report are available.

Top 10 – YouTube search terms that generate the most traffic for a video

This query retrieves the 10 search terms that generated the most views from YouTube search results for a specific video or group of videos. Results are sorted by view count in descending order. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of up to 500 video IDs for your uploaded videos.

dimensions=insightTrafficSourceDetail
metrics=views
filters=video==VIDEO_ID;insightTrafficSourceType==YT_SEARCH
maxResults=10
sort=-views

Top 10 – External websites that generate the most traffic for a video

This query retrieves the 10 external websites that generated the most views from Google search results for a specific video or group of videos. Results are sorted by estimated watch time in descending order. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with a comma-separated list of up to 500 video IDs for your uploaded videos.

dimensions=insightTrafficSourceDetail
metrics=estimatedMinutesWatched,views
filters=video==VIDEO_ID;insightTrafficSourceType==EXT_URL
maxResults=25
sort=-estimatedMinutesWatched

Playlist reports

Playlist view counts and watch time from different traffic sources in a country

This request retrieves the number of playlist views, playlist starts, and estimated watch time for playlist views in a specified country. The metrics are aggregated by traffic source, which describes the manner in which users reached the playlist.

dimensions=insightTrafficSourceType
metrics=views,playlistStarts,estimatedMinutesWatched
filters=isCurated==1;country==US

Daily playlist view counts and watch time from different traffic sources

This request retrieves daily playlist views, playlist starts, and estimated watch time for playlists in one or more of a content owner's channels. The metrics are aggregated on a daily basis by traffic source and sorted in chronological order. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=day,insightTrafficSourceType
metrics=views,playlistStarts,estimatedMinutesWatched
filters=isCurated==1;channel==CHANNEL_ID
sort=day
Device/OS

Video reports

Daily device type metrics for claimed videos

This query retrieves daily view counts and estimated watch time by device type for videos claimed by a particular content owner. Results are grouped by day for each type of device where video playbacks occurred. Results are sorted in chronological order.

dimensions=day,deviceType
metrics=estimatedMinutesWatched,views
filters=claimedStatus==claimed
sort=day

Daily operating system metrics for claimed videos viewed on mobile devices

This query retrieves daily view counts and estimated watch time by operating system for views of videos claimed by a specified content owner that took place on mobile devices. Results are grouped by day for each operating system where video playbacks occurred. Results are sorted in chronological order.

dimensions=day,operatingSystem
metrics=estimatedMinutesWatched,views
filters=claimedStatus==claimed;deviceType==MOBILE
sort=day

Daily operating system and device type metrics

This query retrieves daily view counts and estimated watch time for videos claimed by a particular content owner. Statistics are grouped by operating system and device type. Results are sorted in chronological order.

dimensions=day,operatingSystem,deviceType
metrics=estimatedMinutesWatched,views
sort=day

Playlist reports

Daily device type metrics for playlist views on the Android operating system

This query retrieves daily playlist view counts and estimated watch time on Android devices for playlists in one or more of a content owner's channels. Results are grouped by day for each type of device where playlist views occurred. Results are sorted in chronological order. Note that to run this query in the APIs Explorer, you must replace the string CHANNEL_ID in the filters parameter value with a comma-separated list of up to 500 channel IDs for your channels.

dimensions=day,deviceType
metrics=views,estimatedMinutesWatched
filters=isCurated==1;channel==CHANNEL_ID;operatingSystem==ANDROID
sort=day

Daily operating system metrics for playlist views on mobile devices

This query retrieves daily playlist view counts and estimated watch time on mobile devices for playlists in any of a content owner's channels. Results are grouped by day for each operating system on which playlist views occurred. Results are sorted in chronological order.

dimensions=day,operatingSystem
metrics=views,estimatedMinutesWatched
filters=isCurated==1;deviceType==MOBILE
sort=day
Demographic

Video reports

Viewer demographics in California (age group and gender)

This report retrieves statistics about the age group and gender of viewers in California who watched the content owner's claimed content. Results are sorted by gender and then by age group. This query could be modified to retrieve the same statistics for all viewers worldwide or all viewers in a country, continent, subcontinent, or another U.S. state by adjusting the filters parameter value.

dimensions=ageGroup,gender
metrics=viewerPercentage
filters=claimedStatus==claimed;province==US-CA
sort=gender,ageGroup

Playlist reports

Playlist viewer demographics in California (age group and gender)

This report retrieves statistics about the age group and gender of viewers in California who watched the playlists in any of the content owner's channels. Results are sorted by gender and then by age group. This query could be modified to retrieve the same statistics for all viewers worldwide or all viewers in a country, continent, subcontinent, or another U.S. state by adjusting the filters parameter value.

dimensions=ageGroup,gender
metrics=viewerPercentage
filters=isCurated==1;province==US-CA
sort=gender,ageGroup
Audience retention

Audience retention metrics for a video

This report measures a video's ability to retain its audience. The report can only be retrieved for a single video at a time. Note that to run this query in the APIs Explorer, you must replace the string VIDEO_ID in the filters parameter value with the video ID for one of your uploaded videos. Note that audience retention reports do not support the ability to specify multiple values for the video filter.

In this example, the report uses the audienceType filter to restrict the response so that it only contains data for organic views, which are the result of a direct user action, such as a search for a video or a click on a suggested video. As such, the report does not include data for views from TrueView in-stream or TrueView in-display ads. You can remove the filter to retrieve the video's audience retention data from all audience types.

Note that data for the audienceType filter is available as of September 25, 2013. The API will not return data for queries that use the filter to try to retrieve data from earlier dates. Queries that do not use the filter work for any date after July 1, 2008.

dimensions=elapsedVideoTimeRatio
metrics=audienceWatchRatio,relativeRetentionPerformance
filters=video==VIDEO_ID;audienceType==ORGANIC
Revenue/Ads

Revenue and ad performance metrics for claimed content

This request retrieves revenue and ad performance metrics for the content owner's claimed content. The report returns a single row of data that contains totals for each requested metric during the specified date range.

metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
filters=claimedStatus==claimed

Daily revenue and ad performance metrics

This request retrieves daily revenue and ad performance metrics for the content owner's claimed content.

dimensions=day
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
filters=claimedStatus==claimed

Country-specific revenue and ad performance metrics

This request retrieves country-specific revenue and ad performance metrics for the content owner's claimed content. Results are sorted in descending order by revenue amount, which means that the first country listed will be the one where the partner had the greatest estimated revenue.

dimensions=country
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
filters=claimedStatus==claimed
sort=-estimatedRevenue

Top 10 – Videos with the highest revenue

This request retrieves revenue and ad performance metrics for the 10 videos that where claimed by the content owner claimed and that had the highest revenue. Results are sorted in descending order by revenue amount, which means that the first video will be the one that had the highest estimated revenue.

dimensions=video
metrics=views,estimatedRevenue,estimatedAdRevenue,estimatedRedPartnerRevenue,grossRevenue,adImpressions,cpm,playbackBasedCpm,monetizedPlaybacks
filters=claimedStatus==claimed
maxResults=10
sort=-estimatedRevenue

Ad performance metrics for different ad types

This request retrieves ad performance metrics for the content owner's claimed content. Results are grouped by ad type, which enables you to compare revenue and CPM values across different ad types.

dimensions=adType
metrics=grossRevenue,adImpressions,cpm
filters=claimedStatus==claimed
sort=-adType