Skip to main content
Glama

youtube_search: GET /

hasdata_youtube_search_getYoutubeSearchResults
Read-only

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesFree-text search query, exactly as a user would type it into the YouTube search box.
glNoThe 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`.
hlNoThe 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`.
spNoRaw 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.
dateNoLimit results to videos uploaded within this time window relative to now.
lengthNoFilter by video duration bucket: - `under4` — under 4 minutes - `between420` — 4 to 20 minutes - `plus20` — over 20 minutes
sortByNoSort 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__NoFeature 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
videoTypeNoRestrict results to a single YouTube content type — regular videos, Shorts, channels, playlists, or movies.
deviceTypeNoDevice type for the request.
paginationTokenNoToken returned in the previous response to fetch the next page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / gl / description
      Previous value: -"The two-letter country code for the country you want to limit the search to."New value: +"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`."
    • removedInput schema / properties / gl / enum
      Removed value: -[
      -  "ac",
      -  "af",
      -  "al",
      -  "dz",
      -  "as",
      -  "ad",
      -  "ao",
      -  "ai",
      -  "aq",
      -  "ag",
      -  "ar",
      -  "am",
      -  "aw",
      -  "au",
      -  "at",
      -  "az",
      -  "bs",
      -  "bh",
      -  "bd",
      -  "bb",
      -  "by",
      -  "be",
      -  "bz",
      -  "bj",
      -  "bm",
      -  "bt",
      -  "bo",
      -  "ba",
      -  "bw",
      -  "bv",
      -  "br",
      -  "io",
      -  "bn",
      -  "bg",
      -  "bf",
      -  "bi",
      -  "kh",
      -  "cm",
      -  "ca",
      -  "cv",
      -  "ky",
      -  "cf",
      -  "td",
      -  "cl",
      -  "cn",
      -  "cx",
      -  "cc",
      -  "co",
      -  "km",
      -  "cg",
      -  "cd",
      -  "ck",
      -  "cr",
      -  "ci",
      -  "hr",
      -  "cu",
      -  "cy",
      -  "cz",
      -  "dk",
      -  "dj",
      -  "dm",
      -  "do",
      -  "ec",
      -  "eg",
      -  "sv",
      -  "gq",
      -  "er",
      -  "ee",
      -  "et",
      -  "fk",
      -  "fo",
      -  "fj",
      -  "fi",
      -  "fr",
      -  "gf",
      -  "pf",
      -  "tf",
      -  "ga",
      -  "gm",
      -  "ge",
      -  "de",
      -  "gg",
      -  "gh",
      -  "gi",
      -  "gr",
      -  "gl",
      -  "gd",
      -  "gp",
      -  "gu",
      -  "gt",
      -  "gn",
      -  "gw",
      -  "gy",
      -  "ht",
      -  "hm",
      -  "va",
      -  "hn",
      -  "hk",
      -  "hu",
      -  "im",
      -  "is",
      -  "in",
      -  "id",
      -  "ir",
      -  "iq",
      -  "ie",
      -  "il",
      -  "it",
      -  "je",
      -  "jm",
      -  "jp",
      -  "jo",
      -  "kz",
      -  "ke",
      -  "ki",
      -  "kp",
      -  "kr",
      -  "kw",
      -  "kg",
      -  "la",
      -  "lv",
      -  "lb",
      -  "ls",
      -  "lr",
      -  "ly",
      -  "li",
      -  "lt",
      -  "lu",
      -  "me",
      -  "mo",
      -  "mk",
      -  "mg",
      -  "mw",
      -  "my",
      -  "mv",
      -  "ml",
      -  "mt",
      -  "mh",
      -  "mq",
      -  "mr",
      -  "mu",
      -  "yt",
      -  "mx",
      -  "fm",
      -  "md",
      -  "mc",
      -  "mn",
      -  "ms",
      -  "ma",
      -  "mz",
      -  "mm",
      -  "na",
      -  "nr",
      -  "np",
      -  "nl",
      -  "an",
      -  "nc",
      -  "nz",
      -  "ni",
      -  "ne",
      -  "ng",
      -  "nu",
      -  "nf",
      -  "mp",
      -  "no",
      -  "om",
      -  "pk",
      -  "pw",
      -  "ps",
      -  "pa",
      -  "pg",
      -  "py",
      -  "pe",
      -  "ph",
      -  "pn",
      -  "pl",
      -  "pt",
      -  "pr",
      -  "qa",
      -  "re",
      -  "ro",
      -  "ru",
      -  "rw",
      -  "sh",
      -  "kn",
      -  "lc",
      -  "pm",
      -  "vc",
      -  "ws",
      -  "sm",
      -  "st",
      -  "sa",
      -  "sn",
      -  "rs",
      -  "sc",
      -  "sl",
      -  "sg",
      -  "sk",
      -  "si",
      -  "sb",
      -  "so",
      -  "za",
      -  "gs",
      -  "es",
      -  "lk",
      -  "sd",
      -  "sr",
      -  "sj",
      -  "sz",
      -  "se",
      -  "ch",
      -  "sy",
      -  "tw",
      -  "tj",
      -  "tz",
      -  "th",
      -  "tl",
      -  "tg",
      -  "tk",
      -  "to",
      -  "tt",
      -  "tn",
      -  "tr",
      -  "tm",
      -  "tc",
      -  "tv",
      -  "ug",
      -  "ua",
      -  "ae",
      -  "uk",
      -  "gb",
      -  "us",
      -  "um",
      -  "uy",
      -  "uz",
      -  "vu",
      -  "ve",
      -  "vn",
      -  "vg",
      -  "vi",
      -  "wf",
      -  "eh",
      -  "ye",
      -  "zm",
      -  "zw"
      -]
    • changedInput schema / properties / hl / description
      Previous value: -"The two-letter language code for the language you want to use for the search."New value: +"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`."
    • removedInput schema / properties / hl / enum
      Removed value: -[
      -  "af",
      -  "ak",
      -  "sq",
      -  "ws",
      -  "am",
      -  "ar",
      -  "hy",
      -  "az",
      -  "eu",
      -  "be",
      -  "bem",
      -  "bn",
      -  "bh",
      -  "xx-bork",
      -  "bs",
      -  "br",
      -  "bg",
      -  "bt",
      -  "km",
      -  "ca",
      -  "chr",
      -  "ny",
      -  "zh-cn",
      -  "zh-tw",
      -  "zh-hk",
      -  "co",
      -  "hr",
      -  "cs",
      -  "da",
      -  "nl",
      -  "xx-elmer",
      -  "en",
      -  "eo",
      -  "et",
      -  "ee",
      -  "fo",
      -  "tl",
      -  "fil",
      -  "fi",
      -  "fr",
      -  "fy",
      -  "gaa",
      -  "gl",
      -  "ka",
      -  "de",
      -  "el",
      -  "kl",
      -  "gn",
      -  "gu",
      -  "xx-hacker",
      -  "ht",
      -  "ha",
      -  "haw",
      -  "iw",
      -  "he",
      -  "hi",
      -  "hu",
      -  "is",
      -  "ig",
      -  "id",
      -  "ia",
      -  "ga",
      -  "it",
      -  "ja",
      -  "jw",
      -  "kn",
      -  "kk",
      -  "rw",
      -  "rn",
      -  "xx-klingon",
      -  "kg",
      -  "ko",
      -  "kri",
      -  "ku",
      -  "ckb",
      -  "ky",
      -  "lo",
      -  "la",
      -  "lv",
      -  "ln",
      -  "lt",
      -  "loz",
      -  "lg",
      -  "ach",
      -  "mk",
      -  "mg",
      -  "my",
      -  "ml",
      -  "mt",
      -  "mv",
      -  "mi",
      -  "mr",
      -  "mfe",
      -  "mo",
      -  "mn",
      -  "ms",
      -  "sr-me",
      -  "ne",
      -  "pcm",
      -  "nso",
      -  "no",
      -  "nn",
      -  "oc",
      -  "or",
      -  "om",
      -  "ps",
      -  "fa",
      -  "xx-pirate",
      -  "pl",
      -  "pt",
      -  "pt-br",
      -  "pt-pt",
      -  "pa",
      -  "qu",
      -  "ro",
      -  "rm",
      -  "nyn",
      -  "ru",
      -  "gd",
      -  "sr",
      -  "sh",
      -  "st",
      -  "tn",
      -  "crs",
      -  "sn",
      -  "sd",
      -  "si",
      -  "sk",
      -  "sl",
      -  "so",
      -  "es",
      -  "es-419",
      -  "su",
      -  "sw",
      -  "sv",
      -  "tg",
      -  "ta",
      -  "tt",
      -  "te",
      -  "th",
      -  "ti",
      -  "to",
      -  "lua",
      -  "tum",
      -  "tr",
      -  "tk",
      -  "tw",
      -  "ug",
      -  "uk",
      -  "ur",
      -  "uz",
      -  "vu",
      -  "vi",
      -  "cy",
      -  "wo",
      -  "xh",
      -  "yi",
      -  "yo",
      -  "zu"
      -]
  2. Changed2 schema fields changed
    • removedInput schema / properties / filters[]
      Removed value: -{
      -  "description": "Feature flags to require on results. Multiple values are combined with AND (every flag must apply).\n\n- `hd` — HD quality\n- `k4` — 4K quality\n- `hdr` — HDR\n- `subtitles` — has subtitles/closed captions\n- `cc` — Creative Commons license\n- `d3` — 3D video\n- `d360` — 360° video\n- `vr180` — VR180 video\n- `live` — currently live\n- `bought` — purchased/paid content\n- `location` — has a geographic location tag\n",
      -  "items": {
      -    "enum": [
      -      "hd",
      -      "subtitles",
      -      "cc",
      -      "d3",
      -      "live",
      -      "bought",
      -      "k4",
      -      "d360",
      -      "location",
      -      "hdr",
      -      "vr180"
      -    ],
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedInput schema / properties / filters__
      Added value: +{
      +  "description": "Feature flags to require on results. Multiple values are combined with AND (every flag must apply).\n\n- `hd` — HD quality\n- `k4` — 4K quality\n- `hdr` — HDR\n- `subtitles` — has subtitles/closed captions\n- `cc` — Creative Commons license\n- `d3` — 3D video\n- `d360` — 360° video\n- `vr180` — VR180 video\n- `live` — currently live\n- `bought` — purchased/paid content\n- `location` — has a geographic location tag\n",
      +  "items": {
      +    "enum": [
      +      "hd",
      +      "subtitles",
      +      "cc",
      +      "d3",
      +      "live",
      +      "bought",
      +      "k4",
      +      "d360",
      +      "location",
      +      "hdr",
      +      "vr180"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Added

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnlyHint, openWorldHint, destructiveHint=false), so the description's real contribution is the response-shape disclosure: the page is split into videoResults/channelResults/shortsResults/shelves/adsResults etc., each preserving positionOnPage for layout reconstruction. That is meaningful behavioral context. It adds nothing on auth, rate limits, or quota, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then the return structure, then use cases in a single dense block. Nearly every clause carries information, though the long parenthetical inventories of output fields and flags are heavy for prose that a schema would normally carry.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on return-value documentation and does it well, describing each result block and the totalResults field. Combined with complete parameter coverage and annotations, an agent has enough to call the tool and interpret its output correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and five parameters carry enums, so the schema already documents query syntax, country/language codes, the sp override, duration buckets, and feature flags. The description adds no parameter-level meaning beyond that, making the baseline 3 correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Searches YouTube for a query') and immediately delimits what it returns (the full results page). It also differentiates itself from siblings by naming the downstream YouTube Video, Channel, and Transcript endpoints that consume its videoId/channelId output. An agent can identify this as the YouTube search entry point without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly enumerates when to use it ('competitor and topic monitoring, brand-mention tracking, ad-placement intelligence, creator discovery, trend research') and how it chains to other endpoints. It stops short of naming which sibling to prefer over an alternative (e.g. TikTok/Google SERP search for the same intent), so it is clear context without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources