# YouTube API

Public channels, videos, Shorts, and comments.

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
HTML: https://trysocify.com/docs/api/youtube  
Platform file: https://trysocify.com/llms-youtube.txt  
OpenAPI: https://trysocify.com/openapi.json

## Endpoints (7)

- [Channel](#channel) — `GET /api/v1/youtube/channel` (2 credits per request)
- [Channel Videos](#channel-videos) — `GET /api/v1/youtube/videos` (3 credits per request)
- [Channel Shorts](#channel-shorts) — `GET /api/v1/youtube/shorts` (6 credits per request)
- [YouTube Subscriber Count](#youtube-subscriber-count) — `GET /api/v1/youtube/subscribers` (1 credit per request)
- [YouTube Video Info](#youtube-video-info) — `GET /api/v1/youtube/video` (1 credit per request)
- [YouTube Video Comments](#youtube-video-comments) — `GET /api/v1/youtube/comments` (2 credits per request)
- [YouTube Search](#youtube-search) — `GET /api/v1/youtube/search` (1 credit per request)

### Channel

`GET /api/v1/youtube/channel`

Fetch public channel details by username or browse id: description, links, and metadata.

Credits: 2 credits per request

**Parameters**

- `username` (optional) — Channel handle without @. Example: `MrBeast`.
- `browse_id` (optional) — Channel id (UC…). Example: `UCX6OQ3DkcsbYNE6H8uQQuVA`.

**Docs:** [https://trysocify.com/docs/api/youtube/channel.md](https://trysocify.com/docs/api/youtube/channel.md) · HTML: https://trysocify.com/docs/api/youtube/channel

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/channel?username=MrBeast&browse_id=UCX6OQ3DkcsbYNE6H8uQQuVA' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### Channel Videos

`GET /api/v1/youtube/videos`

Fetch recent uploads for a channel.

Credits: 3 credits per request

**Parameters**

- `browse_id` (required) — Channel id (UC…). From User Info or a channel URL. Example: `UCX6OQ3DkcsbYNE6H8uQQuVA`.
- `depth` (optional) — Pages to fetch. Defaults to 1. Example: `1`.

**Docs:** [https://trysocify.com/docs/api/youtube/videos.md](https://trysocify.com/docs/api/youtube/videos.md) · HTML: https://trysocify.com/docs/api/youtube/videos

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/videos?browse_id=UCX6OQ3DkcsbYNE6H8uQQuVA&depth=1' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### Channel Shorts

`GET /api/v1/youtube/shorts`

Fetch Shorts for a channel.

Credits: 6 credits per request

**Parameters**

- `browse_id` (required) — Channel id (UC…). From User Info or a channel URL. Example: `UCX6OQ3DkcsbYNE6H8uQQuVA`.
- `depth` (optional) — Pages to fetch. Defaults to 1. Example: `1`.

**Docs:** [https://trysocify.com/docs/api/youtube/shorts.md](https://trysocify.com/docs/api/youtube/shorts.md) · HTML: https://trysocify.com/docs/api/youtube/shorts

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/shorts?browse_id=UCX6OQ3DkcsbYNE6H8uQQuVA&depth=1' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### YouTube Subscriber Count

`GET /api/v1/youtube/subscribers`

Fetch the public subscriber count string for a channel id.

Credits: 1 credit per request

**Parameters**

- `browse_id` (required) — Channel id (UC…). From User Info or a channel URL. Example: `UCX6OQ3DkcsbYNE6H8uQQuVA`.

**Docs:** [https://trysocify.com/docs/api/youtube/subscribers.md](https://trysocify.com/docs/api/youtube/subscribers.md) · HTML: https://trysocify.com/docs/api/youtube/subscribers

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/subscribers?browse_id=UCX6OQ3DkcsbYNE6H8uQQuVA' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### YouTube Video Info

`GET /api/v1/youtube/video`

Fetch public stats for a video or Short by id.

Credits: 1 credit per request

**Parameters**

- `id` (required) — YouTube video or Short id. Example: `9lhtFHpNfms`.

**Docs:** [https://trysocify.com/docs/api/youtube/video.md](https://trysocify.com/docs/api/youtube/video.md) · HTML: https://trysocify.com/docs/api/youtube/video

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/video?id=9lhtFHpNfms' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### YouTube Video Comments

`GET /api/v1/youtube/comments`

Fetch a page of public comments for a video or Short.

Credits: 2 credits per request

**Parameters**

- `id` (required) — YouTube video or Short id. Example: `9lhtFHpNfms`.
- `cursor` (optional) — Pagination cursor from a previous nextCursor.

**Docs:** [https://trysocify.com/docs/api/youtube/comments.md](https://trysocify.com/docs/api/youtube/comments.md) · HTML: https://trysocify.com/docs/api/youtube/comments

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/comments?id=9lhtFHpNfms' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

### YouTube Search

`GET /api/v1/youtube/search`

Search public YouTube videos by keyword.

Credits: 1 credit per request

**Parameters**

- `keyword` (required) — Search text. Example: `magic`.
- `depth` (optional) — Pages to fetch. Defaults to 1. Example: `1`.

**Docs:** [https://trysocify.com/docs/api/youtube/search.md](https://trysocify.com/docs/api/youtube/search.md) · HTML: https://trysocify.com/docs/api/youtube/search

```bash
curl -sS 'https://trysocify.com/api/v1/youtube/search?keyword=magic&depth=1' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

