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

# Channel

> Use this API endpoint to fetch metadata from a YouTube channel including name, description, subscriber count, and more.

Channel metadata is one of the endpoints offered by [Supadata's YouTube API](https://supadata.ai/youtube-api), a simpler alternative to the official YouTube Data API.

## Quick Start

### Request

<CodeGroup>
  ```js Node theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
  import {
    Supadata,
    YoutubeChannel
  } from '@supadata/js';

  // Initialize the client
  const supadata = new Supadata({
    apiKey: 'YOUR_API_KEY',
  });

  const channel: YoutubeChannel = await supadata.youtube.channel({
    id: 'https://youtube.com/@RickAstleyVEVO', // can be url, channel id, handle
  });
  ```

  ```python Python theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
  from supadata import Supadata, SupadataError

  # Initialize the client
  supadata = Supadata(api_key="YOUR_API_KEY")

  channel = supadata.youtube.channel(id="https://youtube.com/@RickAstleyVEVO") # can be url, channel id, handle
  print(f"Channel: {channel}")
  ```

  ```bash cURL theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
  curl -X GET 'https://api.supadata.ai/v1/youtube/channel?id=RickAstleyVEVO' \
    -H 'x-api-key: YOUR_API_KEY'
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "name": "Rick Astley",
  "description": "The official Rick Astley YouTube channel",
  "subscriberCount": 2000000,
  "videoCount": 100,
  "viewCount": 100,
  "thumbnail": "https://yt3.ggpht.com/...",
  "banner": "https://yt3.ggpht.com/..."
}
```

## Specification

### Endpoint

`GET https://api.supadata.ai/v1/youtube/channel`

Each request requires an `x-api-key` header with your API key available after signing up. Get your API key [here](https://dash.supadata.ai/organizations/api-key).

### Query Parameters

| Parameter | Type   | Required | Description                                                                                             |
| --------- | ------ | -------- | ------------------------------------------------------------------------------------------------------- |
| id        | string | Yes      | YouTube channel URL, handle or ID. See [Supported YouTube URL Formats](/youtube/supported-url-formats). |

## Channel Videos

You can also retrieve a list of video IDs from a channel using the [Channel Videos](/youtube/channel-videos) endpoint.

### Error Codes

The API returns HTTP status codes and error codes. See this [page](/errors) for more details.

### Supported YouTube Identifiers

The universal `id` parameter supports various YouTube URL and ID formats. See this [page](/youtube/supported-url-formats) for more details.

## Pricing

* 1 channel metadata request = 1 credit
