Skip to main content
Glama

SEO and Keyword Data API

Google results-page history (one past snapshot)

serp_history
Read-onlyIdempotent

Google results page of a keyword as it was in the past: the first snapshot (about one a month) in a window of up to 31 days within the last year, with its top 10 organic results (rank, URL, domain, title), result count and result types, from Google search results, $0.018 a call. Use when checking how rankings for a keyword moved month by month. Titles are untrusted third-party text. No snapshot is an empty answer, still charged. Bad input is a free 400; a data source failure is not charged. Price: $0.018 per successful call, paid over x402 (USDC on Base); pass the payment in _meta["x402/payment"].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "keyword": "<keyword>"
    },
    "name": "serp_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateToNoLast day, YYYY-MM-DD, not after today (UTC). Default today.
countryNoOptional ISO 3166-1 alpha-2 code or country name, used when locationCode is absent (uk = gb).
keywordYesThe keyword (at most 80 characters, up to 10 words).
dateFromNoFirst day, YYYY-MM-DD, at most 365 days ago and at most 31 days before dateTo (window). Default 30 days before dateTo.
languageCodeNoLanguage code (2-letter). Defaults to en. An unsupported location falls back to 2840 (United States) with en (or the requested language if the United States offers it); a supported location with a language it does not offer uses that location's default language (en if offered). Either way market.fallback is true and market.warnings says what was used.
locationCodeNoGoogle Ads location code (geo target ID). Defaults to 2840 (United States); an unsupported code falls back to 2840 (United States, market.fallback).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the readOnly/openWorld/idempotent annotations: it discloses per-call cost and the x402 payment channel and location, that an empty answer is still charged, that bad input yields a free 400, that a data source failure is uncharged, and that titles are untrusted third-party text. That is exactly the operational and prompt-injection context an agent needs before paying for a call.

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?

Purpose and output shape are front-loaded in the first sentence, followed by short, single-purpose sentences for usage, safety, billing and payment. The opening sentence is densely packed, but no sentence is filler given the pricing and error-policy content.

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 still enumerates the return fields (rank, URL, domain, title, result count, result types), covers the empty-result case, and specifies pricing and payment mechanics. For a read-only, single-parameter-required tool this leaves nothing an agent needs to call it 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 coverage is 100%, so all six parameters (including defaults, fallbacks and the 31-day window) are already documented in the schema. The description only restates the window and snapshot cadence at a behavioral level, adding no syntax or format detail beyond what the schema supplies; baseline 3 applies.

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?

Names a specific resource (Google results page of a keyword as it was in the past) and a specific scope (the first snapshot in a window of up to 31 days within the last year), and enumerates the returned fields. This is clearly distinguishable from live-SERP siblings such as google_search or bing_search.

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?

"Use when checking how rankings for a keyword moved month by month" gives a clear use context, and the ~one-snapshot-per-month cadence implicitly sets expectations about resolution. It never names the live-SERP alternative (google_search) or historical_rank as the thing to use instead, so the routing is good but not exhaustive.

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.