Skip to main content
Glama

SEO and Keyword Data API

Keyword difficulty (up to 100 keywords)

keyword_difficulty
Read-onlyIdempotent

Keyword difficulty (0-100: how hard it is to rank in Google's top 10) for up to 100 keywords in one $0.04 call. Use when you need to prioritise keywords by ranking difficulty. Keywords are normalised to lower case; over 100 keywords is a free 400. Keywords without a score are listed in missing (still charged). Bad input is free; upstream errors are not charged. Price: $0.04 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": {
      "keywords": "<keywords>"
    },
    "name": "keyword_difficulty"
  }
}

Input Schema

NameRequiredDescriptionDefault
countryNoOptional ISO 3166-1 alpha-2 code or country name, used when locationCode is absent (uk = gb).
keywordsYesKeywords to score (1-100; each at most 80 characters, normalised to lower case; one that is then empty, over 10 words or over 80 characters is listed in missing).
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.6/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld; the description goes far beyond by disclosing normalisation to lower case, that over 100 keywords produces a free 400, that unscored keywords appear in `missing` yet are still charged, that bad input and upstream errors are not charged, and that payment is $0.04 via x402 in _meta["x402/payment"]. Those billing and failure semantics are exactly the behaviour an agent cannot infer from annotations or schema.

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?

The definition is front-loaded with the metric and its scale, then packs limits, pricing, and error rules into short clauses with no filler. It is dense rather than bloated, though the billing/payment sentences add length that could be trimmed for a reader who only needs selection cues.

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?

For a paid, read-only batch lookup with four fully documented parameters and no output schema, the description covers what an agent needs: cost, payment mechanism, cardinality limits, normalisation, and the `missing` return field. Nothing essential for a correct call is absent.

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 operational meaning beyond the schema: how keywords are normalised, that exceeding 100 is penalised as a 400, and that keywords without a score land in `missing` while still being billed. It does not elaborate on country/locationCode fallback, which the schema already covers in depth.

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?

The description names the exact metric and its scale ("Keyword difficulty (0-100: how hard it is to rank in Google's top 10)") plus the batch size, so an agent immediately knows this returns a difficulty score rather than volumes, intents, or ideas like its siblings. The parenthetical definition of what the number means removes any ambiguity about the resource.

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?

It gives a clear selection rule: "Use when you need to prioritise keywords by ranking difficulty." That distinguishes it in practice from keyword_search_volume or search_intent. It stops short of explicitly naming an alternative or stating when not to use it, so it is strong but not exhaustive routing guidance.

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.