# How to get a YouTube channel avatar from a handle

> Two ways to show a YouTube channel's profile picture from its @handle: the YouTube Data API's channels.list, or a single image URL.

Published 2026-10-19 · https://avatarsapi.com/blog/youtube-channel-avatar

Every YouTube channel has an @handle and a round avatar. Here are two ways to go from one to the other.

## The YouTube Data API

`channels.list` accepts a handle directly through the `forHandle` parameter and returns the avatar in `snippet.thumbnails`:

```sh
curl "https://www.googleapis.com/youtube/v3/channels?part=snippet&forHandle=@YouTube&key=$API_KEY"
```

The response carries `default`, `medium`, and `high` thumbnail URLs on `yt3.ggpht.com`. Each call costs 1 quota unit, and a project gets 10,000 units a day by default ([quota docs](https://developers.google.com/youtube/v3/determine_quota_cost)), so cost is rarely the problem. The friction is elsewhere:

- you need a Google Cloud project and an API key, which must stay on your server
- you need to cache the result yourself and refresh it when the creator changes their picture

This is the right choice if you already use the Data API for video or channel stats.

## One image URL

```html
<img src="https://avatarsapi.com/youtube/@YouTube" alt="">
```

avatarapi takes the handle with its `@` and returns the channel avatar as image bytes from a stable URL, cached at the edge for 7 days. No API key, no backend. Percent-encoding the `@` (`%40YouTube`) also works.

- `?size=16..1000` for the square size.
- `?json` returns the resolved `yt3.ggpht.com` URL instead of the bytes.
- A handle that does not exist returns a 404 with `"code": "ENOTFOUND"`.

```html
<img
  src="https://avatarsapi.com/youtube/@mkbhd?size=88"
  onerror="this.onerror=null; this.src='/default-avatar.svg'"
  alt="">
```

## Which to use

Use the Data API when you need other channel data and already have a backend. Use an image URL when you only need the picture in a page, an email, or a dashboard. [Twitch](/platforms/twitch), [TikTok](/platforms/tiktok), and [X](/blog/get-x-twitter-profile-picture) work the same way.
