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. Costs 5 credits (3 base + 2 sync surcharge); include.aioverview and/or include.paaAioverview add 2 once; each page after the first adds 2.

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.
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 / 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."
  2. Changed1 schema field changed
    • removedInput schema / properties / include / properties / googleGoto
      Removed value: -{
      -  "type": "boolean"
      -}
  3. Changed1 schema field changed
    • addedInput schema / properties / include / properties / googleGoto
      Added value: +{
      +  "type": "boolean"
      +}
  4. 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."
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, openWorld, non-destructive), and the description adds substantive behavior on top: an explicit credit cost model (5 base/sync, +2 for AI Overview flags, +2 per extra page) and the quirk that a result link can come back empty with a redirectLink to resolve. Those are operationally important facts an agent could not infer from structured fields.

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 and mode split, then costs and the redirect caveat last. Every sentence carries operational value, though a few clauses (device emulation, multi-page) restate schema content and add mild density.

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

Completeness4/5

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

With 10 parameters, a nested include object, and no output schema, the description supplies the mode rules, cost implications, and a key response anomaly (empty link + redirectLink). It does not describe the overall response envelope or pagination metadata, which is a minor gap for a scraping tool of this complexity.

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 would be 3, but the description still adds meaning: it explains that url mode owns query/location/pagination and that device emulation covers desktop/mobile/iOS/Android. The include flag semantics (markdown vs. boolean) are left to the schema, which is reasonable.

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 ... and return organic results") plus its scope (chosen country, organic results, optional AI Overview/People-Also-Ask). It also names the sibling it hands off to (resolve_google_redirect) for empty links, so an agent can distinguish it from scrape_google_news or scrape_google_ai_mode without opening a 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?

The two-mode split (structured query+gl vs. a complete google.com/search URL that owns query/location/pagination) gives clear selection guidance between invocation styles. It also says when to use include.aioverview/paaAioverview and when to route to resolve_google_redirect. It stops short of explicitly contrasting with the news/AI-mode siblings, so no exclusions are stated.

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.