Skip to main content
Glama

Scrape Google Search

scrape_google
Read-only

Run a Google search from a chosen country and return organic results, with optional AI Overview extraction (include.aioverview) and People-Also-Ask AI answers (include.paaAioverview). Two modes: structured (query + gl, with optional location/uule/pages) or url (a complete google.com/search URL that owns query, location, and pagination). Supports desktop, mobile, iOS, and Android emulation and multi-page results. A result link can come back empty with a redirectLink beside it; pass the redirectLink to resolve_google_redirect to get the destination. An entry in shoppingCards or aioverview.inlineProducts can carry a productResultToken; pass it to get_google_product within 5 minutes to get the full product. Costs 5 credits (3 base + 2 sync surcharge); include.aioverview and/or include.paaAioverview add 2 once; each page after the first adds 2.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "scrape_google"
  }
}

Input Schema

NameRequiredDescriptionDefault
glNoISO 3166-1 alpha-2 code for the result geography, sent to Google as gl (e.g. "us"). Use list_countries to see supported codes per model. Required in query mode; in url mode it is read from the URL's gl parameter unless supplied here, and an explicit value wins.
hlNoOptional Google interface-language code, sent as hl (e.g. "de", "pt-br"). Defaults to the language derived from gl — set it when the geography's dominant language is not the one you want. In url mode it is read from the URL's hl parameter unless supplied here, and an explicit value wins.
udmNoOptional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted. In url mode, udm=14 inside the URL does the same.
urlNoA complete google.com/search URL to fetch instead of building one from structured fields. When set, query/location/uule/pages must be omitted (the URL owns them); gl and hl are read from the URL's gl/hl parameters; an explicit gl or hl must agree with the URL's copy.
uuleNoOptional Google UULE location parameter. Mutually exclusive with location.
pagesNoNumber of result pages to fetch (1-10). Defaults to 1.
queryNoThe search query. Required unless url is provided.
deviceNoDevice to emulate: desktop, mobile, ios (Safari on iPhone), or android (Chrome on Android). mobile is an alias for android. Defaults to desktop.desktop
countryNoISO 3166-1 alpha-2 country code to geo-target the request from (e.g. "US"). Use list_countries to see supported codes per model. Deprecated — use gl instead; country is kept for compatibility and must not disagree with gl.
includeNoOptional flags. Set aioverview: true to extract Google's AI Overview (or { markdown: true } for markdown), paaAioverview: true to hydrate AI answers in People Also Ask. Leave unset for organic results only.
locationNoOptional location name to target search results (e.g. "Austin, Texas, United States"). Mutually exclusive with uule.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / udm / description
      Previous value: -"Optional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted."New value: +"Optional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted. In url mode, udm=14 inside the URL does the same."
  2. Changed1 schema field changed
    • changedInput schema / properties / udm / description
      Previous value: -"Optional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted. In url mode, udm=14 inside the URL does the same."New value: +"Optional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted."
  3. Changed1 schema field changed
    • addedInput schema / properties / udm
      Added value: +{
      +  "const": 14,
      +  "description": "Optional. Set to 14 to search Google's Web tab, which lists web results only. No other value is accepted. In url mode, udm=14 inside the URL does the same.",
      +  "type": "number"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / include / properties / aioverview / anyOf
      Previous value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "properties": {
      -      "markdown": {
      -        "type": "boolean"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "properties": {
      +      "expand": {
      +        "type": "boolean"
      +      },
      +      "markdown": {
      +        "type": "boolean"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
  5. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"A complete google.com/search URL to fetch instead of building one from structured fields. When set, query/location/uule/pages must be omitted (the URL owns them); gl and hl are read from the URL's gl/hl parameters unless supplied explicitly."New value: +"A complete google.com/search URL to fetch instead of building one from structured fields. When set, query/location/uule/pages must be omitted (the URL owns them); gl and hl are read from the URL's gl/hl parameters; an explicit gl or hl must agree with the URL's copy."
  6. Changed1 schema field changed
    • removedInput schema / properties / include / properties / googleGoto
      Removed value: -{
      -  "type": "boolean"
      -}
  7. Changed1 schema field changed
    • addedInput schema / properties / include / properties / googleGoto
      Added value: +{
      +  "type": "boolean"
      +}
  8. Changed4 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO 3166-1 alpha-2 country code to geo-target the request from (e.g. \"US\"). Use list_countries to see supported codes per model. Required in query mode; in url mode it can be derived from the URL's gl parameter."New value: +"ISO 3166-1 alpha-2 country code to geo-target the request from (e.g. \"US\"). Use list_countries to see supported codes per model. Deprecated — use gl instead; country is kept for compatibility and must not disagree with gl."
    • addedInput schema / properties / gl
      Added value: +{
      +  "description": "ISO 3166-1 alpha-2 code for the result geography, sent to Google as gl (e.g. \"us\"). Use list_countries to see supported codes per model. Required in query mode; in url mode it is read from the URL's gl parameter unless supplied here, and an explicit value wins.",
      +  "type": "string"
      +}
    • addedInput schema / properties / hl
      Added value: +{
      +  "description": "Optional Google interface-language code, sent as hl (e.g. \"de\", \"pt-br\"). Defaults to the language derived from gl — set it when the geography's dominant language is not the one you want. In url mode it is read from the URL's hl parameter unless supplied here, and an explicit value wins.",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"A complete google.com/search URL to fetch instead of building one from structured fields. When set, query/location/uule/pages must be omitted (the URL owns them); country can be derived from the URL's gl parameter."New value: +"A complete google.com/search URL to fetch instead of building one from structured fields. When set, query/location/uule/pages must be omitted (the URL owns them); gl and hl are read from the URL's gl/hl parameters unless supplied explicitly."
  9. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, yet the description still adds substantial behavior: a credit cost model (5 base+sync, +2 per extra page, +2 for AI Overview/PAA once) and a hard 5-minute validity window on productResultTokens. It also discloses a non-obvious return quirk — links that come back empty with a redirectLink beside them — which the agent could not infer from schema or annotations.

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-loads the purpose, then modes, then edge-case handoffs, then pricing — a sensible order with no filler sentences. It is dense and the pricing sentence packs several clauses together, but nothing is redundant with the schema.

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 11 parameters, nested include flags, and no output schema, the description still covers return shape (organic results, shoppingCards, aioverview.inlineProducts, redirectLink) and the token handoff path. An agent has everything needed to choose a mode and post-process the response correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning on top: it frames gl/query/pages/location/uule as one coherent "structured mode" and explains that url mode owns query, location, and pagination. It also attaches cost consequences to include.aioverview and include.paaAioverview, which the schema does not convey.

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 ("Run a Google search ... return organic results") plus the scope of the result set and the two invocation modes. The mention of AI Overview and People-Also-Ask extraction also implicitly separates it from the news/AI-mode siblings.

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 lays out the two mutually exclusive modes (structured vs url) and names the follow-up tools for the two edge cases (resolve_google_redirect for empty links, get_google_product for productResultTokens within 5 minutes). It does not state when to pick this over scrape_google_news, scrape_google_ai_mode, or the Bing/ChatGPT alternatives, so sibling routing is only partially covered.

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.