YouTube tools
Channels, videos, comments and transcripts.
Public YouTube data. Each call costs what the data provider charges for it, and the cost line under each tool below gives the number. A question YouTube cannot answer has no tool, rather than a tool that returns nothing.
| Tool | What it does | Cost |
|---|---|---|
youtube_get_channel | Get a YouTube channel | From 1 credit |
youtube_get_videos | Get a channel's videos | From 1 credit |
youtube_get_video | Get a YouTube video | From 1 credit |
youtube_get_comments | Get a video's comments | From 1 credit |
youtube_search_videos | Search YouTube videos | From 1 credit |
youtube_get_transcript | Get a video's transcript | From 1 credit |
#Get a YouTube channel
youtube_get_channel
One YouTube channel: subscribers, total views and when it joined.
Use when: sizing a channel before a sponsorship, checking a handle, reading a channel description.
Not for: its videos, use youtube_get_videos. Videos by topic, use youtube_search_videos.
Returns: Record. platform, kind, id, handle, name, url, bio, verified, followers, following, posts_count, likes, views, location, website, employees, industry, created_at. A field the platform does not publish is null. kind is channel, followers is the subscriber count.
Cost: 1 credit. Cached 24 hours.
| Parameter | Default and notes |
|---|---|
handle | Required, with or without the @ |
Also takes provider, max_credits, dry_run: see common parameters.
{
"handle": "@ThePatMcAfeeShow"
}#Get a channel's videos
youtube_get_videos
The videos on one YouTube channel, newest or most viewed first.
Use when: "what does this channel publish", judging cadence and view counts before a sponsorship.
Not for: one video in full, use youtube_get_video. What is said in it, use youtube_get_transcript.
Returns: List, one page per call. rows[]: platform, id, url, author, author_name, created_at, text (cut at 2000 characters), likes, comments, shares, views, media, duration_s, is_ad. A number the platform does not publish is null. A listing carries views and length; likes and comments come with youtube_get_video.
Cost: 1 credit per page. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
handle | Required |
sort | "latest" | "popular", default latest |
Also takes cursor, provider, max_credits, dry_run: see common parameters.
{
"handle": "@ThePatMcAfeeShow",
"sort": "popular"
}#Get a YouTube video
youtube_get_video
One YouTube video with its views, likes, comments and length.
Use when: a row is worth the detail, or you have a URL and nothing else.
Not for: what is said in it, use youtube_get_transcript. The comments, use youtube_get_comments.
Returns: Record. rows[]: platform, id, url, author, author_name, created_at, text (cut at 2000 characters), likes, comments, shares, views, media, duration_s, is_ad. A number the platform does not publish is null.
Cost: 1 credit. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
url | Required |
Also takes provider, max_credits, dry_run: see common parameters.
{
"url": "https://www.youtube.com/watch?v=5EWaxmWgQMI"
}#Get a video's comments
youtube_get_comments
The comments on one YouTube video, most liked first.
Use when: reading what an audience said, finding the objections under a review or a tutorial.
Not for: the video itself, use youtube_get_video. What is said in it, use youtube_get_transcript.
Returns: List, one page per call. rows[]: platform, id, post_id, author, created_at, text (cut at 2000 characters), likes, replies, depth. depth is the reply level. meta.cursor pages the next set. created_at is approximate: the platform shows an age such as "3 weeks ago", so it is exact only to that unit.
Cost: 1 credit per page. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
url | Required |
Also takes cursor, provider, max_credits, dry_run: see common parameters.
{
"url": "https://www.youtube.com/watch?v=5EWaxmWgQMI"
}#Search YouTube videos
youtube_search_videos
YouTube videos matching a keyword, ranked by YouTube's own search.
Use when: "what videos cover X", finding review and tutorial coverage of a product or a competitor.
Not for: one channel's own videos, use youtube_get_videos. Text pages about X, use seo_get_serp.
Returns: List, one page per call, ranked. rows[]: platform, id, url, author, author_name, created_at, text (cut at 2000 characters), likes, comments, shares, views, media, duration_s, is_ad. A number the platform does not publish is null. meta.cursor pages the next set. created_at is approximate: the platform shows an age such as "3 weeks ago", so it is exact only to that unit.
Cost: 1 credit per page. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
query | Required |
since | "day" | "week" | "month" | "year" | "all", default month |
sort | "relevance" | "latest" | "popular", default relevance |
Also takes cursor, provider, max_credits, dry_run: see common parameters.
{
"query": "best crm for agencies",
"since": "year"
}#Get a video's transcript
youtube_get_transcript
The transcript of one YouTube video, as text.
Use when: reading a video instead of watching it, pulling claims, chapters or quotes out of long content.
Not for: the video's numbers, use youtube_get_video. The comments, use youtube_get_comments.
Returns: Record. platform, url, language, text (the full transcript, uncut). NoData when the video has no captions.
Cost: 1 credit. Cached 30 days.
| Parameter | Default and notes |
|---|---|
url | Required |
language | Optional, for a video with several |
Also takes provider, max_credits, dry_run: see common parameters.
{
"url": "https://www.youtube.com/watch?v=5EWaxmWgQMI"
}