Nexlev Logo

Docs

Search documentation

Search docs by page title or heading

Channel Analytics

The Channel Analytics API allows you to retrieve detailed analytics data for any YouTube channel, including subscriber counts, video counts, view counts, and more.

Overview

Use this API to fetch comprehensive analytics information for YouTube channels in your n8n workflows. This resource provides three main operations: Get Analytics (basic channel metrics), Get Geography Demographics Revenue (audience insights and revenue data), and Get Short vs Long Views (content format performance comparison).

Quick Start

Get started in 3 simple steps:

  1. Install NexLev: Add the NexLev node to your n8n instance (Installation Guide)
  2. Get API Key: Create your API key at API Key
  3. Make Your First Request:
    • Add NexLev node → Select "Channel Analytic" → Choose "Get Analytics"
    • Enter a Channel ID (e.g., UCX6OQ3DkcsbYNE6H8uQQuVA)
    • Execute to get channel analytics

Example Result: You'll receive comprehensive channel analytics including subscriber count, view count, video count, and detailed channel information.

Endpoint Details

  • Resource: Channel Analytic
  • Operations: Get Analytics | Get Geography Demographics Revenue | Get Short vs Long Views
  • Authentication: Required (API Key)
  • Quota Cost: 🥞 10 quota (Get Analytics) · 🥞 1 quota (Get Short vs Long Views) · 🥞 20 quota (Get Geography Demographics Revenue)

API Reference

Full endpoint details, cURL examples, and response schemas live in the Channel Analytics API reference.

OperationMethod & PathQuota Cost
Get AnalyticsPOST /api/external/analytics/channel-analytics🥞 10
Get Geography Demographics RevenuePOST /api/external/analytics/channel-analytics/geography-revenue🥞 20
Get Short vs Long ViewsGET /api/external/analytics/channel-analytics/:channelId/short-vs-long-views🥞 1

Authentication Required — see Authentication for the required header format and how to get an API key.

Operations Quick Reference

OperationPurposeReturnsBest ForQuota Cost
Get AnalyticsBasic channel metrics and informationSingle objectChannel profiling, growth tracking🥞 10
Get Geography Demographics RevenueAudience insights and revenue estimatesSingle objectMonetization analysis, targeting🥞 20
Get Short vs Long ViewsContent format performance comparisonSingle objectContent strategy optimization🥞 1

Configuration

Parameters

ParameterTypeRequiredDescription
Channel IDstringYesThe unique YouTube channel identifier (e.g., UC9XrHBgOxsNFEBXkLtEqCwA)

Setup Steps

Step 1: Add NexLev Node

  • Add the NexLev node to your workflow
  • See Quickstart Guide for installation instructions

Step 2: Configure Resource

  • Under Resource, select Channel Analytic

Step 3: Select Operation

Choose one of the following operations:

OperationDescription
Get AnalyticsGet basic channel analytics data
Get Geography Demographics RevenueGet detailed demographics, geography, and revenue
Get Short vs Long ViewsGet short and long video view counts

Step 4: Authentication

  • Under Credential to connect with, select your NexLev account
  • If not configured, create one using your API Key

Step 5: Enter Channel ID ✅ Required

  • In the Channel ID field, enter the YouTube channel ID you want to analyze
  • Channel IDs typically start with "UC" followed by 22 characters
Configure channel analytics operation

Execution

Click Execute step to retrieve the channel analytics data.

Available Operations

The Channel Analytics resource provides three different operations to retrieve various types of analytics data:

Get Analytics

Get comprehensive analytics data for a YouTube channel including subscriber count, video count, view count, channel information, social links, upload history, and content metrics.

When to use this operation:

  • Building channel profile dashboards with complete metadata
  • Tracking channel growth metrics over time
  • Comparing multiple channels for competitive analysis
  • Gathering channel information for research databases

Get Geography Demographics Revenue

Get geography, demographics, and revenue data for a YouTube channel including RPM, gender distribution, age distribution, viewership by country, and revenue breakdowns.

When to use this operation:

  • Analyzing audience demographics for targeting strategies
  • Understanding revenue potential by content category
  • Identifying geographic markets for content localization
  • Comparing RPM rates across different niches

Get Short vs Long Views

Get short and long video views for a YouTube channel.

When to use this operation:

  • Comparing short-form vs long-form content performance
  • Understanding content format preferences
  • Analyzing content strategy effectiveness
  • Planning content mix optimization

Error Responses

Full error code reference: Channel Analytics — API Reference →

Use Cases

Leverage channel analytics data in your workflows for:

  • Competitor Analysis: Compare multiple channels to identify growth patterns and strategies
  • Performance Monitoring: Track channel metrics over time with scheduled workflows
  • Automated Reporting: Generate periodic channel performance reports
  • Growth Alerts: Set up notifications for significant subscriber or view count changes
  • Research: Gather data for market research and niche analysis
  • Monetization Planning: Analyze RPM and revenue data to forecast earnings potential
  • Audience Targeting: Use demographic data to refine content and marketing strategies
  • Content Format Optimization: Compare shorts vs long-form performance to guide content mix

Best Practices

Performance Optimization

  • Cache analytics data: Channel metrics change slowly, consider caching for 6-12 hours
  • Batch channel requests: Process multiple channels in parallel for efficiency
  • Use appropriate operations: Choose the right operation for your needs to minimize API calls
  • Monitor quota usage: Get Analytics costs 🥞 10 quota; Get Short vs Long Views costs 🥞 1 quota; Get Geography Demographics Revenue costs 🥞 20 quota — cache results and batch wisely to stay within your plan

Common Mistakes to Avoid

Don't: Fetch all analytics operations when you only need basic metrics ✅ Do: Use Get Analytics for basic data, only fetch demographics/revenue when needed

Don't: Poll analytics data every few minutes ✅ Do: Cache results and refresh every 6-24 hours based on your needs

Don't: Ignore the avgVideoLength metric for content planning ✅ Do: Use average video length to benchmark your content against successful channels

Workflow Examples

These examples show how to implement common use cases in n8n.

Example 1: Basic Channel Analytics Workflow

Difficulty: Beginner | Time: 5 minutes | Use Case: Channel profiling

  1. Add a Manual Trigger or Schedule Trigger node
  2. Add the NexLev node and configure it for Get Analytics
  3. Add a Code or Set node to process the analytics data
  4. Add an output node (e.g., Google Sheets, Email, Webhook)

Next Steps: Add scheduled triggers to track channel growth over time.


Example 2: Competitor Comparison

Difficulty: Intermediate | Time: 15 minutes | Use Case: Competitive analysis

  1. Add a Manual Trigger with a list of competitor channel IDs
  2. Add a Loop node to process each channel
  3. Add the NexLev node inside the loop to fetch analytics for each channel
  4. Add a Code node to aggregate and compare the data
  5. Add a Google Sheets node to create a comparison report

Next Steps: Combine with demographic data for deeper insights.

Support

If you encounter issues or have questions about the Channel Analytics API, please contact our support team at contact@nexlev.io or refer to our troubleshooting guide.