---
title: "YouTube API: Get Channel Name, Subscribers and Stats"
description: "Get a YouTube channel’s name, description, subscribers, video count and avatar as JSON by @handle or ID, compared honestly with the Data API channels.list."
url: "https://fetchtranscript.com/blog/get-youtube-channel-details"
markdown: "https://fetchtranscript.com/blog/get-youtube-channel-details.md"
---

YouTube

# How to Get a YouTube Channel’s Name and Stats via API

Get a YouTube channel’s name, description, subscribers, video count and avatar as JSON by @handle or ID, compared honestly with the Data API channels.list.

By FetchTranscript team Published December 1, 2026 5 min read

To get a YouTube channel's name and details with an API, request the channel by its @handle or `UC…` ID and read the JSON: with FetchTranscript, `GET /v1/channels/{channel}` returns `name`, `description`, `subscriber_count`, `video_count`, the avatar and the URL for 1 credit. With the official YouTube Data API, the method is `channels.list` with `part=snippet,statistics`, at 1 quota unit for up to 50 channels. This guide shows both with working code, says honestly which one fits which job, and covers the fields that are missing or rounded on each side.

## The fields you can get

Here is what each API returns for a channel, side by side:

| Data                   | FetchTranscript `/v1/channels/{channel}`           | YouTube Data API `channels.list`                                |
| ---------------------- | -------------------------------------------------- | --------------------------------------------------------------- |
| Permanent ID           | `channel_id`                                       | `id`                                                            |
| Name                   | `name`                                             | `snippet.title`                                                 |
| Description            | `description`                                      | `snippet.description`                                           |
| Subscribers            | `subscriber_count` (rounded, null if hidden)       | `statistics.subscriberCount` (rounded), `hiddenSubscriberCount` |
| Number of videos       | `video_count` (Shorts included, null if not shown) | `statistics.videoCount`                                         |
| Avatar                 | `thumbnail_url`                                    | `snippet.thumbnails`                                            |
| Channel URL            | `channel_url`                                      | not returned (build it from the ID)                             |
| Handle                 | not returned                                       | `snippet.customUrl`                                             |
| Total views            | not returned                                       | `statistics.viewCount`                                          |
| Creation date, country | not returned                                       | `snippet.publishedAt`, `snippet.country`                        |

Two things stand out. First, both sides round the subscriber count: YouTube itself only shows it to three significant figures (20.2M), and the Data API has returned the same rounded number since 2019. Nobody outside the channel gets the exact figure. Second, if your job needs the channel's total views, creation date or country, the Data API is the better fit: those fields are not in our channel response.

## Get a channel's details with curl

```bash
curl -H "X-API-Key: yt_your_api_key" \
  "https://api.fetchtranscript.com/v1/channels/@veritasium"
```

```json
{
  "channel_id": "UCHnyfMqiRRG1u-2MsSQLbXA",
  "name": "Veritasium",
  "description": "An element of truth - videos about science, education, and anything else we find interesting.",
  "subscriber_count": 21500000,
  "video_count": 420,
  "thumbnail_url": "https://yt3.googleusercontent.com/...",
  "channel_url": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA"
}
```

The values are illustrative. The path takes a handle (`@veritasium`, with or without the `@`, any case) or a `UC…` ID. When you start from a URL or a name rather than a handle, see [how to get a YouTube channel ID](https://fetchtranscript.com/blog/get-youtube-channel-id.md) first. A channel that does not exist answers 404 `channel_not_found`, an identifier that is neither a handle nor an ID answers 400 `invalid_channel_id`, and errors cost nothing. Channel details are cached for 24 hours, which matches how often the public numbers move in a meaningful way.

## Python: details of a list of channels to CSV

A creator shortlist, a competitor set, a list of channels to sponsor: the job is usually "these 200 channels, their name and size, in a spreadsheet".

```python
import csv
import requests

API = "https://api.fetchtranscript.com/v1"
HEADERS = {"X-API-Key": "yt_your_api_key"}

def channel_details(channel: str) -> dict | None:
    r = requests.get(f"{API}/channels/{channel}", headers=HEADERS, timeout=30)
    if r.status_code in (400, 404):
        return None  # not a channel: not billed
    r.raise_for_status()
    return r.json()

channels = ["@veritasium", "@mkbhd", "@kurzgesagt", "@no-such-channel-xyz"]

with open("channels.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.writer(f)
    writer.writerow(["input", "channel_id", "name", "subscribers", "videos", "url"])
    for channel in channels:
        d = channel_details(channel)
        if d is None:
            writer.writerow([channel, "", "not found", "", "", ""])
            continue
        writer.writerow([channel, d["channel_id"], d["name"], d["subscriber_count"], d["video_count"], d["channel_url"]])
```

With the official SDK (`pip install fetchtranscript`) the request is one line, `client.channels.get_info("@veritasium")`, and a missing channel raises `ChannelNotFoundError`:

```python
from fetchtranscript import FetchTranscriptClient

client = FetchTranscriptClient(api_key="yt_your_api_key")
channel = client.channels.get_info("@veritasium")
print(channel["name"], channel["subscriber_count"], channel["video_count"])
```

## JavaScript with the SDK

```javascript
// Node 18+ as an ES module, after npm install fetchtranscript
import { FetchTranscriptClient } from 'fetchtranscript';

const client = new FetchTranscriptClient({ apiKey: 'yt_your_api_key' });

const channel = await client.channels.getInfo('@veritasium');
console.log(`${channel.name}: ${channel.subscriber_count ?? 'hidden'} subscribers, ${channel.video_count ?? '?'} videos`);
console.log(channel.channel_url);
```

The SDK's types (`ChannelMetadataResponse`) mark `subscriber_count`, `video_count` and `thumbnail_url` as possibly null, so your code handles hidden counts from the start.

## The same with the YouTube Data API

```bash
curl "https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics&forHandle=@veritasium&key=YOUR_GOOGLE_API_KEY"
```

The answer is an `items` array; the name is `items[0].snippet.title` and the numbers are in `items[0].statistics`, as strings. `channels.list` costs 1 unit whatever the parts, and with `id=` it takes up to 50 comma-separated channel IDs in one request. With the default 10,000 units a day, that is a lot of channels.

So, honestly: **if all you need is channel statistics for channels whose IDs you know, the Data API is cheaper and returns more fields**. It asks for a Google Cloud project and an API key, quotas to watch, and the YouTube API Services terms, which limit how long you may store some data. FetchTranscript is the better fit when channel details are one step in a larger job (resolving pasted handles, then listing the channel's videos with durations and views, then fetching transcripts or comments) and you would rather have one key, one bill per call and no quota. The [YouTube search API without quota](https://fetchtranscript.com/blog/youtube-search-without-quota.md) guide explains the Data API quota in detail.

## The channel name from a video

When you have a video and want its channel, you do not need the channel endpoint at all: `GET /v1/videos/{video_id}` returns `channel_name` and `channel_id` with the video's views, likes, upload date and tags.

```bash
curl -H "X-API-Key: yt_your_api_key" \
  "https://api.fetchtranscript.com/v1/videos/dQw4w9WgXcQ"
```

Our guide to [YouTube video metadata](https://fetchtranscript.com/blog/youtube-video-metadata.md) lists every field. Search results carry `channel_name` and `channel_id` for every video too, so a search is a cheap way to discover the channels active on a topic.

## Track a channel's growth over time

The public numbers only become interesting over time. A small daily job that stores one row per channel per day gives you a growth chart for any channel, including competitors:

```python
import datetime
import json

today = datetime.date.today().isoformat()
with open("channel_history.jsonl", "a", encoding="utf-8") as f:
    for channel in ["@veritasium", "@mkbhd"]:
        d = channel_details(channel)
        if d:
            f.write(json.dumps({"date": today, "channel_id": d["channel_id"],
                                "subscribers": d["subscriber_count"], "videos": d["video_count"]}) + "\n")
```

Keep in mind that subscriber counts are rounded to three significant figures, so a channel of 21.5 million moves in steps of 100,000: for big channels the video count and the views of recent uploads tell you more. The latest uploads, with their views and durations, come from the video list, `GET /v1/channels/{channel}/videos`; the full walkthrough, with pagination and Shorts, is in [how to get all videos from a YouTube channel](https://fetchtranscript.com/blog/get-all-videos-from-youtube-channel.md).

## What it costs

Each successful channel lookup is 1 credit. Every account gets 100 free calls a month, then pay-as-you-go is $1 per 1,000 calls, and failed calls (unknown channel, invalid identifier) are never billed. The [YouTube Channel API page](https://fetchtranscript.com/youtube-channel-api#try-it-free) lets you look up a channel and its latest five videos without an account, and the [API reference](https://fetchtranscript.com/docs/api#channels) documents every field. AI assistants can do the same through the MCP tool `get_channel_info`.

## Frequently asked questions

### How do I get a YouTube channel's name with an API?

Call `GET /v1/channels/{channel}` with the channel's @handle or `UC…` ID and read `name` from the JSON. With the YouTube Data API it is `snippet.title` from `channels.list` with `part=snippet`.

### Can I get the exact subscriber count?

No. YouTube rounds public subscriber counts to three significant figures, and every API, the official one included, returns the rounded number. When a channel hides its count, our `subscriber_count` is null and the Data API sets `hiddenSubscriberCount`.

### Does the API return a channel's total views?

Not ours: our channel response has subscribers and the number of videos, not lifetime views. The YouTube Data API returns `statistics.viewCount`; for the views of individual videos, use the channel's video list.

### Can I get the details of many channels at once?

Each FetchTranscript call returns one channel, at 1 credit, with a rate limit of 500 requests per minute. The Data API's `channels.list` accepts up to 50 channel IDs in one request for 1 unit.

### Is video_count the number of long videos or everything?

It is the number the channel page shows, which counts all public uploads, Shorts included. It can be null when YouTube does not show it.

### Do I need a Google API key?

Not for FetchTranscript: you only need its API key, from a free account. The YouTube Data API needs a Google Cloud project and its own key.

Try it on your own videos

100 free calls every month, no credit card. Then $1 per 1,000 calls, only for the calls that succeed.

[Get your free API key](https://fetchtranscript.com/auth/sign-up)[Read the docs](https://fetchtranscript.com/docs.md)

## Related guides

- [How to Get a YouTube Channel ID from a Handle, URL or Name](https://fetchtranscript.com/blog/get-youtube-channel-id.md)

  Get the UC… ID of any YouTube channel from its @handle, URL, a video or its name, with an API call or by hand, and why you should store the ID, not the handle.

- [How to Get All Videos from a YouTube Channel](https://fetchtranscript.com/blog/get-all-videos-from-youtube-channel.md)

  Retrieve every video of a YouTube channel via API: by @handle with a cursor, to CSV, with or without Shorts, or with the Data API uploads playlist.

- [How to Get YouTube Video Metadata: Views, Likes, Tags](https://fetchtranscript.com/blog/youtube-video-metadata.md)

  Get the title, description, views, likes, comment count, upload date, tags, categories and chapters of any YouTube video as JSON, with curl, Python or JS.

[← All articles](https://fetchtranscript.com/blog.md)
