# YouTube API — UnifAPI

> Channels, videos, comments, captions, playlists, hashtags, search, trending. Search YouTube and fetch channel and video metadata with subscriber, view and like counts, comments, captions, playlists and trending.

- Category: Social platforms
- API base URL: https://api.unifapi.com
- Auth: `Authorization: Bearer <UnifAPI API key>` (OAuth recommended for MCP clients)
- MCP server: https://mcp.unifapi.com
- Developer docs: https://docs.unifapi.com/api/youtube
- OpenAPI spec: https://unifapi.com/openapi.json
- HTML page: https://unifapi.com/apis/youtube
- Full catalog: https://unifapi.com/apis.md

## Agent workflows

- Search YouTube, fetch channel and video metadata, browse related videos, and inspect trending content from one API surface.
- Support creator research, channel benchmarking, market monitoring, and topic discovery Skills with live video and channel records.
- Resolve channel identifiers and video ids into canonical data that can be joined with TikTok, X, Reddit, LinkedIn, or Instagram evidence.

## Endpoints (19)

Every endpoint returns the UnifAPI JSON envelope (`request_id`, `data`, `pagination` on lists, `billing`) and bills max(records × credits per record, minimum) in credits.

### Get a YouTube channel by id

`GET /youtube/channels/{channel_id}`

Return a YouTube channel's profile by its `UC…` channel ID, including title, handle, description, subscriber count, banner art, topic keywords, and external links. Useful as the entry point for any channel-level research or competitive analysis.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/get

### List a YouTube channel's community posts

`GET /youtube/channels/{channel_id}/community`

Return a YouTube channel's community-tab posts, by its `UC…` channel ID, as a cursor-paginated list — text, like and reply counts, and attachment kind. Useful for tracking creator announcements and audience engagement outside of videos.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/community/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/community/get

### List playlists created by a YouTube channel

`GET /youtube/channels/{channel_id}/playlists`

Return the playlists a YouTube channel has published, by its `UC…` channel ID, as a cursor-paginated list. Useful for mapping how a creator organizes their catalog into series and collections.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/playlists/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/playlists/get

### Search within a YouTube channel

`GET /youtube/channels/{channel_id}/search`

Search a single YouTube channel's videos by keyword, by its `UC…` channel ID, as a cursor-paginated list. Useful for finding a creator's coverage of a specific topic without scanning their whole catalog.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path), `q` (query)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/search/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/search/get

### List Shorts uploaded by a YouTube channel

`GET /youtube/channels/{channel_id}/shorts`

Return the Shorts uploaded by a YouTube channel, by its `UC…` channel ID, as a cursor-paginated list. Useful for tracking a creator's short-form output and posting cadence.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/shorts/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/shorts/get

### List videos uploaded by a YouTube channel

`GET /youtube/channels/{channel_id}/videos`

Return the videos uploaded by a YouTube channel, by its `UC…` channel ID, as a cursor-paginated list. Useful for profiling a channel's catalog, monitoring uploads, or building an archive.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `channel_id` (path)
- Details: https://unifapi.com/apis/youtube/channels/channel_id/videos/get
- Docs: https://docs.unifapi.com/api/youtube/channels/channel_id/videos/get

### List videos for a YouTube hashtag

`GET /youtube/hashtags/{tag}/videos`

Return the videos YouTube surfaces for a hashtag, by tag (with or without a leading `#`), as a cursor-paginated list. Useful for tracking a campaign or trend across creators.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `tag` (path)
- Details: https://unifapi.com/apis/youtube/hashtags/tag/videos/get
- Docs: https://docs.unifapi.com/api/youtube/hashtags/tag/videos/get

### Get a YouTube playlist by id

`GET /youtube/playlists/{playlist_id}`

Return a YouTube playlist's details by its `PL…` playlist ID — title, description, owner channel, video and view counts, and last-updated time. Useful as the entry point before listing the playlist's videos.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `playlist_id` (path)
- Details: https://unifapi.com/apis/youtube/playlists/playlist_id/get
- Docs: https://docs.unifapi.com/api/youtube/playlists/playlist_id/get

### List videos in a YouTube playlist

`GET /youtube/playlists/{playlist_id}/videos`

Return the videos in a YouTube playlist, by its `PL…` playlist ID, as a cursor-paginated list in playlist order. Useful for ingesting a curated series or course in sequence.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `playlist_id` (path)
- Details: https://unifapi.com/apis/youtube/playlists/playlist_id/videos/get
- Docs: https://docs.unifapi.com/api/youtube/playlists/playlist_id/videos/get

### Resolve a YouTube channel URL to its UC… channel id

`GET /youtube/resolve/channel-id`

Resolve any YouTube channel URL form (`@handle`, `/c/`, or `/channel/`) into its canonical `UC…` channel ID. A lookup helper — useful for normalizing links before calling channel-level endpoints.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `url` (query)
- Details: https://unifapi.com/apis/youtube/resolve/channel-id/get
- Docs: https://docs.unifapi.com/api/youtube/resolve/channel-id/get

### Search YouTube videos by keyword

`GET /youtube/search`

Search YouTube videos by keyword, with optional sort, upload-date, duration, region, and language filters. Returns matching videos with title, channel, and view count. Useful for topic research, competitive monitoring, and content-gap analysis.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `q` (query)
- Details: https://unifapi.com/apis/youtube/search/get
- Docs: https://docs.unifapi.com/api/youtube/search/get

### Search YouTube channels by keyword

`GET /youtube/search/channels`

Search YouTube channels by keyword, returning matching channels with handle, description, and subscriber count. Useful for discovering creators in a niche and building competitor sets.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `q` (query)
- Details: https://unifapi.com/apis/youtube/search/channels/get
- Docs: https://docs.unifapi.com/api/youtube/search/channels/get

### Search YouTube playlists by keyword

`GET /youtube/search/playlists`

Search YouTube playlists by keyword, returning matching playlists with owner channel and video count. Useful for finding curated collections and series on a topic.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `q` (query)
- Details: https://unifapi.com/apis/youtube/search/playlists/get
- Docs: https://docs.unifapi.com/api/youtube/search/playlists/get

### Browse YouTube's trending videos

`GET /youtube/trending`

Return YouTube's country-aware trending videos, optionally scoped to a section (now, music, gaming, or movies). Useful for tracking what is gaining traction in a given market and timing content to live interest.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Details: https://unifapi.com/apis/youtube/trending/get
- Docs: https://docs.unifapi.com/api/youtube/trending/get

### Get a YouTube video by id

`GET /youtube/videos/{video_id}`

Return a single YouTube video's details by its video ID — title, description, channel, duration, category, publish time, and view and like counts. Useful for hydrating a known video or checking its current engagement.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `video_id` (path)
- Details: https://unifapi.com/apis/youtube/videos/video_id/get
- Docs: https://docs.unifapi.com/api/youtube/videos/video_id/get

### List a YouTube video's caption tracks

`GET /youtube/videos/{video_id}/captions`

Return the caption/subtitle tracks available for a YouTube video, by video ID — language, a timed-text url per track, and the languages YouTube can auto-translate into. Useful for transcript pipelines and accessibility tooling.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `video_id` (path)
- Details: https://unifapi.com/apis/youtube/videos/video_id/captions/get
- Docs: https://docs.unifapi.com/api/youtube/videos/video_id/captions/get

### List comments on a YouTube video

`GET /youtube/videos/{video_id}/comments`

Return the comments on a YouTube video, by video ID, as a cursor-paginated list — author, text, like and reply counts. Sort by top (default) or newest. Useful for audience sentiment, FAQ mining, and creator feedback analysis.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `video_id` (path)
- Details: https://unifapi.com/apis/youtube/videos/video_id/comments/get
- Docs: https://docs.unifapi.com/api/youtube/videos/video_id/comments/get

### List YouTube videos related to a given video

`GET /youtube/videos/{video_id}/related`

Return the videos YouTube recommends as related to a given video, by video ID. Useful for mapping a topic's surrounding content and discovering adjacent creators.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `video_id` (path)
- Details: https://unifapi.com/apis/youtube/videos/video_id/related/get
- Docs: https://docs.unifapi.com/api/youtube/videos/video_id/related/get

### Get a YouTube video's transcript

`GET /youtube/videos/{video_id}/transcript`

Return the transcript text for a YouTube video, by video ID, as ordered timestamped segments plus a concatenated plain-text field. Picks the caption track for the requested `lang` (default English, then the first available track), fetches its timed-text and parses it server-side. Returns 404 when the video has no captions.

- Price: 1 credit per record, minimum 1 credit ($0.001) per call
- Required: `video_id` (path)
- Details: https://unifapi.com/apis/youtube/videos/video_id/transcript/get
- Docs: https://docs.unifapi.com/api/youtube/videos/video_id/transcript/get

## Guides

- [Free YouTube trending board](https://unifapi.com/tools/youtube-trending) — What's trending on YouTube right now in any country, by section, free with no account.

## Related APIs

- [Twitter / X API](https://unifapi.com/apis/twitter/index.md) — Users, posts, search, trends, lists, communities
- [Instagram API](https://unifapi.com/apis/instagram/index.md) — Profiles, posts, reels, stories, comments, audio, search
- [Threads API](https://unifapi.com/apis/threads/index.md) — Posts, replies, reposts, search
- [LinkedIn API](https://unifapi.com/apis/linkedin/index.md) — People, companies, posts, jobs, ads, search
- [Reddit API](https://unifapi.com/apis/reddit/index.md) — Subreddits, posts, comments, feeds, search
- [TikTok API](https://unifapi.com/apis/tiktok/index.md) — Videos, creators, comments, hashtags, music
