Data APIs · YouTube
YouTube data APIs for AI agents
morigraph has 19 YouTube data APIs that Claude, ChatGPT, Cursor, Codex or your own code can call, including search, video, channel and channel community posts. You need no YouTube developer account or API key, only one morigraph connection. Calls cost from 0.004 credits, about $0.40 for 1,000 calls, paid from one balance.
- APIs
- 19
- Price
- 0.004 to 0.039 credits a call
- Call it from
- MCP, command line and HTTP API
- Needs
- One morigraph connection. No YouTube account or API key
Three ways to call it
Every data API is run by one tool, data_api, with the API's id and its arguments. The example is YouTube Search.
In your assistant (MCP). Connect once, then ask in plain words
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
Use morigraph's YouTube Search data API with {"query":"how to cook rice"} and summarise what comes back.From a terminal or script (CLI)
npx @morigraph/cli@latest login
morigraph call data_api --json-args '{"api":"youtube.search","input":{"query":"how to cook rice"}}'From your own code (HTTP API)
curl https://api.morigraph.com/v1/tools/data_api \
-H "Authorization: Bearer $MORIGRAPH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"youtube.search","input":{"query":"how to cook rice"}}'19 YouTube data APIs
| API | Id | Price |
|---|---|---|
| YouTube Search | youtube.search | 0.004 credits a call |
| YouTube Video | youtube.video | 0.009 credits a call |
| YouTube Channel | youtube.channel | 0.005 credits a call |
| YouTube Channel Community Posts | youtube.channel_community_posts | 0.024 credits a call |
| YouTube Channel Live Streams | youtube.channel_lives | 0.024 credits a call |
| YouTube Channel Playlists | youtube.channel_playlists | 0.024 credits a call |
| YouTube Channel Public Email | youtube.channel_public_email | 0.024 credits a call |
| YouTube Channel Shorts | youtube.channel_shorts | 0.019 credits a call |
| YouTube Channel Videos | youtube.channel_videos | 0.012 credits a call |
| YouTube Comment Replies | youtube.comment_replies | 0.024 credits a call |
| YouTube Community Post | youtube.community_post | 0.024 credits a call |
| YouTube Hashtag Search | youtube.search_hashtag | 0.024 credits a call |
| YouTube Playlist | youtube.playlist | 0.024 credits a call |
| YouTube Shorts Search | youtube.search_shorts | 0.023 credits a call |
| YouTube Trending Shorts | youtube.trending_shorts | 0.024 credits a call |
| YouTube Video Comments | youtube.video_comments | 0.012 credits a call |
| YouTube Video Sponsors | youtube.video_sponsors | 0.024 credits a call |
| YouTube Video Transcript | youtube.video_transcript | 0.014 credits a call |
| YouTube Video Transcript (Provenance) | youtube.video_transcript_full | 0.039 credits a call |
YouTube Search
Search YouTube and get matching videos (title, channel, views, length, publish time) as normalized JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Continuation token from a previous response for pagination. |
query | string | yes | The YouTube search query. |
requireCursor | boolean | no | Deprecated; send `requireFields: ["nextCursor"]` instead, which does exactly the same thing. Set true if you intend to page through results, so the request is only served by a source that can return a nextCursor. Omit it and routing is u… |
sortBy | relevance | popular | no | Sort order: "relevance" (default) or "popular" (most-viewed). |
uploadDate | today | this_week | this_month | this_year | no | Filter by upload recency. Omit for any time. |
Returns authorAvatarUrl authorId channel id image lengthText nextCursor publishedTime title url videos views
The call
data_api({"api":"youtube.search","input":{"query":"how to cook rice"}})YouTube Video
Fetch a YouTube video or Short's metadata (title, channel, views, likes, duration, publish date) by URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | YouTube video ID. A Short uses the same ID as any other video. |
url | string | no | Full YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work. |
Returns authorAvatarUrl authorId authorUrl category channel comments createdUtc description durationMs id image keywords likes title views
The call
data_api({"api":"youtube.video","input":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}})YouTube Channel
Fetch a YouTube channel's stats (subscribers, video count, total views, description) and the links on its About page, by handle or channel ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID (UC...). Pass it directly when you have it: some sources accept only the ID and otherwise look up the handle first, which adds a step. |
handle | string | no | YouTube channel handle. |
Returns avatarUrl channelId description handle links subscribers title url videos views
The call
data_api({"api":"youtube.channel","input":{"handle":"@mkbhd"}})YouTube Channel Community Posts
List a YouTube channel's community posts by handle or channel ID with cursor pagination (text, likes, image, publish time).
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID. |
cursor | string | no | Continuation token from a previous response for pagination. |
handle | string | no | YouTube channel handle. |
Returns channelHandle channelId channelTitle content id image images likeCount nextCursor posts publishedTime url
The call
data_api({"api":"youtube.channel_community_posts","input":{"handle":"@MrBeast"}})YouTube Channel Live Streams
List a YouTube channel's live and past-live streams by handle or channel ID with cursor pagination (title, views, length, publish time).
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID. |
cursor | string | no | Continuation token from a previous response for pagination. |
handle | string | no | YouTube channel handle. |
Returns id image lengthText lives nextCursor publishedTime title url
The call
data_api({"api":"youtube.channel_lives","input":{"handle":"@IShowSpeed"}})YouTube Channel Playlists
List a YouTube channel's playlists by handle or channel ID with cursor pagination (title, video count, thumbnail).
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID. |
cursor | string | no | Continuation token from a previous response for pagination. |
handle | string | no | YouTube channel handle. |
Returns id nextCursor playlistUrl playlists thumbnail title videoCount videoId videoUrl
The call
data_api({"api":"youtube.channel_playlists","input":{"handle":"@veritasium"}})YouTube Channel Public Email
Get the email address a YouTube creator writes in the channel's public description, the text anyone can read on the About tab. It never returns the business email YouTube hides behind the View email address button; youtube.channel_contact reveals that one.
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID (UC...). |
handle | string | no | YouTube channel handle, with or without the leading @. |
Returns email
The call
data_api({"api":"youtube.channel_public_email","input":{"handle":"@mkbhd"}})YouTube Channel Shorts
List a YouTube channel's Shorts by handle or channel ID with cursor pagination, views, and publish timestamps.
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID beginning with UC. |
cursor | string | no | Continuation token from a previous response. |
handle | string | no | YouTube channel handle, including or omitting the leading @. |
sort | latest | newest | popular | no | Sort order for the Shorts feed. latest and newest are equivalent. |
Returns contentType createdUtc duration id image likes nextCursor shorts title url views viewsAvailable
The call
data_api({"api":"youtube.channel_shorts","input":{"handle":"@zachking","sort":"latest"}})YouTube Channel Videos
List the regular videos on a YouTube channel's Videos tab by handle or channel ID, with cursor pagination (title, views, length, publish time). Shorts are not included; use youtube.channel_shorts for them and youtube.channel_lives for live streams.
| Argument | Type | Required | What it is |
|---|---|---|---|
channelId | string | no | YouTube channel ID. |
cursor | string | no | Continuation token from a previous response for pagination. |
handle | string | no | YouTube channel handle. |
sort | latest | popular | no | Sort order. |
Returns createdUtc id image lengthText nextCursor publishedTime title url videos views
The call
data_api({"api":"youtube.channel_videos","input":{"handle":"@mkbhd"}})YouTube Comment Replies
List replies to a YouTube comment using a continuation token with cursor pagination (text, author, likes, publish time).
| Argument | Type | Required | What it is |
|---|---|---|---|
continuationToken | string | yes | Replies continuation token from the comments endpoint, or the continuationToken from a previous replies response for further pagination. |
Returns authorAvatarUrl authorId authorName authorUrl authorVerified comments content id likes nextCursor publishedTime
The call
data_api({"api":"youtube.comment_replies","input":{"continuationToken":"Eg0SC19fZm1EajBaSjFRGAYygwEaUBIaVWd3aXRjRk9fdmtpM0x4LUNfZDRBYUFCQWciAggAKhhVQ1g2T1EzRGtjc2JZTkU2SDh1UVF1VkEyC19fZm1EajBaSjFRQABICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dpdGNGT192a2kzTHgtQ19kNEFhQUJBZw=="}})YouTube Community Post
Fetch a single YouTube community post by URL (text, images, channel, publish time).
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | URL of the YouTube community post. |
Returns channelHandle channelId channelTitle content id image images likeCount publishedTime
The call
data_api({"api":"youtube.community_post","input":{"url":"https://www.youtube.com/post/Ugkx1LonSRBBUqASv-J8j9_FesxwlMAhT3_e"}})YouTube Hashtag Search
Search YouTube videos by hashtag with cursor pagination (title, channel, views, length, publish time).
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Continuation token from a previous response for pagination. |
hashtag | string | yes | Hashtag to search for (without the leading #). |
type | all | no | Content filter. Only "all" is served: no source we buy returns a Shorts row with the channel and publish time this endpoint requires. |
Returns authorAvatarUrl authorHandle authorId channelTitle durationSeconds id image lengthText nextCursor publishedTime title url videos views
The call
data_api({"api":"youtube.search_hashtag","input":{"hashtag":"funny"}})YouTube Playlist
List every video in a YouTube playlist (title, length, and channel per video plus playlist owner and totals).
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | The nextCursor from the previous page, to get the next page of videos. Send the same playlistId with it. |
playlistId | string | yes | The playlist ID: the "list" parameter in a playlist URL (e.g. "PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi"). |
Returns authorHandle authorId authorUrl channel id lengthSeconds lengthText nextCursor owner thumbnail title totalVideos url videos
The call
data_api({"api":"youtube.playlist","input":{"playlistId":"PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"}})YouTube Shorts Search
Search YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Continuation token from a previous response for pagination. |
query | string | yes | The keyword to search Shorts for. |
sortBy | relevance | popular | no | Sort order: "relevance" (default) or "popular" (most-viewed). |
uploadDate | today | this_week | this_month | this_year | no | Filter by upload recency. Omit for any time. |
Returns contentType id nextCursor shorts title url viewsAvailable
The call
data_api({"api":"youtube.search_shorts","input":{"query":"cats"}})YouTube Trending Shorts
List currently trending YouTube Shorts (title, channel, views, likes, duration).
This API takes no arguments.
Returns authorHandle authorId authorUrl category channelTitle createdUtc duration durationMs id image likes shorts title url views
The call
data_api({"api":"youtube.trending_shorts","input":{}})YouTube Video Comments
List the comments on a YouTube video or Short by URL with cursor pagination (text, author, likes, reply count).
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Continuation token from a previous response for pagination. |
order | top | newest | no | Comment order (e.g. top, newest). |
url | string | yes | Full YouTube video URL. Shorts (youtube.com/shorts/...) and youtu.be URLs also work. |
Returns author authorAvatarUrl authorId authorUrl comments id likes nextCursor publishedTime replies repliesContinuationToken text
The call
data_api({"api":"youtube.video_comments","input":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}})YouTube Video Sponsors
Detect suspected sponsors and paid promotions in a YouTube video by URL (sponsor names, websites, confidence).
| Argument | Type | Required | What it is |
|---|---|---|---|
language | string | no | 2-letter language code for transcript lookup (e.g. en, es, fr). |
url | string | yes | YouTube video or Short URL. |
Returns authorAvatarUrl authorHandle authorId authorName authorUrl confidence detectionStatus isPaidPromotion name suspectedSponsors title url videoId website
The call
data_api({"api":"youtube.video_sponsors","input":{"url":"https://www.youtube.com/watch?v=AVO0ifle-OU"}})YouTube Video Transcript
Fetch the transcript/captions of a YouTube video or Short by URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | YouTube video ID. A Short uses the same ID as any other video. |
url | string | no | Full YouTube video URL carrying the video id. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work. A link without the video id, such as https://www.youtube.com/watch?v= or a channel link, is refused as invalid input,… |
Returns durationSeconds language segments startSeconds text transcript
The call
data_api({"api":"youtube.video_transcript","input":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}})YouTube Video Transcript (Provenance)
Fetch a YouTube video or Short transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.
| Argument | Type | Required | What it is |
|---|---|---|---|
captionKind | manual | automatic | any | no | Which caption track to accept: "manual" only creator-written captions, "automatic" only YouTube's speech recognition, "any" whichever exists. Default "any". |
language | string | no | Preferred caption language code (e.g. "en", "es"). Defaults to English. If the video has no captions in that language, you get the transcript in another language the video has; the `language` field in the result says which. With `caption… |
url | string | yes | YouTube video or Short URL (e.g. "https://www.youtube.com/watch?v=dQw4w9WgXcQ" or "https://www.youtube.com/shorts/Fir1x9cw2vg"). |
Returns authorId authorUrl category channel createdUtc description durationSeconds endSeconds image isAutoGenerated keywords language likes segments startSeconds text title transcript url videoId views
The call
data_api({"api":"youtube.video_transcript_full","input":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}})Good to know
- The price shown is the usual one. A call can cost more when the first source fails and another serves it; the most it can cost is shown beside each API, and
max_creditssets your own limit. - These APIs return public data. What you may do with it depends on the platform's terms and the privacy law where you operate, and that responsibility is yours.
- A failed call is not charged.
When to choose something else
Choose a provider that specialises in YouTube data when you need it at high volume, on a schedule, or as bulk exports: you will get volume pricing and more control. Choose the platform's official API when you need data from your own account. These APIs are for an agent that needs an answer now, alongside other tools on the same balance.
Questions
Do I need a YouTube API key or developer account?
No. morigraph supplies the access. You connect morigraph once to your assistant, or use one morigraph API key from your own code, and call any of the 19 APIs on this page.
What does YouTube data cost through morigraph?
Between 0.004 and 0.039 credits a call depending on the API, where a credit is about 10 cents. That is from about $0.40 for 1,000 calls. You pay per call from one balance, with no separate subscription.
Can Claude, ChatGPT or Cursor get YouTube data?
Yes. Add morigraph as an MCP server, sign in once, then ask in plain words. Your assistant finds the right API with one search and runs it with one call.
Which YouTube data APIs are available?
YouTube Search, YouTube Video, YouTube Channel, YouTube Channel Community Posts, YouTube Channel Live Streams, YouTube Channel Playlists, YouTube Channel Public Email, YouTube Channel Shorts, YouTube Channel Videos and YouTube Comment Replies, and 9 more listed on this page.
Prices and availability read from the production service on . A credit is about 10 cents of tool use; see pricing. Your assistant can quote the exact cost before a paid call.