> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dumplingai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get YouTube Channel

> Retrieve rich metadata, social links, and statistics for a YouTube channel. Supply a channel ID, handle, or full URL; at least one identifier is required.

## Description

This endpoint retrieves comprehensive information about a YouTube channel including subscriber count, video count, description, and social media links. Can accept channel ID, handle, or full URL as input.

## Endpoint

```
POST https://app.dumplingai.com/api/v1/youtube/channel
```

## Headers

* **Content-Type:** `application/json`
* **Authorization:** Bearer `<API_KEY>` (required)

## Request Body

```json theme={null}
{
  "channelId": "string", // Optional. YouTube channel ID (e.g., "UCxcTeAKWJca6XyJ37_ZoKIQ")
  "handle": "string", // Optional. YouTube channel handle (e.g., "@channelname")
  "url": "string" // Optional. Full YouTube channel URL
}
```

**Note:** At least one of `channelId`, `handle`, or `url` is required.

## Responses

### Success (200)

Returns comprehensive channel information including metadata, statistics, and social links.

```json theme={null}
{
  "channelId": "UCxcTeAKWJca6XyJ37_ZoKIQ",
  "channel": "@ThePatMcAfeeShow",
  "name": "The Pat McAfee Show",
  "avatar": {
    "image": {
      "sources": [
        {
          "url": "https://yt3.googleusercontent.com/ytc/AIdro_k4...",
          "width": 48,
          "height": 48
        },
        {
          "url": "https://yt3.googleusercontent.com/ytc/AIdro_k4...",
          "width": 88,
          "height": 88
        }
      ],
      "processor": {
        "borderImageProcessor": {
          "circular": true
        }
      }
    },
    "avatarImageSize": "48",
    "loggingDirectives": {
      "trackingParams": "CAEQAA==",
      "visibility": {
        "types": "12"
      }
    }
  },
  "description": "The Pat McAfee Show features Pat McAfee...",
  "subscriberCount": 4200000,
  "subscriberCountText": "4.2M",
  "videoCountText": "1,234",
  "viewCountText": "1.2B",
  "joinedDateText": "Jan 1, 2018",
  "tags": "sports, entertainment, comedy",
  "email": "business@patmcafeeshow.com",
  "store": "https://patmcafeeshow.store",
  "twitter": "https://twitter.com/PatMcAfeeShow",
  "instagram": "https://instagram.com/patmcafeeshow",
  "links": [
    "https://patmcafeeshow.com",
    "https://youtube.com/@ThePatMcAfeeShow"
  ],
  "country": "United States"
}
```

* **Content-Type:** application/json
* **X-RateLimit-Limit:** The rate limit for the user
* **X-RateLimit-Remaining:** The remaining number of requests for the user

### Bad Request (400)

Returned if the request is invalid or missing required parameters.

```json theme={null}
{
  "error": "At least one parameter is required: 'channelId', 'handle', or 'url'"
}
```

### Bad Gateway (502)

Returned if the external service is unavailable or returns invalid data.

```json theme={null}
{
  "error": "Failed to retrieve YouTube channel information"
}
```

### Internal Server Error (500)

Returned if there's an unexpected server error.

```json theme={null}
{
  "error": "An unexpected server error occurred while fetching YouTube channel information"
}
```

## Example Request

```bash theme={null}
curl -X POST https://app.dumplingai.com/api/v1/youtube/channel \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
  "handle": "@ThePatMcAfeeShow"
}'
```

## Example Response

```json theme={null}
{
  "channelId": "UCxcTeAKWJca6XyJ37_ZoKIQ",
  "channel": "@ThePatMcAfeeShow",
  "name": "The Pat McAfee Show",
  "avatar": {
    "image": {
      "sources": [
        {
          "url": "https://yt3.googleusercontent.com/ytc/AIdro_k4...",
          "width": 48,
          "height": 48
        }
      ],
      "processor": {
        "borderImageProcessor": {
          "circular": true
        }
      }
    },
    "avatarImageSize": "48",
    "loggingDirectives": {
      "trackingParams": "CAEQAA==",
      "visibility": {
        "types": "12"
      }
    }
  },
  "description": "The Pat McAfee Show features Pat McAfee...",
  "subscriberCount": 4200000,
  "subscriberCountText": "4.2M",
  "videoCountText": "1,234",
  "viewCountText": "1.2B",
  "joinedDateText": "Jan 1, 2018",
  "tags": "sports, entertainment, comedy",
  "email": "business@patmcafeeshow.com",
  "store": "https://patmcafeeshow.store",
  "twitter": "https://twitter.com/PatMcAfeeShow",
  "instagram": "https://instagram.com/patmcafeeshow",
  "links": [
    "https://patmcafeeshow.com"
  ],
  "country": "United States"
}
```

## Notes

* At least one parameter (`channelId`, `handle`, or `url`) must be provided
* Channel handles should include the @ symbol (e.g., "@channelname")
* Channel URLs can be in formats like `https://youtube.com/@channelname` or `https://youtube.com/channel/UC...`
* The response includes comprehensive channel metadata, statistics, and social media links
* Some channels may not have all optional fields populated (email, store, social media links)
* This endpoint uses **10 credits** per request

## Rate Limiting

Rate limit headers (`X-RateLimit-Limit` and `X-RateLimit-Remaining`) are included in the response to indicate the user's current rate limit status.


## OpenAPI

````yaml POST /api/v1/youtube/channel
openapi: 3.0.3
info:
  title: DumplingAI API
  version: 1.0.0
  description: >
    REST API for DumplingAI's content intelligence and automation platform.

    All endpoints are grouped under `/api/v1`; most are secured via Bearer API
    keys unless an operation explicitly sets `security: []`.
servers:
  - url: https://app.dumplingai.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: YouTube
    description: Access metadata, search results, and transcripts from YouTube.
  - name: TikTok
    description: Retrieve TikTok profile, video, follower, and transcript data.
  - name: LinkedIn
    description: Programmatically fetch LinkedIn company and profile data.
  - name: Search
    description: Search-orientated endpoints spanning web, news, maps, and autocomplete.
  - name: Google
    description: Integrations with Google business listings and location data.
  - name: Scraping
    description: Webpage capture, crawling, and structured content extraction utilities.
  - name: Documents
    description: Document processing, conversion, and metadata utilities.
  - name: AI
    description: DumplingAI agent and knowledge base endpoints.
  - name: Developer Tools
    description: Utilities for executing sandboxed code via API.
paths:
  /api/v1/youtube/channel:
    post:
      tags:
        - YouTube
      summary: Get YouTube channel details
      description: >-
        Retrieve rich metadata, social links, and statistics for a YouTube
        channel. Supply a channel ID, handle, or full URL; at least one
        identifier is required.
      operationId: getYouTubeChannel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YouTubeChannelRequest'
            examples:
              byHandle:
                summary: Lookup by handle
                value:
                  handle: '@ThePatMcAfeeShow'
      responses:
        '200':
          description: Channel metadata retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouTubeChannelResponse'
        '400':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Upstream YouTube data provider returned an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    YouTubeChannelRequest:
      type: object
      description: >
        Identify the YouTube channel to fetch. Provide at least one identifier
        (channelId, handle, or url).
      properties:
        channelId:
          type: string
          description: YouTube channel ID (e.g., UCxcTeAKWJca6XyJ37_ZoKIQ).
        handle:
          type: string
          description: YouTube handle beginning with `@`.
        url:
          type: string
          format: uri
          description: Full YouTube channel URL.
        requestSource:
          $ref: '#/components/schemas/RequestSource'
    YouTubeChannelResponse:
      type: object
      description: Detailed metadata about a YouTube channel.
      properties:
        channelId:
          type: string
        channel:
          type: string
          description: Canonical handle with leading `@`.
        name:
          type: string
        description:
          type: string
        subscriberCount:
          type: integer
          nullable: true
        subscriberCountText:
          type: string
          nullable: true
        videoCountText:
          type: string
          nullable: true
        viewCountText:
          type: string
          nullable: true
        joinedDateText:
          type: string
          nullable: true
        tags:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        store:
          type: string
          format: uri
          nullable: true
        twitter:
          type: string
          format: uri
          nullable: true
        instagram:
          type: string
          format: uri
          nullable: true
        links:
          type: array
          items:
            type: string
            format: uri
        country:
          type: string
          nullable: true
        avatar:
          type: object
          description: Structured avatar data as returned by YouTube.
          additionalProperties: true
      additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - error
    RequestSource:
      type: string
      description: Optional identifier describing where the API request originated.
      enum:
        - API
        - WEB
        - MAKE_DOT_COM
        - ZAPIER
        - N8N
        - PLAYGROUND
        - DEFAULT_AUTOMATION
        - AGENT_PREVIEW
        - AGENT_LIVE
        - AUTOPILOT
        - STUDIO
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````