N8N Tools - YouTube Enhanced
Actions83
- Videos Actions
- Channels Actions
- Playlists Actions
- Search Actions
- Analytics Actions
- Get Channel Analytics
- Get Video Analytics
- Get Playlist Analytics
- Get Content Owner Analytics
- Get Audience Retention
- Get Demographics
- Get Geographic Data
- Get Device Data
- Get Traffic Source Data
- Get Revenue Data
- Get Ad Performance Data
- Get Subscriber Analytics
- Get Playback Location Data
- Get Video Performance Data
- Get Playlist Performance Data
- Get Annotation Performance Data
- Get Card Performance Data
- Get Sharing Service Data
- Get Live Streaming Data
- Get Content Type Data
- Get Time Based Data
- Comments Actions
- Subscriptions Actions
- Live Streaming Actions
- Video Upload Actions
- Community Posts Actions
- Thumbnails Actions
- Captions Actions
- Channel Memberships Actions
- Super Chat & Thanks Actions
Overview
This node provides enhanced integration with YouTube's Data API v3 and Analytics API, allowing users to retrieve detailed analytics data about their YouTube channels, videos, playlists, and content owners. Specifically, the "Get Demographics" operation under the "Analytics" resource fetches demographic information for a specified YouTube channel over a defined date range. This includes metrics such as views broken down by age group and gender.
Use cases include:
- Understanding the audience composition of a YouTube channel.
- Tailoring content strategy based on viewer demographics.
- Reporting and monitoring changes in audience makeup over time.
For example, a content creator can use this node to get demographic insights (age and gender distribution) for their channel between two dates to optimize future video topics or advertising strategies.
Properties
| Name | Meaning |
|---|---|
| Channel ID | The unique identifier of the YouTube channel for which to retrieve demographic analytics data. |
| Start Date | The start date for the analytics data range (inclusive). |
| End Date | The end date for the analytics data range (inclusive). |
| Metrics | The specific metrics to include in the report. Options include: Views, Estimated Minutes Watched, Average View Duration, Subscribers, Likes, Comments, Shares, Estimated Revenue, CPM, Impressions, and many more. For demographics, relevant metrics typically include views and subscribers. |
| Max Results | Maximum number of results to return (default 100, min 1, max 1000). |
| Start Index | The index of the first result to return (default 1). |
Output
The output is a JSON object containing the requested demographic analytics data for the specified channel and date range. The structure typically includes:
- Breakdown of metrics by demographic categories such as age groups and gender.
- Time series or aggregated values depending on the query parameters.
- Numeric values representing counts or rates for each metric.
No binary data is output by this operation.
Example output snippet (conceptual):
{
"ageGroup": {
"18-24": 12345,
"25-34": 23456,
...
},
"gender": {
"male": 34567,
"female": 45678
},
"metrics": {
"views": 78901,
"subscribersGained": 1234
}
}
Dependencies
- Requires an active subscription and valid API key credential for the external N8N Tools API service.
- Requires OAuth2 credentials for YouTube API access.
- The node internally uses helper classes that wrap YouTube API endpoints for analytics.
- No additional environment variables are explicitly required beyond standard n8n credential setup.
Troubleshooting
- Invalid subscription or API key error: If you receive errors indicating invalid subscription or API key, verify your API key and subscription status with the external N8N Tools API provider.
- Permission errors from YouTube API: Ensure the OAuth2 credentials have sufficient permissions/scopes to access YouTube Analytics data.
- Empty or incomplete data: Check that the date range is valid and that the channel has sufficient data for the requested metrics.
- Max Results limits: The API enforces a maximum number of results; requesting too many may cause errors or truncation.
- Network or timeout issues: These can occur if the external API is unreachable; retry or check network connectivity.
Links and References
- YouTube Analytics API Documentation
- YouTube Data API v3
- N8N Documentation - Creating Custom Nodes
- N8N Tools API Service (for subscription and API key management)