# YouTube API

Retrieve YouTube videos, Shorts, comments, captions, subscriber counts, and channel metadata.

Provide channel handles or video URLs. Subscriber counts are totals, not subscriber lists.

- Request: POST https://api.everyinfra.com/api/v1/social with `{"platform": "youtube", "action": "<action>", "params": {...}}`
- Canonical page: [https://everyinfra.com/en/youtube-api](https://everyinfra.com/en/youtube-api?utm_medium=ai_doc&utm_campaign=page_md)
- Each capability uses the price recorded in the public catalog. The response includes the amount charged. Authentication failures, invalid parameters, failed calls, and empty results are not charged.

## Actions

### search — Search
Search YouTube videos by keyword, up to 50 per call. Get channel, description, views, likes, comments, duration and publish date. `sort` orders by relevance, newest, most views or top rating. Results are not complete, and the ranking is not explained.
- Sync delivery · Price: $0.78 per 1,000 requests (every 10 rows count as one call)
- Catalog values: defaultLimit=10, maxLimit=50. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count.
- Parameters:
  - `keyword` (required): The search query term for the YouTube search action. If passed to compatibility inputs for the shorts action, this parameter acts as a channel name rather than initiating a site-wide Shorts search.
  - `sort` (optional): Video search order: `relevance`, `newest`, `most_viewed` or `top_rated`. With `newest`, the videos returned are ordered by `posted_at`, newest first, and videos without `posted_at` come last. YouTube still chooses which videos match the keyword, so older videos can appear. One of: most_viewed, newest, relevance, top_rated.
- Returns fields: id, url, title, text, author_name, author_username, author_id, author_url, like_count, like_count_estimated, comment_count, comment_count_estimated, view_count, view_count_estimated, duration, posted_at, thumbnail_url, hashtags, is_comments_disabled, is_members_only, is_paid_partnership, author_follower_count, author_follower_count_estimated, author_video_count, author_video_count_estimated, author_view_count, author_view_count_estimated, author_created_at, description_links, search_rank, platform
- Capability page: [https://everyinfra.com/en/youtube-api/search](https://everyinfra.com/en/youtube-api/search?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/search.md)

### profile — Channel details
Get a YouTube channel from its channel URL. Get bio, subscriber, video and view counts, verification, location, avatar, banner and creation date. It does not expose YouTube Analytics or a list of subscribers.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
- Returns fields: channel_id, name, url, bio, subscriber_count, subscriber_count_estimated, video_count, video_count_estimated, view_count, view_count_estimated, is_verified, location, avatar_url, banner_url, created_at, platform
- Capability page: [https://everyinfra.com/en/youtube-api/profile](https://everyinfra.com/en/youtube-api/profile?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/profile.md)

### user_posts — Posts by user
List videos from a YouTube channel URL, up to 50 per call. Get title, description, views, likes, comments, duration and publish date. Use `since` for a start date and `sort` for newest, oldest or popular. One batch may not cover the whole channel archive.
- Sync delivery · Price: $0.56 per 1,000 requests (every 10 rows count as one call)
- Catalog values: defaultLimit=10, maxLimit=50. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count.
- Parameters:
  - `url` (required): The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
  - `since` (optional): The lower date bound for filtering channel videos, Shorts, or comments. It applies to those lists only.
  - `sort` (optional): The sort order applied across YouTube actions. For search, accepted values are relevance, newest, most_viewed, and top_rated. For channel videos and Shorts, accepted values are newest, oldest, and popular. For comments, accepted values are newest and popular. Specifying this parameter on a single-video query does not filter that video's content. One of: newest, oldest, popular.
- Returns fields: id, url, title, text, author_name, author_username, author_id, author_url, like_count, like_count_estimated, comment_count, comment_count_estimated, view_count, view_count_estimated, duration, posted_at, thumbnail_url, hashtags, is_comments_disabled, is_members_only, is_paid_partnership, author_follower_count, author_follower_count_estimated, author_video_count, author_video_count_estimated, author_view_count, author_view_count_estimated, author_created_at, description_links, search_rank, platform
- Capability page: [https://everyinfra.com/en/youtube-api/user_posts](https://everyinfra.com/en/youtube-api/user_posts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/user_posts.md)

### video — Video details
Fetch the title, description, channel, views, likes, comment count, duration and publish date of one YouTube video from its watch or share link. Comments and the transcript come from their own actions, `comments` and `transcript`.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
- Returns fields: id, url, title, text, author_name, author_username, author_id, author_url, like_count, like_count_estimated, comment_count, comment_count_estimated, view_count, view_count_estimated, duration, posted_at, thumbnail_url, hashtags, is_comments_disabled, is_members_only, is_paid_partnership, author_follower_count, author_follower_count_estimated, author_video_count, author_video_count_estimated, author_view_count, author_view_count_estimated, author_created_at, description_links, search_rank, platform
- Capability page: [https://everyinfra.com/en/youtube-api/video](https://everyinfra.com/en/youtube-api/video?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/video.md)

### comments — Comments
Read comments on a YouTube video, up to 100 per call. Each comment has text, author, likes, reply count, date and a reply flag. Sort by newest or popular, and set a start date with `since`. Use `reply_to_id` to link replies. The full thread is not promised.
- Sync delivery · Price: $0.56 per 1,000 requests (every 20 rows count as one call)
- Catalog values: defaultLimit=20, maxLimit=100. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count. For the next page, pass next_page_token back as page_token with the other parameters unchanged; each page is billed by its row count, one call per 20 rows.
- Parameters:
  - `url` (required): The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
  - `page_token` (optional): Page token. To paginate, pass an empty string (`page_token=""`) for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. Each page holds at least `limit` top-level comments (default 20, when that many remain) with their replies, as whole pages, so often more. `since` can't be combined with `page_token`. Each page counts as one call. Tokens last 24 hours, and the last page has no `next_page_token`. A request without `page_token` works as before, returning at most 100 comments; it sometimes includes a `next_page_token` that can be followed the same way. To paginate, start from `page_token=""`.
  - `since` (optional): The lower date bound for filtering channel videos, Shorts, or comments. It applies to those lists only.
  - `sort` (optional): The sort order applied across YouTube actions. For search, accepted values are relevance, newest, most_viewed, and top_rated. For channel videos and Shorts, accepted values are newest, oldest, and popular. For comments, accepted values are newest and popular. Specifying this parameter on a single-video query does not filter that video's content. One of: newest, popular.
- Returns fields: id, text, author_name, like_count, like_count_estimated, reply_count, reply_count_estimated, posted_at, published_text, is_reply, reply_to_id, platform
- Capability page: [https://everyinfra.com/en/youtube-api/comments](https://everyinfra.com/en/youtube-api/comments?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/comments.md)

### followers — Followers
Check the subscriber count of a YouTube channel from its handle. Get `follower_count`, `channel_id`, `display_name` and a `precision` flag; a rounded count has `follower_count_estimated` true and `precision` `approximate`. `following_count`, `post_count`, `like_count` and `connection_count` can be absent. Pass the @handle in `username`. It returns aggregate counts, not a list of subscribers.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `username` (required): The channel handle (optional leading @) required by the followers and shorts actions; `followers` also accepts a channel ID starting with UC or a channel link. The followers action returns aggregate subscriber counts rather than user lists. The shorts action prioritizes handles and does not treat UC... channel IDs as identical identifiers.
  - `channel` (optional): A compatibility alias for specifying a channel handle. Full /channel/UC... URLs may fail to parse across helper utilities, so prefer passing a handle or using the URL parameter explicitly provided by the action.
- Returns fields: id, username, url, follower_count, following_count, post_count, like_count, connection_count, precision, platform, channel_id, display_name, follower_count_estimated
- Capability page: [https://everyinfra.com/en/youtube-api/followers](https://everyinfra.com/en/youtube-api/followers?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/followers.md)

### transcript — Transcript
Pull the captions of a YouTube video as full text and timestamped segments, with the track language, available languages and channel details. `language` requests a track, but not every video has captions and automatic translation is not guaranteed.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
  - `language` (optional): The requested language code for transcript content. Subtitles are returned based on available tracks; automatic translation is not guaranteed.
- Returns fields: id, url, title, text, segments, language, available_languages, channel_id, channel_name, channel_username, view_count, view_count_estimated, like_count, like_count_estimated, comment_count, comment_count_estimated, posted_at, platform
- Capability page: [https://everyinfra.com/en/youtube-api/transcript](https://everyinfra.com/en/youtube-api/transcript?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/transcript.md)

### shorts — Shorts
Browse the Shorts of a YouTube channel by handle, up to 100 per call. Get title, thumbnail, views, likes, duration and publish date. Pass a handle in `username`, not a UC channel ID. One batch may not include every Short on the channel.
- Sync delivery · Price: $0.56 per 1,000 requests (every 20 rows count as one call)
- Catalog values: defaultLimit=20, maxLimit=100. For some actions a limit controls pages or per-parent expansion, so it is not always the final row count.
- Parameters:
  - `username` (required): The channel handle (optional leading @) required by the followers and shorts actions; `followers` also accepts a channel ID starting with UC or a channel link. The followers action returns aggregate subscriber counts rather than user lists. The shorts action prioritizes handles and does not treat UC... channel IDs as identical identifiers.
  - `channel` (optional): A compatibility alias for specifying a channel handle. Full /channel/UC... URLs may fail to parse across helper utilities, so prefer passing a handle or using the URL parameter explicitly provided by the action.
  - `since` (optional): The lower date bound for filtering channel videos, Shorts, or comments. It applies to those lists only.
  - `sort` (optional): The sort order applied across YouTube actions. For search, accepted values are relevance, newest, most_viewed, and top_rated. For channel videos and Shorts, accepted values are newest, oldest, and popular. For comments, accepted values are newest and popular. Specifying this parameter on a single-video query does not filter that video's content. One of: newest, oldest, popular.
- Returns fields: id, url, title, thumbnail_url, view_count, view_count_estimated, like_count, like_count_estimated, duration, posted_at, author_name, author_id, author_url, platform
- Capability page: [https://everyinfra.com/en/youtube-api/shorts](https://everyinfra.com/en/youtube-api/shorts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/shorts.md)

### comment_replies — Comment replies
Read the replies under one YouTube comment, on a video or on a channel post, from the link and the comment's `comment_id` (a `comments` or `community_post_comments` row's `id`). Each reply has text, author, likes, the time YouTube shows, and creator, pinned, hearted and edited flags. About 10 on the first page and up to about 50 after; pass `next_page_token` back as `page_token` for more.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 10 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `url` (required): The video link (watch?v=, youtu.be or shorts) or the channel post link (`https://www.youtube.com/post/Ugkx…`) the comment is on.
  - `comment_id` (required): ID of the top-level comment, starting with Ug, taken from the `id` of a `comments` or `community_post_comments` row. A reply's ID also works and reads the comment it belongs to. A value that is not recognized returns 422 and is not charged.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 10 replies on the first page and up to about 50 on later pages; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: id, url, text, author_name, author_username, author_id, author_url, author_avatar_url, like_count, like_count_estimated, reply_count, reply_count_estimated, posted_at, published_text, is_reply, reply_to_id, is_creator, is_verified, is_pinned, is_hearted, is_edited, video_id, post_id, platform
- Capability page: [https://everyinfra.com/en/youtube-api/comment_replies](https://everyinfra.com/en/youtube-api/comment_replies?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/comment_replies.md)

### related_posts — Related posts
List the videos, Shorts and playlists YouTube recommends next to one video, from the video link. Each row has `type`, title, channel, view count, duration, the time YouTube shows and badges. About 20 per page; pass `next_page_token` back as `page_token` for more.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 20 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `url` (required): A YouTube video link (watch?v=, youtu.be, shorts and live links work).
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 20 rows per page, as YouTube sends them; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, badges, is_live, is_upcoming, playlist_id, video_count, video_count_estimated, platform
- Capability page: [https://everyinfra.com/en/youtube-api/related_posts](https://everyinfra.com/en/youtube-api/related_posts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/related_posts.md)

### resolve_channel — Channel ID lookup
Turn a YouTube channel link, @handle, UC channel ID or channel name into the channel's ID, handle, display name and both links. When `channel` is a name, `matched_by` says how it matched: `handle`, or `search` for the first channel found by name (check that it is the one you wanted).
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `channel` (required): The channel to look up, in any of four forms: a channel link (`https://www.youtube.com/@NASA` or `https://www.youtube.com/channel/UC…`), an @handle, a channel ID that starts with UC, or a channel name. A name is tried as an @handle first, then searched; `matched_by` tells you which.
- Returns fields: channel_id, username, name, url, channel_url, matched_by, platform
- Capability page: [https://everyinfra.com/en/youtube-api/resolve_channel](https://everyinfra.com/en/youtube-api/resolve_channel?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/resolve_channel.md)

### community_posts — Community posts
Page through the posts in a YouTube channel's Posts tab, newest first, from the channel link or @handle. Each post has text, likes, comment count, the time YouTube shows, and its attachment: images, a video, or poll options and total votes. 10 per page; pass `next_page_token` back as `page_token` for more.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 10 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `url` (required): A YouTube channel link (`https://www.youtube.com/@NASA` or `https://www.youtube.com/channel/UC…`), an @handle, or a channel ID that starts with UC. Returns the posts in the channel's Posts tab, newest first.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. 10 posts per page; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: id, url, text, author_name, author_username, author_id, author_url, author_avatar_url, like_count, like_count_estimated, comment_count, comment_count_estimated, published_text, attachment_type, image_urls, video_id, video_title, poll_options, poll_total_votes, links, platform
- Capability page: [https://everyinfra.com/en/youtube-api/community_posts](https://everyinfra.com/en/youtube-api/community_posts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/community_posts.md)

### community_post — Channel post
Open one YouTube channel post from its link and get its text, likes, comment count, the time YouTube shows, author, and attachment: images, a video, or poll options and total votes.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): A YouTube channel post link (`https://www.youtube.com/post/Ugkx…`), or just the part after /post/.
- Returns fields: id, url, text, author_name, author_username, author_id, author_url, author_avatar_url, like_count, like_count_estimated, comment_count, comment_count_estimated, published_text, attachment_type, image_urls, video_id, video_title, poll_options, poll_total_votes, links, platform
- Capability page: [https://everyinfra.com/en/youtube-api/community_post](https://everyinfra.com/en/youtube-api/community_post?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/community_post.md)

### community_post_comments — Channel post comments
Read the comments on one YouTube channel post from its link. Each comment has text, author, likes, reply count, the time YouTube shows, and creator, pinned, hearted and edited flags. 20 per page; pass `next_page_token` back as `page_token` for more. A post with comments turned off returns an empty list.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 20 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `url` (required): A YouTube channel post link (`https://www.youtube.com/post/Ugkx…`), or just the part after /post/. A post with comments turned off returns an empty list.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. 20 comments per page; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: id, url, text, author_name, author_username, author_id, author_url, author_avatar_url, like_count, like_count_estimated, reply_count, reply_count_estimated, posted_at, published_text, is_reply, reply_to_id, is_creator, is_verified, is_pinned, is_hearted, is_edited, post_id, platform
- Capability page: [https://everyinfra.com/en/youtube-api/community_post_comments](https://everyinfra.com/en/youtube-api/community_post_comments?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/community_post_comments.md)

### search_in_channel — Search in channel
Search inside one YouTube channel by keyword, from the channel link or @handle. Rows are videos, Shorts and playlists (see `type`) with title, view count, duration, the time YouTube shows and badges. About 30 per page; pass `next_page_token` back as `page_token` for more.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 30 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `url` (required): A YouTube channel link (`https://www.youtube.com/@NASA` or `https://www.youtube.com/channel/UC…`), an @handle, or a channel ID that starts with UC. Only this channel is searched.
  - `keyword` (required): Search words, up to 200 characters. Results mix videos, Shorts and playlists; check each row's `type`.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 30 rows per page, as YouTube sends them; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, badges, is_live, is_upcoming, playlist_id, video_count, video_count_estimated, platform
- Capability page: [https://everyinfra.com/en/youtube-api/search_in_channel](https://everyinfra.com/en/youtube-api/search_in_channel?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/search_in_channel.md)

### shorts_search — Shorts search
Search YouTube Shorts across the whole site by keyword, with optional `sort` and `date_range`. Each Short has title, channel, view count, the time YouTube shows and `is_backfill` for related Shorts YouTube adds when matches run short. About 50 per page and the count varies; pass `next_page_token` back as `page_token` for more.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 50 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `keyword` (required): Search words, up to 200 characters. Searches Shorts across the whole site, not one channel.
  - `date_range` (optional): Upload time: `last_hour`, `today`, `this_week`, `this_month` or `this_year`; leave it out for any time. A value that is not recognized returns 422 and is not charged. One of: last_hour, this_month, this_week, this_year, today.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 50 Shorts per page, and the count varies a lot between pages; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
  - `sort` (optional): Order: `relevance` (default), `newest`, `most_viewed` or `top_rated`. A value that is not recognized returns 422 and is not charged. One of: most_viewed, newest, relevance, top_rated.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, badges, is_backfill, platform
- Capability page: [https://everyinfra.com/en/youtube-api/shorts_search](https://everyinfra.com/en/youtube-api/shorts_search?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/shorts_search.md)

### user_search — Account search
Find YouTube channels by name or keyword. Each channel has channel ID, name, handle, link, bio, subscriber and video counts, verification flag and avatar. 20 per page; pass `next_page_token` back as `page_token` for more. The `channel_id` works in `resolve_channel`, `community_posts` and `search_in_channel`.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 20 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `keyword` (required): Search words, up to 200 characters. Matches channels by name.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. 20 channels per page; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: channel_id, name, username, url, bio, subscriber_count, subscriber_count_estimated, video_count, video_count_estimated, is_verified, avatar_url, platform
- Capability page: [https://everyinfra.com/en/youtube-api/user_search](https://everyinfra.com/en/youtube-api/user_search?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/user_search.md)

### search_suggest — Search suggestions
Get the suggestions YouTube's search box shows for what you type, about 14 in one call, in order. Set `language` and `country` to see another market's suggestions.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `keyword` (required): What you type into the search box, such as `minecraft`, up to 200 characters.
  - `country` (optional): Market of the suggestions, as a two-letter country code such as `US` or `JP`; `US` when left out. A value that is not recognized returns 422 and is not charged.
  - `language` (optional): Language of the suggestions, as a language code such as `en`, `ja` or `zh-CN`; `en` when left out. A value that is not recognized returns 422 and is not charged.
  - `limit` (optional): Positive integer (≥1): the maximum number of results to return; omit it to get every result from this call. Setting it only trims the response to at most this many and never fetches more; billing is the same with or without `limit`, whatever the value.
- Returns fields: rank, keyword, platform
- Capability page: [https://everyinfra.com/en/youtube-api/search_suggest](https://everyinfra.com/en/youtube-api/search_suggest?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/search_suggest.md)

### video_formats — Video formats
List the formats a YouTube video has, from its link: quality, codec, bitrate, size, frame rate and audio quality for each format, with no playback URLs. Use `media_links` or `stream_url` for the URLs.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): A YouTube video link (watch?v=, youtu.be, shorts and live links work). Returns the formats only, with no playback URLs.
- Returns fields: id, title, author_name, author_id, duration, view_count, is_live, thumbnail_url, available_qualities, formats, adaptive_formats, hls_manifest_url, dash_manifest_url, expires_at, expires_in_seconds, platform
- Capability page: [https://everyinfra.com/en/youtube-api/video_formats](https://everyinfra.com/en/youtube-api/video_formats?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/video_formats.md)

### media_links — Media download links
Get every format of a YouTube video with its playback URL, from the video link. Each format has `itag`, quality, codec, bitrate and size; the URLs expire about 6 hours after you fetch them (`expires_at`), so fetch again after that.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): A YouTube video link (watch?v=, youtu.be, shorts and live links work). The URLs expire about 6 hours after the call.
- Returns fields: id, title, author_name, author_id, duration, view_count, is_live, thumbnail_url, available_qualities, formats, adaptive_formats, hls_manifest_url, dash_manifest_url, expires_at, expires_in_seconds, platform
- Capability page: [https://everyinfra.com/en/youtube-api/media_links](https://everyinfra.com/en/youtube-api/media_links?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/media_links.md)

### stream_url — Format stream URL
Get the playback URL of one format of a YouTube video, from the video link and the format's `itag` (taken from `video_formats` or `media_links`). Returns the URL, MIME type, quality and size, and when the URL expires. A video without that format returns an empty result.
- Sync delivery · Price: $0.56 per 1,000 requests
- Parameters:
  - `url` (required): A YouTube video link (watch?v=, youtu.be, shorts and live links work).
  - `itag` (required): Which format: YouTube's format number, an integer from 1 to 9999, taken from the `itag` of `video_formats` or `media_links` (140 is m4a audio). A video without that format returns an empty result. A value that is not recognized returns 422 and is not charged.
- Returns fields: id, itag, url, mime_type, quality_label, content_length, expires_at, expires_in_seconds, platform
- Capability page: [https://everyinfra.com/en/youtube-api/stream_url](https://everyinfra.com/en/youtube-api/stream_url?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/stream_url.md)

### channel_lives — Channel live streams
List the entries on a YouTube channel's Live tab from `channel_id`: streams that are live now, past streams and upcoming ones. `sort` is `newest` (default), `popular` or `oldest`. Each row has title, link, view count, `duration`, `is_live` and `is_upcoming`. About 30 per page and the count varies; pass `next_page_token` back as `page_token` for more. When nothing could be read this time, the call returns 503 and is not charged.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 30 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `channel_id` (required): The channel for `channel_lives` and `channel_playlists`: a channel ID starting with UC, a channel link (`https://www.youtube.com/@NASA`) or an @handle. A value that is not recognized returns 422 and is not charged.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 30 per page, and the count varies; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
  - `sort` (optional): Order: `newest` (default), `popular` or `oldest`, like the buttons on the channel page. When you page, keep it the same as on the first page. One of: newest, oldest, popular.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, preview_url, badges, is_live, is_upcoming, platform
- Capability page: [https://everyinfra.com/en/youtube-api/channel_lives](https://everyinfra.com/en/youtube-api/channel_lives?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/channel_lives.md)

### channel_playlists — Channel playlists
List the playlists on a YouTube channel's Playlists tab from `channel_id`. Each row has title, link, thumbnail, `playlist_id`, `video_count` and `is_course`. About 30 per page; pass `next_page_token` back as `page_token` for more, and pass a row's `playlist_id` to `playlist_videos` to list its videos. When nothing could be read this time, the call returns 503 and is not charged.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 30 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `channel_id` (required): The channel for `channel_lives` and `channel_playlists`: a channel ID starting with UC, a channel link (`https://www.youtube.com/@NASA`) or an @handle. A value that is not recognized returns 422 and is not charged.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 30 playlists per page, and the count varies; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: type, id, url, title, author_name, author_id, author_url, thumbnail_url, playlist_id, video_count, video_count_estimated, is_course, platform
- Capability page: [https://everyinfra.com/en/youtube-api/channel_playlists](https://everyinfra.com/en/youtube-api/channel_playlists?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/channel_playlists.md)

### playlist_videos — Playlist videos
List the videos of a YouTube playlist in the playlist's order from `playlist_id` (an ID starting with PL, UU or OLAK5uy_, or a link with `list=`). Each row has title, channel, view count, `duration` and `playlist_index`, the position in the playlist. About 100 per page; pass `next_page_token` back as `page_token` for more. Mixes that YouTube generates itself (IDs starting with RD) are rejected before you are charged. When nothing could be read this time, the call returns 503 and is not charged.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 100 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `playlist_id` (required): The playlist for `playlist_videos`: an ID starting with PL, UU or OLAK5uy_, or a YouTube link with `list=`. Mixes that YouTube generates itself (IDs starting with RD) are rejected with 422 before you are charged.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 100 per page, and the count varies; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, preview_url, badges, is_live, is_upcoming, playlist_index, platform
- Capability page: [https://everyinfra.com/en/youtube-api/playlist_videos](https://everyinfra.com/en/youtube-api/playlist_videos?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/playlist_videos.md)

### video_search — Video search
Search YouTube for videos only by `keyword`, with an optional upload-time filter in `sort`: `hour`, `today`, `week`, `month` (the default) or `year`. Each row has title, channel, view count, `duration` and the time YouTube shows. About 20 per page; pass `next_page_token` back as `page_token` for more, with `sort` the same as on the first page. When nothing could be read this time, the call returns 503 and is not charged.
- Sync delivery · Price: $0.56 per 1,000 requests
- Each call returns one page of up to 20 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `keyword` (required): The search term; only videos are searched.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. About 20 per page, and the count varies; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
  - `sort` (optional): Filter by upload time: `hour`, `today`, `week`, `month` or `year`; `month` when left out. When you page, keep it the same as on the first page. One of: hour, month, today, week, year.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, preview_url, badges, is_live, is_upcoming, platform
- Capability page: [https://everyinfra.com/en/youtube-api/video_search](https://everyinfra.com/en/youtube-api/video_search?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/video_search.md)

### hashtag — Hashtag
List the videos and Shorts on a YouTube hashtag page, in the order YouTube shows them, from the hashtag name or its link, with optional `language` and `country`. Each row has title, channel, view count, duration and the time YouTube shows; first-page rows also carry the hashtag's approximate video and channel counts. Up to 36 per page; most hashtags end on the first page.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 36 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `hashtag` (required): The hashtag for `hashtag`: its name with or without `#` (`cooking`, `#cooking`) or a hashtag page link such as `https://www.youtube.com/hashtag/cooking`; case does not matter. Letters, digits and underscores in any script, no spaces, at most 100 characters. A value that is not recognized returns 422 and is not charged; a hashtag with nothing to watch returns an empty result and is not charged.
  - `country` (optional): Country, as a two-letter code such as `US` or `JP`; `US` when left out. It changes which videos YouTube shows. A value that is not recognized returns 422 and is not charged.
  - `language` (optional): Interface language, as a language code such as `en`, `ja` or `zh-CN`; `en` when left out. It changes how `published_text` is written and which title shows when a creator set titles in several languages; content is not translated. A value that is not recognized returns 422 and is not charged.
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged, `language` and `country` included. About 6 to 36 per page depending on the hashtag, and most hashtags end on the first page; each page is one call and `limit` has no effect. Tokens last 24 hours, and the last page has no `next_page_token`.
- Returns fields: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified, view_count, view_count_estimated, duration, published_text, thumbnail_url, preview_url, badges, is_live, is_upcoming, hashtag_name, hashtag_video_count, hashtag_video_count_estimated, hashtag_channel_count, hashtag_channel_count_estimated, platform
- Capability page: [https://everyinfra.com/en/youtube-api/hashtag](https://everyinfra.com/en/youtube-api/hashtag?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/hashtag.md)

### recommended_shorts — Recommended Shorts
Read a page of YouTube's Shorts recommendation feed, with no parameters. It is not a trending chart: the feed is not ranked by popularity and changes from call to call. Every row has the Short's ID, link and cover; title, channel and duration come only when YouTube sends them. About 40 per page, with no repeats along one chain of pages.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 40 rows. The number of rows varies from page to page, so a short page is not the end. For the next page, pass the response's top-level next_page_token as page_token; stop when there is none. limit is accepted and has no effect.
- Parameters:
  - `page_token` (optional): Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received. About 40 Shorts per page, sometimes a few more or fewer, and pages in one chain do not repeat a Short; each page is one call and `limit` has no effect. Tokens last 24 hours.
- Returns fields: type, id, url, title, text, author_name, author_id, author_url, duration, thumbnail_url, platform
- Capability page: [https://everyinfra.com/en/youtube-api/recommended_shorts](https://everyinfra.com/en/youtube-api/recommended_shorts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/youtube-api/recommended_shorts.md)

## YouTube API questions

### What can I retrieve with the YouTube API?

Set `platform` to `youtube`. The current catalog lists search, channel details, posts by user, video details, comments, and more. These action names identify different YouTube objects or views; they are not interchangeable search modes.

### Does YouTube have an official API?

Yes. The YouTube Data API v3 reads public videos, channels and comments with an API key, and the account being read does not need to authorize anything. The default quota is 10,000 units per day per project, and search is capped at 100 calls a day. With EveryInfra, you skip setting up a Google Cloud project and managing quota, and use the same API key and request format as on other platforms.

Official sources (checked 2026-11-21): [YouTube Data API: authentication guide](https://developers.google.com/youtube/v3/guides/authentication) · [YouTube Data API: quota costs](https://developers.google.com/youtube/v3/determine_quota_cost)

### Do I need a YouTube developer account or API key?

No. Requests go through EveryInfra with an EveryInfra API key: sign up, create a key in the console and send it as `Authorization: Bearer <API_KEY>`. You do not register a YouTube developer app, apply for YouTube API access or sign in with a YouTube account, and the actions return public YouTube data only.

### How much does the YouTube API cost per 1,000 requests?

each action's price is listed in the table on this page and in the public catalog. There is no subscription: you top up a USD balance and pay per call, and failed calls and empty results are not charged.

### Which input starts the YouTube `search` request?

The search query term for the YouTube search action. If passed to compatibility inputs for the shorts action, this parameter acts as a channel name rather than initiating a site-wide Shorts search. Send it as `keyword` inside `params`.

### Which fields can YouTube `search` return?

Its declared schema includes `title`, `text`, `author_name`, and `author_username`. A declared field can still be absent from an individual record, and every other action has its own field list.

### Does every YouTube action return immediately?

Actions labeled asynchronous return a job ID you poll. Every other action can also run asynchronously: add `"mode": "async"` to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.

## Also

- Machine catalog (no key): https://everyinfra.com/openapi.json · GET /api/v1/social/catalog?platform=youtube
- API guide for AI clients: https://everyinfra.com/llms.txt · agents guide: https://everyinfra.com/agents.md
