YouTube API
10 endpoints read YouTube: videos, posts, channels, comments. From $0.0020 a call. No YouTube login and no cookie; a failed call is free.
The 10 endpoints for YouTube, and what each returns
- YouTube channel profile: Get a YouTube channel by ID or handle: name, description, subscriber count, video count, total views, verification, the day it was created, the links its About section lists (its website, its other social accounts) and its keywords.
- YouTube channel search: Find YouTube channels by search terms: name, handle, description, subscriber count, verification.
- YouTube channel videos: Get a page of a YouTube channel's videos or Shorts by channel ID or handle, newest or most viewed first: title, description, time published, views, likes, length.
- YouTube comment replies: Get a page of the replies to a YouTube comment, by the replies token the comment list gives: text, replier, likes.
- YouTube video comments: Get a page of comments on a YouTube video by ID or link, top or newest first: text, commenter, likes, reply count, and the token that gets a comment's replies.
- YouTube video detail: Get one YouTube video by ID or link: title, description, channel, time published, view, like and comment counts, length, and the tags its author set, its category and chapters.
- YouTube video search: Find YouTube videos by search terms, by relevance or by views, within a time window: title, channel, views, length.
- YouTube video transcript: Get the transcript of a YouTube video by ID or link: the whole text and timed segments. lang chooses the language of the captions.
- YouTube channel posts: Get a page of the posts on a YouTube channel's Posts tab (once Community) by channel ID or handle, newest first: text, pictures, likes, the video a post carries.
- YouTube post detail: Get one YouTube channel post (once a Community post) by ID or link: text, channel, pictures, likes, the video it carries.
One call, as it came back
A recorded call, fields already tidied up: ready for an AI or a spreadsheet.The first 2 rows of a response recorded 2026-10-12 18:50 UTC.
Run it in the Playground · $0.0020{
"code": "ok",
"request_id": "2f106ec5-c4a3-42e6-9af6-a2ffd5848816",
"data": {
"items": [
{
"id": "TMvQhQaH-rq",
"url": "https://www.youtube.com/watch?v=TMvQhQaH-rq",
"type": "video",
"title": "I tried meteor shower for 30 days. Here is what happened",
"author": {
"id": "UCee61G0GfCvYQ4K3j4BgnU5",
"username": "maya.makes",
"name": "Northside Coffee",
"avatar_url": "https://yt3.ggpht.com/slva_3aFP2TCzQu0m-ZM4MLuiZ8Oe90XwjxhzkFn=s88-c-k-c0x00ffffff-no-rj"
},
"metrics": { "views": 1840 },
"images": ["https://i.ytimg.com/vi/D0fStB6ZVGr/hqdefault.jpg"]
},
// … 19 more
]
},
"page": {
"next_cursor": "c1.8SROT5T8n_nqIVHBOaV7N-2SYvyHFY8uAkBYxJvF",
"cursor_expires_at": "2026-10-12T19:50:45.000Z",
"has_more": true,
"returned": 20
},
"warnings": [],
"meta": {
"capability": "youtube.videos.search",
"result_status": "complete",
"fetched_at": "2026-10-12T18:50:45.000Z",
"cached": false,
"replayed": false,
"unavailable": {
"text": "capability",
"lang": "capability",
"published_at": "capability",
"author.verified": "capability",
"author.followers": "capability",
"metrics.likes": "capability",
"metrics.comments": "capability",
"metrics.shares": "platform",
"metrics.favorites": "platform",
"metrics.reposts": "platform",
"hashtags": "capability",
"mentions": "capability",
"is_pinned": "platform",
"post_id": "platform",
"parent_id": "platform",
"root_id": "platform"
},
"billing": {
"amount": "0.002",
"currency": "USD",
"balance_after": "9.998"
}
}
}From a response recorded 2026-10-12 18:50 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.
What you can get
Each row is an endpoint: what it returns and what one call costs.
What people build with it
Ready-made tasks your AI can run on YouTube data. Each is a few calls under a spending cap.
Comments and word of mouth
“What are people praising and complaining about under this post?”
Competitor account monitoring
“What did competitors post this week, and which post took off?”
Keyword search and mentions
“What is being said about this brand or keyword on each platform?”
Ask about YouTube right inside Claude or Cursor
Add the OneFeedAPI MCP server and the AI finds the YouTube endpoint it needs and calls it; answers link back to the source. You pay for the calls it makes.
https://onefeedapi.com/mcpStart in three steps
The call shown here is YouTube video search. Every other YouTube endpoint is called the same way and answers in the same envelope.
Get a key
Sign in with an emailed code or Google. Free trial, no card needed.
Call it, or let your AI call it
One GET from your code. Or paste this prompt into your agent with your key in it: it sets itself up, then finds and calls these endpoints by itself.
Read the same shape every time
Items are in data.items (one object in data.item), the next page in page.next_cursor, the charge in meta.billing.amount. A failed call is not charged.
curl -G "https://onefeedapi.com/v1/youtube/videos/search" \ --data-urlencode "query=meteor shower" \ -H "Authorization: Bearer $ONEFEED_API_KEY"
# pip install onefeedapi from onefeedapi import OneFeedAPI dx = OneFeedAPI() # reads ONEFEED_API_KEY result = dx.youtube.videos.search(query="meteor shower") print(result["data"]["items"])
// npm i @onefeedapi/sdk import { OneFeedAPI } from "@onefeedapi/sdk"; const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY const result = await dx.youtube.videos.search({ query: "meteor shower" }); console.log(result.data.items);
onefeedapi call youtube.videos.search 'query=meteor shower'{
"mcpServers": {
"onefeedapi": {
"type": "http",
"url": "https://onefeedapi.com/mcp",
"headers": {
"Authorization": "Bearer ${ONEFEED_API_KEY}"
}
}
}
}Add this to your MCP client, then ask your agent to call youtube.videos.search.
Edge cases
What the YouTube endpoints do at their edges, and what to check when a call does not return what you expected.
- Page sizes
- A list returns 10 to 100 items a page, depending on the endpoint. Every list goes on to a next page:
page.next_cursor, passed back ascursor, each page a call of its own. - Fields it cannot give
- 10 of the 10 endpoints cannot fill every field of the object they return. Each endpoint's page lists which, and every answer repeats them in
meta.unavailable: a missing field is never a silent zero. - A missing object that reads as empty
- YouTube channel videos, YouTube comment replies, YouTube channel posts: an object that does not exist cannot be told from one with nothing under it, so the answer is an empty result, not a 404.
- Channel ID or handle
- A channel is named by its ID (starting with UC) or its handle without the @. On the Posts tab, a handle nobody has is a 404, while an ID nobody has comes back empty.
- Replies take a token
- Comment replies are asked for by
ext.replies_tokenfrom the video comments endpoint (full view only), not by the comment's ID; a comment ID is refused. - Shorts: one page
- With
type=short, a channel's Shorts come in one page with no next page, and without the channel on each. - Rounded figures
- Subscriber counts have three significant figures, as YouTube shows them; likes on comments and posts are rounded from a thousand up. Video search gives no likes, no description and no exact time published.
- No captions, no transcript
- A video without captions reads as not found and is not charged. Watch, shorts, embed, live and youtu.be links all work.
Questions about the YouTube API
Short answers. The details are on each endpoint's page.
What YouTube data can I get through the API?
10 endpoints: videos, posts, channels, comments. Each endpoint's page gives its parameters and fields, with a recorded response.
How do I call the YouTube API?
Sign up for a key, send it as Authorization: Bearer <key> and call the endpoint's address, for example GET https://onefeedapi.com/v1/youtube/channels/get. Or connect OneFeedAPI to Claude, Cursor or ChatGPT (MCP) and ask in a sentence. The free trial needs no card.
How many tokens does a YouTube API response take in an AI?
Across 10 YouTube endpoints, one recorded real response each, the platform's own JSON comes to 53k tokens and what an AI reads through OneFeedAPI's MCP server to 18k, 66% fewer; the JSON of a direct API call is 37% fewer (counted 2026-11-06). Every platform uses the same field names, and fields returns only the ones you name.
How is the YouTube API priced?
Per call, no subscription. All 10 endpoints cost $0.0020 a call. You are charged when data comes back; a failed call costs nothing.
Do I need a YouTube account or a cookie?
No. One OneFeedAPI key is all you hold: no YouTube login, no cookie, no device to keep alive. The endpoints return publicly visible data only.
Is the data live?
A call fetches from YouTube at that moment, and meta.fetched_at says when. A result is kept for 24 hours, so a retry with the same Idempotency-Key is not charged again.
What happens when YouTube changes something?
A call that fails is not charged, whatever the reason. An endpoint that is paused answers capability_paused, also free, and GET /v1/catalog/status says what is up right now.
Related
Call YouTube with one key.
Free trial on sign-up: up to 50 calls at $0.0020. No card. No YouTube login, no cookie, no subscription. A failed call is free.