What is the YouTube Analytics API?
The YouTube Analytics API lets your application retrieve viewing statistics, popularity metrics, and demographic information for YouTube videos and channels. Content owners who participate in the YouTube Partner Program can also use the API to retrieve reports that aggregate Analytics data for all YouTube channels that are linked to their content owner account. The API returns data collected from several sources, including the YouTube website, mobile applications, and embedded players.
The list below suggests several ways to use the API in your application:
- Build custom dashboards or reports to display YouTube Analytics data.
- Automate complex reporting tasks.
- Integrate YouTube Analytics data with other business applications.
- Build mobile applications that integrate YouTube Analytics data.
The API structures data using these core concepts:
- Metrics are individual measurements of user activity, such as video views or ratings (likes and dislikes).
- Dimensions are common criteria that are used to aggregate data, such as the date on which the user activity occurred or the country where the users were located.
- Filters are dimension values that specify the data that will be retrieved. For example, you could retrieve data for a specific country, a specific video, or a group of videos.
Each API request retrieves data for a particular YouTube channel or content owner. Your application can specify the metrics you want to retrieve, the dimensions to use to aggregate data, and the filters to identify the specific set of data to retrieve. The API can return responses in CSV format or as JSON objects that contain the results in a tabular format.
YouTube users can also use the YouTube Analytics graphical interface at www.youtube.com/analytics.
How do I find out more?
Check out the sample requests page. Each sample includes a brief description of the report being retrieved and links to the APIs Explorer, letting you retrieve the data for your own content.
Learn about YouTube Analytics groups, which let you aggregate reporting data for collections of channels, videos, playlists, or assets.