YouTube MCP Server
A remote MCP server that exposes four read-only YouTube tools—search, video/channel data, and transcripts—letting AI agents gather public YouTube information without a Google API key.
Search YouTube (
hasdata_youtube_search_getYoutubeSearchResults): full results page split into videos, shorts, channels, playlists, shelves, and ads; filter by date, duration, content type, features (HD, 4K, CC, live, etc.), sort, paginate, and get chapters/views/parsed integers.Get video data (
hasdata_youtube_video_getYoutubeVideo): metadata for one video (id) — title, description with parsed links, views/likes (raw + normalized), length, publish date, category, captions tracks, related videos, end screens, music, social links, flags.Get channel data (
hasdata_youtube_channel_getYoutubeChannel): channel by ID or handle, per-tab (featured, videos, shorts, streams, playlists, posts, about, store, etc.), with subscriber/views counts, rssUrl, and tab-specific items.Get video transcript (
hasdata_youtube_transcript_getYoutubeTranscript): timed transcript segments (start/end ms, snippet, time text), choice of language track orasrauto-generated, plus list of all available tracks.No Google Cloud or YouTube API key needed — uses a HasData key and a hosted endpoint over streamable HTTP.
Read-only, public data only — no comments, uploads, analytics, or private content.
Priced per call (10 credits), with free trial and daily top-ups; results are live (no caching).
Provides read-only YouTube tools for searching videos, retrieving video and channel data, and pulling video transcripts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube MCP ServerFind the top 5 videos about MCP and get transcripts for the top 2."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YouTube MCP Server
A hosted Model Context Protocol (MCP) server that gives Claude, Cursor, Windsurf and any other MCP client four read-only YouTube tools. Search YouTube, read video and channel data, and pull transcripts, with no Google Cloud project and no YouTube Data API key.
https://mcp.hasdata.com/api/mcp?apis=youtube
Contents
Related MCP server: YouTube MCP Server
What you need
An MCP client that speaks streamable HTTP with custom headers. A HasData API key from the dashboard, free to create. Nothing else. This is a remote server, so the simplest path is a URL and a header, with no container to run and no Google account anywhere in the flow. A stdio-only client can use the @hasdata/youtube-mcp (npm) or hasdata-youtube-mcp (PyPI) launcher instead.
Quick start
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
Field | Value |
URL |
|
Transport | HTTP, streamable |
Auth header |
|
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
claude mcp add --transport http youtube "https://mcp.hasdata.com/api/mcp?apis=youtube" \
--header "x-api-key: HASDATA_API_KEY"Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/api/mcp?apis=youtube and sign in.
For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/youtube-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:
{
"mcpServers": {
"youtube": {
"command": "npx",
"args": ["-y", "@hasdata/youtube-mcp"],
"env": { "HASDATA_API_KEY": "YOUR_KEY" }
}
}
}Python instead of Node? Swap the launcher for the PyPI package, which uvx runs without a manual install:
{
"mcpServers": {
"youtube": {
"command": "uvx",
"args": ["hasdata-youtube-mcp"],
"env": { "HASDATA_API_KEY": "YOUR_KEY" }
}
}
}~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
{
"mcpServers": {
"youtube": {
"url": "https://mcp.hasdata.com/api/mcp?apis=youtube",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
{
"mcpServers": {
"youtube": {
"serverUrl": "https://mcp.hasdata.com/api/mcp?apis=youtube",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}{
"mcpServers": {
"youtube": {
"url": "https://mcp.hasdata.com/api/mcp?apis=youtube",
"type": "streamableHttp",
"headers": { "x-api-key": "HASDATA_API_KEY" },
"disabled": false
}
}
}.vscode/mcp.json in the workspace:
{
"servers": {
"youtube": {
"type": "http",
"url": "https://mcp.hasdata.com/api/mcp?apis=youtube",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}~/.codex/config.toml:
[mcp_servers.youtube]
url = "https://mcp.hasdata.com/api/mcp?apis=youtube"
[mcp_servers.youtube.headers]
"x-api-key" = "HASDATA_API_KEY"~/.gemini/settings.json:
{
"mcpServers": {
"youtube": {
"httpUrl": "https://mcp.hasdata.com/api/mcp?apis=youtube",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}Example prompts
Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because in MCP the model decides how many calls to make and every successful call costs 10 credits.
Find the ten most viewed videos about the Model Context Protocol from the last month, then pull the transcript of the top one and give me the three claims it makes about tool calling.
Two calls, 20 credits.
Take the channel @GoogleDevelopers. List the tabs it publishes, then summarize the last five uploads and tell me which topics repeat.
Two calls, 20 credits. Reading a tab you have not seen takes a second call, because the tab list arrives inside the first response.
Take this video id, dQw4w9WgXcQ. Get its stats, then check which of its related videos come from the same channel.
One call, 10 credits. Related videos ride along in the same response.
Search YouTube for "web scraping tutorial", sorted by upload date, videos under four minutes only, and give me the chapter titles of each result that has them.
One call, 10 credits.
Pull the German transcript of this video if one exists, and tell me which languages it is available in.
One call, 10 credits.
Search takes YouTube's own filter tokens, and an agent narrows by duration, upload date and content type without post-processing. Transcripts arrive with the list of available language tracks, which lets the agent pick one without guessing.
Paging costs a call each time. A research prompt that searches, pages twice, then pulls three transcripts is six calls and 60 credits. The trial goes further on narrow questions than on open-ended crawls.
Tools
Four tools, all read-only. Samples below are trimmed from real calls, and the numbers in them move as YouTube updates. Read them as shapes. Each tool name links to its endpoint reference, which carries the full field list.
The samples are the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.
Get YouTube search results
hasdata_youtube_search_getYoutubeSearchResults
Searches YouTube and returns the whole results page, split by result type.
Parameter | Type | Required | Notes |
| string | yes | Free-text query, exactly as a user would type it |
| string |
| |
| string | Upload window relative to now | |
| string | Duration bucket, for example | |
| string | Restrict to one content type | |
| array | Feature flags, combinable | |
| string | Raw YouTube | |
| string | The | |
| string | Two-letter country and language codes, and device |
A results page is split across videoResults, shortsResults, inlineShortsResults, playlistResults, channelResults and shelves, with paid placements in adsResults and sponsoredResults. Which blocks appear depends on the query, and a block with nothing to report is absent, not empty. Test for the key before iterating. searchInformation carries the total and pagination.nextPageToken is what you feed back as paginationToken. Ads never mix into the organic arrays, though there are two of them to skip.
{
"positionOnPage": 1,
"videoId": "GuTcle5edjk",
"title": "you need to learn MCP RIGHT NOW!! (Model Context Protocol)",
"viewsOriginal": "1.6M views",
"views": 1653824,
"length": "38:40",
"publishedDate": "11 months ago",
"extensions": ["4K"],
"chapters": [
{ "title": "Intro", "time": "0:00" },
{ "title": "Problem: LLMs Suck at Accessing Code", "time": "0:40" }
],
"channel": { "name": "NetworkChuck", "verified": true }
}Two things there earn a mention. views is a parsed integer next to the 1.6M views display string and needs no suffix parser. And chapters come back inside search results, not only on the video itself, though only some videos carry them.
The search endpoint reference lists every sp and filters__ token the endpoint accepts.
Get YouTube video data
hasdata_youtube_video_getYoutubeVideo
One video by id.
Parameter | Type | Required | Notes |
| string | yes | The 11-character video id from |
| string | Two-letter country and language codes, and device |
Returns title, thumbnail, channel, publishedDate, lengthSeconds, category, isFamilySafe and isUnlisted, plus the relatedVideos, endScreenVideos, keywords, captions, music and socialLinks arrays. description is an object holding the full text in content and a links array where every link and hashtag carries startIndex, length, text and url. The text field holds the link as the author wrote it and url holds YouTube's redirect wrapper, which matters if you are pulling sponsor or affiliate destinations out of descriptions.
Read the parsed field by name per tool before you copy the sample below. Search and channel results put the parsed number in
viewsand the display string inviewsOriginal. This response inverts it, keeping the string inviewsand the number inextractedViews, and the same inversion applies tolikesandsubscribers. Get it wrong anditem.views > 100000compares a string here without ever throwing.
{
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"views": "1,806,075,152 views",
"extractedViews": 1806075152,
"likes": "19M",
"extractedLikes": 19344370,
"publishedDate": "Oct 24, 2009",
"lengthSeconds": 214,
"category": "Music",
"channel": { "name": "Rick Astley", "subscribers": "4.53M subscribers", "extractedSubscribers": 4530000 }
}Get YouTube channel data
hasdata_youtube_channel_getYoutubeChannel
A channel by id or handle, one tab at a time.
Parameter | Type | Required | Notes |
| string | yes | Canonical |
| string |
| |
| string | Token from the previous response | |
| string | Two-letter country and language codes, and device |
Returns channelInfo, featuredVideo and sections on the default tab. Other tabs return their own shape. channelInfo carries the handle, avatar, banner, description, channel keywords and the channel's rssUrl, enough to keep watching a channel without polling it.
The
availableTabsarray in the sample below holds display labels, and they are not the valuestabaccepts.Home,Live,CoursesandSearchmap to no parameter value at all, and the rest need lowercasing. An agent that reads the list and walks each entry fails on the first one.
{
"channelInfo": {
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"name": "Google for Developers",
"handle": "@GoogleDevelopers",
"rssUrl": "https://www.youtube.com/feeds/videos.xml?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw",
"isFamilySafe": true,
"availableTabs": ["Home", "Videos", "Shorts", "Live", "Courses", "Playlists", "Posts", "Search"]
}
}Get YouTube video transcript
hasdata_youtube_transcript_getYoutubeTranscript
The timed transcript of a video.
Parameter | Type | Required | Notes |
| string | yes | The 11-character video id |
| string | BCP-47 code of the track you want | |
| string | Set to |
Check
selectedin the response before you trust the language. Asking for alanguageCodethe video does not carry neither fails nor returns empty, it quietly falls back to the default track. Every entry in the list carrieslanguageNameandlanguageCode, and one language can appear twice, once human-authored and once withtypeset toasr.
{
"transcript": [
{ "startMs": 320, "endMs": 18800, "snippet": "[Music]", "startTimeText": "0:00" },
{ "startMs": 18800, "endMs": 21800, "snippet": "We're no strangers to", "startTimeText": "0:18" }
],
"availableTranscripts": [
{ "languageName": "English", "languageCode": "en" },
{ "languageName": "English", "languageCode": "en", "type": "asr", "selected": true },
{ "languageName": "German (Germany)", "languageCode": "de-DE" },
{ "languageName": "Japanese", "languageCode": "ja" }
]
}Errors and failure paths
Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with isError set to true and the reason as text. The agent reads a message where you might expect a status line.
A wrong key surfaces as tool output, not as a failed connection. tools/list accepts any non-empty key and returns all four tools, so the client completes its handshake and shows green. The first tool call then comes back with isError: true and the text HasData API error: 401 Unauthorized. Watch for that string, because nothing earlier in the flow reports the problem.
A missing key is the one real HTTP error. Authorization runs before any tool, and the connection itself fails with 401. CORS headers are present, and a browser client reads the status and not an opaque network failure.
An argument that breaks a tool's schema is rejected before it becomes a scrape. The server answers with isError: true and the text MCP error -32602: Input validation error, naming the offending field. Nothing is fetched and nothing is charged. The message names the field but not the accepted values, so the parameter tables above are the reference.
A call that succeeds and finds nothing is the case that trips people up. It arrives as an ordinary result with requestMetadata.status set to ok and the data key simply missing. Nothing in the body says the result was empty. Test for the field you need, not for an error.
An identifier the platform rejects returns 400 with requestMetadata.status set to error. A channel handle that does not exist is the usual way to see this.
Results that carry data also carry a requestMetadata.id worth quoting in support.
Pricing, free tier and limits
Every YouTube tool costs 10 credits per successful call. Response size does not change the price. A full page of search results costs the same as a page with one video.
The free trial is 1,000 credits over 30 days with no card, which is 100 YouTube calls. After that an active account keeps getting 100 credits topped up each day whenever its balance drops below 100, so a low-volume agent runs on the free tier indefinitely.
Paid plans start at $49 a month for 200,000 credits, which is 20,000 calls. The unit price falls with volume, from $2.45 per 1,000 calls on the entry plan to $0.99 on Business, $0.83 on Growth and $0.75 on the largest high-volume plans.
Your plan also sets concurrency. The free trial allows 1 request at a time, Startup 15, Business 30, Growth 50, and the high-volume plans run from 200 to 1,500. Handle the overflow case defensively in anything unattended, because an agent that fans out will reach the ceiling before you do.
A request that comes back non-200 is not billed. A successful call that finds nothing is still a call.
Tool selection
The apis query parameter decides which tools your agent sees. Fewer tools means less context spent on tool definitions, and fewer chances for the model to reach for the wrong one.
?apis=youtube the four tools in this repo
?apis=youtube,google_serp add Google search
?apis=youtube,tiktok,instagram a social research bundleThe parameter takes provider names like youtube and individual API names like google_maps_search. Misspelled names are ignored. If every name is wrong the request fails with 400, and the body lists both what it did not recognise and every valid value. Drop the parameter and the same endpoint exposes all 57 HasData tools.
How it compares
Against the official YouTube Data API v3:
YouTube Data API v3 | This server | |
Setup | Google Cloud project and an API key | One key and one URL |
Search allowance | "default quota allocation of 100 | Your plan's credits, 10 per call |
Transcripts of videos you do not own |
| Yes, with the language list |
Chapters in search results | No | Yes |
Views and likes in search results | Absent, and a second | Display string and integer in the same response |
Cost | Free inside the daily quota | Paid past the trial, 10 credits a call |
Writes and private data | Uploads, playlists, comments and your own analytics over OAuth | Read-only, public data only |
The last two rows matter. If the daily quota covers your volume and you own the channel you are querying, the official API is the cheaper answer and you should take it.
Most other YouTube MCP servers do transcripts only. This one also searches, reads videos with their engagement numbers, and walks channel tabs, so an agent runs a whole research pass without a second server.
What this server does not do. No comments, no channel management, no uploads, no analytics, no private data. It reads what a signed-out visitor can see.
FAQ
Is there an official YouTube MCP server?
Google does not publish one. YouTube has no first-party MCP server. Every option is built by somebody else, either around the YouTube Data API v3 or around the public pages. This one is maintained by HasData and reads public pages, which is why it needs no Google credentials.
What is a YouTube MCP server?
A server that exposes YouTube data as tools an AI client can call. The client sends a tool call over the Model Context Protocol, the server fetches the data and returns structured JSON, and the model works with the result and never sees a page of HTML. This one exposes four tools and runs remotely. The client connects to a URL and starts no local process.
Do I need a YouTube API key or a Google Cloud project?
No. The only credential is your HasData key. There is no Google Cloud project to create, no quota form to fill in and no OAuth consent screen, because the tools read public YouTube pages and not the YouTube Data API.
Do I need to host or run anything?
No. This is a remote MCP server on streamable HTTP. Nothing to install, no container to keep warm, no process to restart.
Is the data live or cached?
Live. Each call fetches the page at request time and carries its own requestMetadata.id. Two identical calls are two separate fetches and not a replay of a stored copy. Counters like views and likes track the page, so they move as the page moves.
What happens when YouTube changes its layout?
Nothing on your side. We track the changes and keep the response schema stable, so field names and types stay put. A field with no value is absent from the item, not present and null. Read optional fields with a default.
Can I use this together with other HasData APIs?
Yes. The apis parameter takes a list, and ?apis=youtube,google_serp gives your agent the four YouTube tools plus Google search. Drop the parameter and you get everything.
Can I get a transcript for any video?
Only where the video has one, and availableTranscripts tells you what exists before you ask.
Can I sign in with OAuth instead of pasting a key?
Yes, in clients that support it. Claude Desktop and Cursor can add the endpoint as a connector and sign in. Unattended agents and scripts use the x-api-key header.
Compliance and personal data
HasData accesses publicly available data only. A platform's terms may restrict automated access, and you are responsible for your own compliance. Where the data you collect includes personal information, make sure you have a lawful basis for it under GDPR, CCPA or the equivalent rules in your jurisdiction.
HasData links
Product page and request builder | |
Server documentation | |
All 57 tools in one server | |
Client walkthroughs | |
Everything else we scrape | |
Plans and credit costs | |
Keys and usage | |
Node launcher on npm | |
Python launcher on PyPI |
Development
This repository is configuration and documentation for a remote server. There is no build step and nothing to containerize.
The tests in test/ assert the tool contract, the part that can break without a commit here. They check that ?apis=youtube returns exactly four tools, that every tool still declares its required parameter, that no name changed, and that the key in use is actually accepted. That last check calls a tool for real and costs 10 credits, which is the price of a canary that can fail for the right reason.
# macOS and Linux
HASDATA_API_KEY=your_key_here npm test
# Windows PowerShell
$env:HASDATA_API_KEY="your_key_here"; npm testThe same suite runs in CI on every push and once a week on a schedule, because the upstream tool list can change without anyone touching this repository. A failure means the tool list moved, the key stopped working, or the endpoint was unreachable, and the assertion message says which.
Contributing
Corrections to the tool tables and the response samples are the most useful contribution, because those are the parts that drift. Include the call you made and the response you got. Pull requests from forks run the suite without a key, and the live checks skip instead of going red.
License
MIT. See LICENSE.
Available Tools
4 toolshasdata_youtube_channel_getYoutubeChannelyoutube_channel: GET /AInspect
Get YouTube Channel Data
Fetches a YouTube channel by its ID (UC…) or handle (@name) and returns structured data for any channel tab — featured/Home, videos, shorts, streams, playlists, posts, podcasts, releases, store, about. Returns channel identity (title, description, avatar, banner, country, join date), subscriber and total-view counts, social links, and the items on the requested tab (videos with views and publish date, playlists, posts, podcasts, etc.). Use to monitor competitor channels, build creator/brand directories, track posting cadence and growth signals, or feed videoId into the YouTube Video / Transcript endpoints.
| Name | Required | Description | Default |
|---|---|---|---|
| gl | No | The two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`. | |
| hl | No | The two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`. | |
| tab | No | Channel tab to scrape. Each tab returns a different content shape: - `featured` (default) — channel Home page (channel trailer + curated rows) - `videos` — uploaded long-form videos - `shorts` — Shorts feed - `streams` — past and upcoming live streams - `playlists` — created and saved playlists - `posts` / `community` — community posts - `podcasts` — podcast episodes - `releases` — music releases - `about` — channel description, links, stats - `store` — channel merch | |
| channelId | Yes | YouTube channel identifier — either the canonical channel ID (`UC…`, 24 chars) or the public handle starting with `@` (e.g. `@PewDiePie`). Legacy `/c/<custom>` and `/user/<name>` URL slugs are also accepted. | |
| deviceType | No | Device type for the request. | |
| paginationToken | No | Token returned in the previous response to fetch the next page of results. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden. It discloses the return shape across tabs and mentions pagination token availability indirectly via the parameter, but it does not describe rate limits, errors, or the fact that the operation is read-only (though 'Fetches' implies it). The behavioral disclosure is adequate but not exhaustive for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured, starting with a concise summary ('Get YouTube Channel Data') and then expanding into function and use cases. Though it is longer than minimal, every sentence adds relevant information—the tab enumeration, return fields, and practical applications. It is front-loaded and avoids fluff, earning a 4.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description must explain the return structure, which it does in detail by listing channel identity fields and tab-specific content types. It also covers the main use cases and even hints at integration with other endpoints. It does not cover pagination behavior beyond mentioning the token, but the schema already documents the parameter. Overall, the description is comprehensive for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% description coverage for all parameters, including detailed explanations for both `tab` and `channelId`. The description adds value by contextualizing the tool's use cases (e.g., feeding IDs to other endpoints) but does not contribute new parameter-specific semantics beyond the schema. Baseline 3 is appropriate given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb ('Fetches') and resource ('YouTube channel by ID or handle'), enumerates the supported tabs, and details the returned data (channel identity, counts, social links, tab items). It also clearly distinguishes this tool from siblings by noting it can 'feed videoId into the YouTube Video / Transcript endpoints.' This leaves no ambiguity about what the tool does or how it differs from search, transcript, and video tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear use cases (monitor competitor channels, build directories, track growth signals) and implies when to use it relative to the video/transcript endpoints. However, it does not explicitly state when NOT to use this tool or directly compare it to the sibling search tool. The context is clear and actionable, but exclusions are left implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hasdata_youtube_search_getYoutubeSearchResultsyoutube_search: GET /AInspect
Get YouTube Search Results
Searches YouTube for a query and returns the full results page split into videoResults (videoId, title, views, length, publish date, chapters, channel info, extensions like 4K/CC), channelResults (channelId, handle, subscribers, verified flag), shortsResults / inlineShortsResults, themed shelves (e.g. 'People also watched', 'Latest from '), adsResults and sponsoredResults (advertiser, landing URL, position), plus searchInformation.totalResults. Each block preserves its positionOnPage so the original layout is reconstructable. Use for competitor and topic monitoring, brand-mention tracking, ad-placement intelligence, creator discovery, trend research, or to feed videoId / channelId into the YouTube Video, Channel, or Transcript endpoints.
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Free-text search query, exactly as a user would type it into the YouTube search box. | |
| gl | No | The two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`. | |
| hl | No | The two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`. | |
| sp | No | Raw YouTube `sp` filter token, copied verbatim from a YouTube search URL (e.g. `EgIQAQ%253D%253D`). When provided, it overrides `sortBy`, `date`, `videoType`, `length`, and `filters[]`. Use only if you need a YouTube-side filter that this API does not expose as a structured parameter. | |
| date | No | Limit results to videos uploaded within this time window relative to now. | |
| length | No | Filter by video duration bucket: - `under4` — under 4 minutes - `between420` — 4 to 20 minutes - `plus20` — over 20 minutes | |
| sortBy | No | Sort order applied to the results page. `relevance` (default) — best match for the query; `date` — newest first; `views` — most viewed first; `rating` — highest rated first; `popularity` — trending/most popular. | |
| filters__ | No | Feature flags to require on results. Multiple values are combined with AND (every flag must apply). - `hd` — HD quality - `k4` — 4K quality - `hdr` — HDR - `subtitles` — has subtitles/closed captions - `cc` — Creative Commons license - `d3` — 3D video - `d360` — 360° video - `vr180` — VR180 video - `live` — currently live - `bought` — purchased/paid content - `location` — has a geographic location tag | |
| videoType | No | Restrict results to a single YouTube content type — regular videos, Shorts, channels, playlists, or movies. | |
| deviceType | No | Device type for the request. | |
| paginationToken | No | Token returned in the previous response to fetch the next page. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden — and it delivers. It discloses that the tool returns the complete results page split into distinct blocks (videoResults, channelResults, shorts, shelves, ads), includes advertising/sponsored content, and preserves positionOnPage for layout reconstruction. This is meaningful behavioral context beyond a generic "search" claim. It does not mention rate limits or auth requirements, but the return-structure and composition disclosures are the most decision-relevant behaviors for a search endpoint.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but every sentence earns its place: the core purpose comes first, followed by a dense but necessary enumeration of return blocks and their distinguishing fields, then a targeted use-case sentence. The block listing is justified because there is no output schema to carry that information. Minor redundancy ('Get YouTube Search Results' repeated as title) keeps it from a 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description shoulders the return-value burden — and it does so thoroughly, naming each result category and key fields (views, position, advertiser, subscribers, verified flag). Combined with 100% schema description coverage for the 11 parameters, an agent has everything needed to select and invoke this tool correctly. The only gaps are operational details such as rate limits, which are not covered by annotations either.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the schema itself is exceptionally detailed (per-enum explanations for length, sortBy, filters__, raw sp-token override semantics). The description adds minimal parameter instruction beyond the schema — its only param-adjacent contribution is the hint about feeding returned videoId/channelId into sibling endpoints. Per the baseline rule, 3 is correct when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource pair — "Searches YouTube for a query" — and precisely scopes the tool as returning the full results page. It differentiates from sibling tools (channel, transcript, video endpoints) by defining this as the search/entry point that produces results blocks. An agent can immediately recognize what this tool does and what it is not.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit use cases — "competitor and topic monitoring, brand-mention tracking, ad-placement intelligence, creator discovery, trend research" — and even tells the agent what to do afterward: "feed videoId / channelId into the YouTube Video, Channel, or Transcript endpoints." This directly routes the agent between siblings, stating when this tool is the right choice and when to move on.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hasdata_youtube_transcript_getYoutubeTranscriptyoutube_transcript: GET /AInspect
Get YouTube Video Transcript
Returns the timed transcript (subtitles) of a YouTube video by its 11-character videoId. languageCode selects the track (e.g. en, de-DE, pt-BR); type=asr requests the auto-generated speech-recognition track. Each segment in transcript[] carries startMs, endMs, snippet, and a formatted startTimeText. The response also includes availableTranscripts[] listing every track on the video (language name + code, type: asr for auto-generated, selected: true for the one returned) so callers can discover what else is available. Use to feed a video's spoken content into RAG/LLM pipelines, generate summaries or chapter outlines, build searchable archives, run translation or accessibility workflows, or analyze talking points across a creator's catalog (pair with the YouTube Channel endpoint to enumerate videos, then fetch transcripts).
| Name | Required | Description | Default |
|---|---|---|---|
| v | Yes | 11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). | |
| type | No | Set to `asr` to fetch the YouTube auto-generated (speech-recognition) track. Omit to fetch the human-authored track for `languageCode` when one exists. | |
| languageCode | No | BCP-47 / YouTube language code of the transcript track to return (e.g. `en`, `de`, `en-US`, `pt-BR`). Must match a track that the video actually has. When omitted, the video's default language track is returned. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears full responsibility for behavioral transparency. It thoroughly describes the response structure: timed segments with startMs, endMs, snippet, and startTimeText, plus availableTranscripts with language details and selection status. It also explains the effect of type=asr, which goes beyond basic schema. Minor omissions like error handling or rate limits are not mentioned, but the core behavior is well disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than a minimal example but each sentence serves a purpose: the first states the core function, the middle details response structure, and the final lists concrete use cases. It is front-loaded with the purpose and structured logically. It could be trimmed slightly, but it is not wasteful and earns its length given the lack of an output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and no annotations, the description provides a remarkably complete picture: what parameters control, what the response contains, and common application contexts. It even suggests integration with another endpoint for cross-video analysis. The only missing elements are error/edge-case behavior and explicit rate-limit or authentication notes, but these are outside typical description scope for a simple GET endpoint.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with detailed descriptions for v, type, and languageCode, including format examples and behaviors when omitted. The tool description largely repeats this information (e.g., 'languageCode selects the track', 'type=asr requests auto-generated'), adding no significant meaning beyond what the schema already states. This meets the baseline 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Get YouTube Video Transcript' and explicitly states the resource (transcript of a YouTube video by 11-character videoId). It clearly distinguishes this tool from sibling tools like channel or search by focusing purely on retrieving transcript content for a given video, so an agent can immediately understand its unique function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage scenarios ('Use to feed a video's spoken content into RAG/LLM pipelines, generate summaries...') and even suggests pairing with the YouTube Channel endpoint to enumerate videos. However, it does not explicitly state when NOT to use this tool or name alternative siblings for exclusion, leaving slight ambiguity in choosing among the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hasdata_youtube_video_getYoutubeVideoyoutube_video: GET /AInspect
Get YouTube Video Data
Fetches a single YouTube video by its 11-character videoId. Returns title, thumbnail, raw + normalized views and likes, lengthSeconds, publish date, category, keywords/tags, isFamilySafe / isUnlisted flags, the uploading channel (id, handle, subscribers, avatar), the full description with parsed links and hashtags, available captions tracks (with kind: asr for auto-generated), Content-ID music matches (song/artist/album), creator socialLinks, and the relatedVideos, endScreenVideos, and relatedShorts rails. Use to enrich a video URL with metadata, monitor view/like growth, extract music or sponsor/affiliate links, gather features for recommender or RAG pipelines, or detect caption tracks before calling the YouTube Transcript endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| v | Yes | 11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). | |
| gl | No | The two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`. | |
| hl | No | The two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`. | |
| deviceType | No | Device type for the request. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the operation is a read/fetch and details the extensive output fields. However, it does not mention potential failure modes (e.g., invalid videoId), rate limits, or any authorization requirements, which are relevant for a tool that likely sits behind an API key.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but front-loaded with the core action and then the comprehensive field list, followed by practical use cases. The list of fields is dense but necessary given the tool's breadth. It is structured and readable, though the first sentence 'Get YouTube Video Data' is redundant with the title and could be trimmed. Overall it earns its length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of the tool (many return fields) and the absence of an output schema, the description compensates by enumerating the response contents in detail. It also covers the main use cases and the relationship to the Transcript sibling. Missing are error handling and any limitations, but for an enrichment/read tool this is mostly sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers all parameters (v, gl, hl, deviceType) with descriptive text, including valid values and examples. The rich schema description (100% coverage) means the tool description does not need to reiterate parameter meanings. It adds no extra parameter semantics beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches a single YouTube video by its 11-character videoId and enumerates the specific data returned (title, thumbnails, views, likes, flags, channel info, captions, music matches, etc.). The verb 'Fetches' is specific and the resource is unambiguous, and the mention of the Transcript endpoint distinguishes it from a sibling tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases: enrichment, monitoring growth, extracting music/affiliate links, feature gathering for recommender/RAG pipelines, and detecting caption tracks before using the Transcript endpoint. It clearly indicates when to use this tool for those purposes, though it does not explicitly contrast it with the channel or search siblings beyond the transcript reference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
hasdata_youtube_channel_getYoutubeChannel - First observed
hasdata_youtube_search_getYoutubeSearchResults - First observed
hasdata_youtube_transcript_getYoutubeTranscript - First observed
hasdata_youtube_video_getYoutubeVideo
TDQS
Each tool targets a clearly distinct resource: channel data, search results, transcripts, and video metadata. There is no overlap in purpose—the channel tool returns channel/playlist info, search returns result blocks, transcript returns timed subtitles, and video returns single-video metadata. An agent would have no trouble selecting the right tool for a given task.
All four tools follow the identical `hasdata_youtube_<domain>_getYoutube<Domain>` pattern (e.g., `hasdata_youtube_channel_getYoutubeChannel`). The naming is fully consistent in structure, verb, and case, making it predictable and easy to remember.
The server exposes exactly four tools, which is well-scoped for a YouTube data retrieval purpose. It covers the core read operations—channel lookup, search, transcript, and video details—without unnecessary bloat. Each tool earns its place, and the count is neither too thin nor excessive.
The tool set covers the primary read-only workflows for YouTube: fetching channel data (including playlists and posts), searching, retrieving video metadata, and getting transcripts. Minor gaps exist, such as a dedicated method for channel video lists (though the channel tool can fetch the videos tab) or comments, but the core lifecycle for data retrieval is well covered. Agents can achieve most tasks without dead ends.
Maintenance
Related MCP Connectors
An MCP server that gives any LLM or agent clean YouTube transcripts on demand: a single video, a whole channel, or a playlist, plus AI cleanup of auto-generated captions. API-key auth, credit-based, same backend as the public v1 API. Get a free API key with 25 free credits at youtubetranscriptdownload.com/account.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents. No signup.
YouTube public video, comment, reply, channel, search, and speech-to-text transcript tools.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables searching YouTube videos, retrieving and storing transcripts, and performing semantic search over video content without using the official YouTube API.32MIT
- AlicenseBqualityAmaintenanceA server that enables interaction with YouTube data through the Model Context Protocol, allowing users to search videos, retrieve detailed information about videos/channels, and fetch comments.1213619MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to access YouTube data in real-time, with capabilities for searching videos, analyzing channels, retrieving video details, and extracting transcripts.12MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing comprehensive read-only access to YouTube data, including video search, transcripts, and channel forensics. It features 16 specialized tools designed for content analysis and metadata retrieval in LLM applications.2-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HasData/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server