API 문서는 영어로 제공됩니다.

YouTube Channel

Get a YouTube channel's profile, videos, Shorts, playlists and posts.

GET/api/v1/youtube/channel

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Channel

ParameterTypeDescription
channel_idstringChannel handle (with or without @) or a UC channel ID. Required on the first page; omit with next_page_token.Up to 100 characters.Required on the first page. Use a handle such as @veritasium or a UC channel ID; full URLs are not accepted.
search_querystringSearch within this channel for matching videos and playlists. Cannot be combined with tab or sort. Omit with next_page_token.Up to 2,048 characters.Omit tab and sort when searching. Matching videos and playlists appear in search_results.

Content

Choose a tab and its sort order, or search within the channel.

ParameterTypeDescription
tab"videos" | "shorts" | "streams" | "podcasts" | "playlists" | "posts"Channel content tab. Defaults to videos. Omit when using search_query or next_page_token. Not every channel offers every tab.A channel without the requested tab returns an empty content group with search_information.tab_available set to false.
sort"latest" | "popular" | "oldest" | "dd" | "lad"videos, shorts and streams accept latest, popular or oldest; playlists accept dd (newest playlist) or lad (last video added). Omit with podcasts, posts, search_query or next_page_token.Videos, Shorts and streams default to latest. Playlists default to dd. Sorting uses the choices offered by YouTube.
aboutbooleanInclude additional public channel details, such as country, join date, total views and links. Defaults to false. Omit with next_page_token.Channel profile data is returned on the first page. about=true includes additional public details. Continuation pages return content only.

Localization

ParameterTypeDescription
hlstringInterface language, such as en or pt-BR. Defaults to en. Omit with next_page_token.
glstringTwo-letter country code. Defaults to US. Omit with next_page_token.

Pagination

ParameterTypeDescription
next_page_tokenstringOpaque pagination.next_page_token from this endpoint. Send it alone to continue the channel feed with its original settings. Tokens expire after one hour.Up to 32,768 characters.Send next_page_token alone. The token preserves the channel, selected tab or search, sorting and locale. Use POST for long tokens. Stop when pagination.next_page_token is absent.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result data: channel_results, the selected content group and pagination. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/youtube/channel?channel_id=veritasium&tab=videos" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "channel_id": "veritasium",
  "tab": "videos"
});
const res = await fetch(`https://serpfast.com/api/v1/youtube/channel?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "channel_id": "veritasium",
  "tab": "videos"
}
res = requests.get(
    "https://serpfast.com/api/v1/youtube/channel",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())