# YouTube video ID, channel ID (UC…) and @handle: what is each?

> The three YouTube identifiers: the 11-character video ID, the 24-character channel ID starting with UC, and the changeable @handle. Shapes, URLs, which to store, and how to map them.

Canonical page: https://okdata.online/answers/youtube-video-channel-id-handle/

**Short answer: **The video ID is the 11-character code after watch?v= or youtu.be/; the channel ID is the permanent 24-character ID starting with UC; the @handle is the channel's changeable public name. okdata YouTube video detail takes a video ID or any video link and returns the channel ID as author.id and the handle as author.username, for $0.002.

YouTube links mix three kinds of identifier, and tools ask for different ones. A video ID names one video. A channel ID names a channel for good. A handle is the channel's @name, chosen by the owner and open to change. Knowing which is which saves you from storing the one that breaks.

## The three side by side

| | Video ID | Channel ID | Handle |
|---|---|---|---|
| Example | `Xk3_9fQpL2w` | `UCq7mT2vXbN4rLk9sHd0aWzE` | `@trailkitgear` |
| Shape | 11 characters from A-Z, a-z, 0-9, `-` and `_` | `UC` + 22 characters, 24 in total | 3 to 30 characters, with `_`, `-` and `.` allowed inside |
| In URLs | `watch?v=`, `youtu.be/`, `/shorts/`, `/live/` | `youtube.com/channel/UC…` | `youtube.com/@handle` |
| Changes? | Never | Never | The owner can change it |

The alphabet of video and channel IDs is the URL-safe variant of base64, which is why `-` and `_` appear. Older links in `/c/name` and `/user/name` form still exist; YouTube says no new custom URLs can be set up and that those legacy links now redirect to the handle URL. Handles are not case-sensitive.

## Which to store

Key videos on the video ID and channels on the channel ID. Store the handle and the channel title as labels you refresh. A handle in a spreadsheet from last year may now point nowhere, or at a different channel.

## Getting from one to another

[YouTube video detail](/apis/youtube/videos/get/) accepts `id` or any of the link forms above as `url` and returns `author.id` (the channel ID, `UC…`) and `author.username` (the handle without the @). [YouTube video search](/apis/youtube/videos/search/) returns the same author fields for every result. The catalog has no channel endpoint, so going from a handle to its channel ID takes one of these:

- one of the channel's videos through video detail, then read `author.id`;
- a search for the channel's name, then keep results whose `author.username` matches;
- YouTube's own Data API, whose `channels.list` takes `forHandle=@name` and returns the channel resource, if you have a Google Cloud project and key.

| Job | Calls | Cost |
|---|---|---|
| Video link to video ID, channel ID and handle | 1 | $0.002 |
| Handle to channel ID via a search page | 1 | $0.004 |
| 200 video links from a sheet | 200 | $0.40 |

## Example

```bash
curl -G "https://api.okdata.online/v1/youtube/videos/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'url=https://youtu.be/Xk3_9fQpL2w' \
  --data-urlencode 'fields=id,author.id,author.username,author.name'
```

`data.item` in the response then holds just those fields:

```json
{ "id": "Xk3_9fQpL2w",
  "author": { "id": "UCq7mT2vXbN4rLk9sHd0aWzE", "username": "trailkitgear", "name": "Trail Kit" } }
```

## Limits

- A video's own ID never changes, but the video can be removed or made private; detail then returns `not_found`, which is still charged as one call.
- A playlist ID (`PL…`) or a channel link is not a video link; video detail cannot read them.
- Handle rules differ for non-Latin scripts; YouTube's handle page lists the lengths for Han, Hangul and others.

For counts once you have the ID, see [getting a YouTube video's views and likes](/answers/youtube-view-count-api/).

## Endpoints used

- [YouTube video detail](https://okdata.online/apis/youtube/videos/get/) `youtube.videos.get`: $0.002 per call
- [YouTube video search](https://okdata.online/apis/youtube/videos/search/) `youtube.videos.search`: $0.004 per call · about 20 videos per page

## More about YouTube

- [YouTube API](https://okdata.online/apis/youtube/)
- [How to export YouTube comments for every video on a topic](https://okdata.online/guides/youtube-comments-export/)
- [How to get YouTube video transcripts from a keyword search](https://okdata.online/guides/youtube-video-transcript/)
- [How can I get a YouTube video's tags and description with an API?](https://okdata.online/answers/youtube-video-tags-api/)
- [How do I search YouTube channels by keyword and get their subscriber counts with an API?](https://okdata.online/answers/youtube-channel-search-api/)
- [How do I download transcripts for hundreds of YouTube videos at once?](https://okdata.online/answers/bulk-youtube-transcripts/)
- [How can I know what a social data job will cost before I run it?](https://okdata.online/answers/estimate-data-api-cost-before-running/)
- [Should I use a platform's official API or a third-party social data API?](https://okdata.online/answers/official-api-vs-third-party-social-data/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [How to choose a social media data API (2026)](https://okdata.online/compare/social-media-data-apis/)
- [Post detail API](https://okdata.online/roles/posts-get/)
- [Post search API](https://okdata.online/roles/posts-search/)

## Sources

- [YouTube Help: Understand your YouTube channel's URLs](https://support.google.com/youtube/answer/6180214?hl=en) (read 2026-11-12)
- [YouTube Help: Learn about YouTube handles](https://support.google.com/youtube/answer/11585688?hl=en) (read 2026-11-12)
- [YouTube Data API: Channels list (forHandle parameter)](https://developers.google.com/youtube/v3/docs/channels/list) (read 2026-11-12)
- [Base64 (Wikipedia): the URL-safe alphabet YouTube uses](https://en.wikipedia.org/wiki/Base64) (read 2026-11-12)

Where people asked this (read 2026-11-12): 

- https://stackoverflow.com/questions/14366648
- https://stackoverflow.com/questions/75805219
- https://stackoverflow.com/questions/47096243

Updated 2026-11-12
