---
title: "Channel Analytics API"
description: "Retrieve detailed analytics data for any YouTube channel — subscriber counts, video counts, view counts, geography/demographics, and short vs. long-form view performance."
source: "https://dashboard.nexlev.io/docs/api/channel-analytics"
---

# Channel Analytics API

Retrieve detailed analytics data for any YouTube channel — subscriber counts, video counts, view counts, geography/demographics, and short vs. long-form view performance.

**Base URL**: `https://prod.dashboard.nexlev.io` — see [Authentication](/docs/api/authentication) for the required header.

## Operations Quick Reference

| Operation                          | Method & Path                                                                  | Quota Cost |
| ---------------------------------- | ------------------------------------------------------------------------------ | ---------- |
| Get Analytics                      | `POST /api/external/analytics/channel-analytics`                               | 🥞 10      |
| Get Geography Demographics Revenue | `POST /api/external/analytics/channel-analytics/geography-revenue`             | 🥞 20      |
| Get Short vs Long Views            | `GET /api/external/analytics/channel-analytics/:channelId/short-vs-long-views` | 🥞 1       |

## Available Operations

The Channel Analytics resource provides three different operations to retrieve channel analytics data:

### Get Analytics

#### Get Analytics

```http
POST /api/external/analytics/channel-analytics
```

**Description**: Retrieve comprehensive channel analytics including subscriber count, video count, view count, and detailed channel information.

**cURL Example**:

```bash
curl -X POST https://prod.dashboard.nexlev.io/api/external/analytics/channel-analytics \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA"}'
```

**Request Body**:

```json
{
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA"
}
```

> **Warning**
>
> 🥞 **Quota Cost: 10 quota per request** — see [Rate Limits &
> Quota](/docs/api/rate-limits).

**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

**Status Code**: `200 OK`

**Response Body**:

```json
[
  {
    "about": {
      "description": "SUBSCRIBE FOR A COOKIE!\nNew MrBeast or MrBeast Gaming video every single Saturday at noon eastern time!\nAccomplishments:\n- Raised $20,000,000 To Plant 20,000,000 Trees\n- Removed 30,000,000 pounds of trash from the ocean\n- Helped 2,000 people walk again\n- Helped 1,000 blind people see\n- Helped 1,000 deaf people hear\n- Built wells in Africa\n- Built and gave away 100 houses\n- Adopted every dog in a shelter (twice)\n- Given millions to charity\n- Started my own snack company Feastables\n- Started my own software company Viewstats\n- Started Lunchly, a tasty, better-for-you lunch option\n- Gave away a private island (twice)\n- Gave away 1 million meals\n- I counted to 100k\n- Ran a marathon in the world's largest shoes\n- Survived 50 hours in Antarctica\n- Recreated Squid Game in real life\n- Created the largest competition show with 1000 people (Beast Games)\n- Gave $5,000,000 to one person\n- Passed T-Series to become most subscribed YouTube channel 🥹\nyou get it, I appreciate all of you so much :)\n",
      "subscriberCount": 454000000,
      "viewCount": 102990519473,
      "videoCount": 929,
      "joinedDate": "2012-02-19",
      "country": "United States",
      "links": [
        {
          "title": "TEAM WATER!",
          "url": "teamwater.org"
        },
        {
          "title": "Follow",
          "url": "instagram.com/mrbeast"
        },
        {
          "title": "Twitter",
          "url": "twitter.com/MrBeast"
        },
        {
          "title": "Facebook",
          "url": "facebook.com/mrbeast"
        }
      ],
      "channelUrl": "https://youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
      "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
      "daysSinceStart": 5044,
      "avgVideoLengthSeconds": 1321.6440677966102,
      "avgVideoLength": "22:01",
      "channelName": "MrBeast",
      "thumbnail": [
        {
          "url": "https://yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s160-c-k-c0x00ffffff-no-rj",
          "width": 160,
          "height": 160
        }
      ],
      "hasShorts": true,
      "lastVideoUploadDate": "4 days ago"
    },
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "keywords": [],
    "tags": ["mrbeast6000", "beast", "mrbeast", "Mr.Beast", "mr"],
    "categories": ["Philanthropy", "Vlogs", "Entertainment"]
  }
]
```

**Response Fields**:

- `about` - Comprehensive channel information including all metrics
  - `description` - Full channel description with accomplishments
  - `subscriberCount` - Total subscriber count
  - `viewCount` - Total cumulative views across all videos
  - `videoCount` - Total number of published videos
  - `joinedDate` - Channel creation date (YYYY-MM-DD format)
  - `country` - Channel country location
  - `links` - Social media and external links
  - `channelUrl` - Full YouTube channel URL
  - `channelId` - YouTube channel identifier
  - `daysSinceStart` - Days since channel creation
  - `avgVideoLengthSeconds` - Average video length in seconds
  - `avgVideoLength` - Average video length formatted (MM:SS)
  - `channelName` - Display name of the channel
  - `thumbnail` - Channel avatar with URL, width, and height
  - `hasShorts` - Whether channel publishes YouTube Shorts
  - `lastVideoUploadDate` - Relative time since last upload (e.g., "4 days ago")
- `channelId` - YouTube channel unique identifier
- `keywords` - Channel-level keywords (empty array if none)
- `tags` - Channel tags for categorization
- `categories` - Content categories (e.g., "Philanthropy", "Vlogs", "Entertainment")

### Get Geography Demographics Revenue

#### Get Geography Demographics Revenue

```http
POST /api/external/analytics/channel-analytics/geography-revenue
```

**Description**: Get detailed demographics, geography distribution, RPM rates, and revenue estimates for a channel.

**cURL Example**:

```bash
curl -X POST https://prod.dashboard.nexlev.io/api/external/analytics/channel-analytics/geography-revenue \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA"}'
```

**Request Body**:

```json
{
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA"
}
```

> **Warning**
>
> 🥞 **Quota Cost: 20 quota per request** — see [Rate Limits &
> Quota](/docs/api/rate-limits).

**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

**Status Code**: `200 OK`

**Response Body**:

```json
[
  {
    "category": "technology",
    "rpm": {
      "rpm_15": 5.5,
      "rpm_45": 6.8,
      "rpm_45_plus": 8.2
    },
    "demographics": {
      "gender": {
        "male": 65.4,
        "female": 33.8,
        "user_specified": 0.8
      },
      "age": {
        "13_17_years": 5.2,
        "18_24_years": 18.5,
        "25_34_years": 32.4,
        "35_44_years": 22.1,
        "45_54_years": 12.8,
        "55_64_years": 6.7,
        "65_plus_years": 2.3
      },
      "viewership_country": {
        "United States": 42.8,
        "United Kingdom": 15.3,
        "Canada": 12.6,
        "Australia": 8.9,
        "Germany": 6.4
      }
    },
    "revenue": {
      "month_revenue": 125000.5,
      "month_long_revenue": 95000,
      "month_short_revenue": 30000,
      "short_view_count": 45000000,
      "long_view_count": 180000000
    }
  }
]
```

**Response Fields**:

- `category` - Content category of the channel
- `rpm` - Revenue per mille (RPM) data by age group
  - `rpm_15` - RPM for 15-24 age group
  - `rpm_45` - RPM for 25-44 age group
  - `rpm_45_plus` - RPM for 45+ age group
- `demographics` - Audience demographic breakdown
  - `gender` - Gender distribution percentages
    - `male` - Male audience percentage
    - `female` - Female audience percentage
    - `user_specified` - User-specified gender percentage
  - `age` - Age distribution percentages
    - `13_17_years` - 13-17 age group percentage
    - `18_24_years` - 18-24 age group percentage
    - `25_34_years` - 25-34 age group percentage
    - `35_44_years` - 35-44 age group percentage
    - `45_54_years` - 45-54 age group percentage
    - `55_64_years` - 55-64 age group percentage
    - `65_plus_years` - 65+ age group percentage
  - `viewership_country` - Top countries by viewership percentage
- `revenue` - Revenue breakdown data

  - `month_revenue` - Total monthly revenue estimate
  - `month_long_revenue` - Monthly revenue from long-form videos
  - `month_short_revenue` - Monthly revenue from shorts
  - `short_view_count` - Total views from shorts
  - `long_view_count` - Total views from long-form videos

### Get Short vs Long Views

#### Get Short vs Long Views

```http
GET /api/external/analytics/channel-analytics/:channelId/short-vs-long-views
```

**Description**: Compare short-form (Shorts) vs long-form video view counts to understand content format performance.

**Path Parameters**: `channelId` (required) — the YouTube channel ID

**cURL Example**:

```bash
curl https://prod.dashboard.nexlev.io/api/external/analytics/channel-analytics/UCX6OQ3DkcsbYNE6H8uQQuVA/short-vs-long-views \
  -H "Authorization: Bearer YOUR_API_KEY"
```

> **Warning**
>
> 🥞 **Quota Cost: 1 quota per request** — see [Rate Limits &
> Quota](/docs/api/rate-limits).

**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

**Status Code**: `200 OK`

**Response Body**:

```json
[
  {
    "shortView": 45000000,
    "longViews": 180000000
  }
]
```

**Response Fields**:

- `shortView` - Total view count from YouTube Shorts
- `longViews` - Total view count from long-form videos

## Error Responses

### Bad Request

**Status Code**: `400 Bad Request`

**Description**: The request was invalid or malformed.

```json
{
  "error": {
    "code": 400,
    "message": "Invalid channel ID format",
    "details": "Channel ID must be a valid YouTube channel identifier"
  }
}
```

### Unauthorized

**Status Code**: `401 Unauthorized`

**Description**: Authentication credentials are missing or invalid.

```json
{
  "error": {
    "code": 401,
    "message": "Unauthorized",
    "details": "Invalid API key or credentials not provided. Create your API key at https://dashboard.nexlev.io/nexlev-api/create-api-key"
  }
}
```

### Rate Limit

**Status Code**: `429 Too Many Requests`

**Description**: You have exceeded your API rate limit.

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit exceeded",
    "details": "You have exceeded your API quota. Please try again later.",
    "retryAfter": 3600
  }
}
```
