Skip to main content
Glama

openapi_v2_keyword_extends

Get keyword expansions

  1. Function

Return expanded keywords related to the seed keyword with search volume, rank, and relevance metrics. Supports phrase and fuzzy expansion.

  1. Use cases

Build candidate keyword lists for further research, listing content or advertising evaluation. Use detail or market-profile to assess the returned candidates.

Responses:

200: Successful Response (Success Response) Content-Type: application/json

Example Response:

{
  "success": true,
  "meta": {
    "requestId": "Requestid",
    "timestamp": "Timestamp"
  }
}

Output Schema:

{
  "properties": {
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "Whether the request was successful",
      "default": true
    },
    "data": {
      "description": "Response data payload"
    },
    "error": {
      "description": "Error details if request failed"
    },
    "meta": {
      "description": "Metadata for API responses.\n\nCredit fields follow the ADR-0003 parallel-fields strategy (Option 3):\n- `credits_remaining` / `credits_consumed` (int): legacy fields, rounded\n  to whole credits, kept for zero-breaking-change to existing SDK clients.\n- `credits_remaining_exact` / `credits_consumed_exact` (float): new\n  precision-aware fields for clients that opt in to decimal credits.\n\nSee ADR-0003 decision 5 and the \u00a78 deprecation timeline.\n\nTODO(2026-11, ADR-0003 \u00a78 +6mo): mark `credits_remaining` /\n`credits_consumed` as `deprecated=True` in their Field() definitions\nand announce in customer changelog.\nTODO(2027-05, ADR-0003 \u00a78 +12mo): remove the legacy int fields via a\nmajor-version bump of the OpenAPI surface.",
      "properties": {
        "requestId": {
          "type": "string",
          "title": "Requestid",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "title": "Timestamp",
          "description": "Response timestamp in ISO 8601 format"
        },
        "total": {
          "title": "Total",
          "description": "Total number of records"
        },
        "page": {
          "title": "Page",
          "description": "Current page number"
        },
        "pageSize": {
          "title": "Pagesize",
          "description": "Number of records per page"
        },
        "totalPages": {
          "title": "Totalpages",
          "description": "Total number of pages"
        },
        "creditsRemaining": {
          "title": "Creditsremaining",
          "description": "Remaining API credits (rounded to whole credits; see creditsRemainingExact for precise value)"
        },
        "creditsConsumed": {
          "title": "Creditsconsumed",
          "description": "Credits consumed by this request (rounded; see creditsConsumedExact for precise value)"
        },
        "creditsRemainingExact": {
          "title": "Creditsremainingexact",
          "description": "Remaining API credits, precise to 1 decimal place"
        },
        "creditsConsumedExact": {
          "title": "Creditsconsumedexact",
          "description": "Credits consumed by this request, precise to 1 decimal place"
        },
        "tokensUsage": {
          "description": "Provider token-usage block \u2014 populated on terminal video polls only, null on every non-video endpoint. See TokensUsage for its fields."
        }
      },
      "type": "object",
      "required": [
        "requestId",
        "timestamp"
      ],
      "title": "ResponseMeta"
    }
  },
  "type": "object",
  "required": [
    "meta"
  ],
  "title": "OpenApiResponse[KeywordExtendsData]",
  "examples": []
}

422: Validation Error Content-Type: application/json

Example Response:

{
  "detail": [
    {
      "loc": [],
      "msg": "Message",
      "type": "Error Type",
      "ctx": {}
    }
  ]
}

Output Schema:

{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {},
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, starting at 1.
queryYesSeed keyword.
sortByNoSort field: relevanceScore=expansion relevance; estimateSearchCount=estimated searches; abaRank=numeric ABA rank; keyword=lexical order.relevanceScore
pageSizeNoItems per page; 1 to 100.
queryTypeNoKeyword expansion match mode.phrase
sortOrderNoSort direction.desc
granularityNoData period granularity. Only `week` is currently supported.week
marketplaceNoAmazon marketplace code. Only 'US' is currently supported.US

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / granularity
      Added value: +{
      +  "const": "week",
      +  "default": "week",
      +  "description": "Data period granularity. Only `week` is currently supported.",
      +  "title": "granularity",
      +  "type": "string"
      +}
    • changedInput schema / properties / page / description
      Previous value: -"Page number."New value: +"Page number, starting at 1."
    • changedInput schema / properties / pageSize / description
      Previous value: -"Page size."New value: +"Items per page; 1 to 100."
    • addedInput schema / properties / query / minLength
      Added value: +1
    • addedInput schema / properties / query / pattern
      Added value: +"\\S"
    • changedInput schema / properties / queryType / description
      Previous value: -"Keyword expansion mode. Supports `phrase` and `fuzzy`; `exact` is not supported."New value: +"Keyword expansion match mode."
    • changedInput schema / properties / sortBy / description
      Previous value: -"Sort field."New value: +"Sort field: relevanceScore=expansion relevance; estimateSearchCount=estimated searches; abaRank=numeric ABA rank; keyword=lexical order."
  2. Changed3 schema fields changed
    • addedInput schema / properties / marketplace / const
      Added value: +"US"
    • changedInput schema / properties / marketplace / description
      Previous value: -"Amazon marketplace code"New value: +"Amazon marketplace code. Only 'US' is currently supported."
    • removedInput schema / properties / marketplace / enum
      Removed value: -[
      -  "US",
      -  "UK"
      -]
  3. Changed3 schema fields changed
    • removedInput schema / properties / date
      Removed value: -{
      -  "description": "Lookup date in YYYY-MM-DD format. Data is stored as weekly snapshots, and the response returns the latest snapshot on or before this date.",
      -  "title": "date",
      -  "type": "string"
      -}
    • changedInput schema / properties / sortBy / enum
      Previous value: -[
      -  "relevanceScore",
      -  "estimateSearchCount",
      -  "abaRank",
      -  "observedAt",
      -  "keyword"
      -]New value: +[
      +  "relevanceScore",
      +  "estimateSearchCount",
      +  "abaRank",
      +  "keyword"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "date",
      -  "query"
      -]New value: +[
      +  "query"
      +]
  4. Changed8 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"查询日期,格式 YYYY-MM-DD。数据按周快照存储,返回该日期当日或之前最近一期快照数据。"New value: +"Lookup date in YYYY-MM-DD format. Data is stored as weekly snapshots, and the response returns the latest snapshot on or before this date."
    • changedInput schema / properties / marketplace / description
      Previous value: -"亚马逊站点代码"New value: +"Amazon marketplace code"
    • changedInput schema / properties / page / description
      Previous value: -"页码,从 1 开始"New value: +"Page number."
    • changedInput schema / properties / pageSize / description
      Previous value: -"每页条数,最大 100"New value: +"Page size."
    • changedInput schema / properties / query / description
      Previous value: -"种子关键词"New value: +"Seed keyword."
    • changedInput schema / properties / queryType / description
      Previous value: -"扩词匹配模式,目前支持 `phrase` 和 `fuzzy`,不支持 `exact`"New value: +"Keyword expansion mode. Supports `phrase` and `fuzzy`; `exact` is not supported."
    • changedInput schema / properties / sortBy / description
      Previous value: -"排序字段"New value: +"Sort field."
    • changedInput schema / properties / sortOrder / description
      Previous value: -"排序方向"New value: +"Sort direction."
  5. Added

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral disclosure. It states the operation returns data (implies read-only) and includes the full response schema with pagination and credit fields. It does not explicitly mention side effects, auth requirements, or limitations (e.g., only US marketplace, week granularity – though those appear in the input schema). The response schema provides useful transparency, but the description omits deeper behavior like sorting defaults or rate limits. Adequate but not exhaustive.

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

Conciseness3/5

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

The core description is concise and structured with '1. Function' and '2. Use cases', front-loading the purpose. However, the description string includes very long response schemas (200 and 422) that, while informative, bloat the overall description. The prose is efficient, but the inclusion of detailed schemas makes the whole description lengthy. A more balanced approach would move schemas to a separate output schema field, but given the current format, it is acceptable.

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?

The description covers purpose, use cases, and directs to subsequent tools. The input schema documents all parameters and constraints (e.g., only week granularity, US marketplace). The response schema explains the return format, including pagination and credit metadata. It lacks explicit alternatives comparison (e.g., vs. keyword_search_results) but the workflow guidance is clear. For a keyword expansion tool, this is nearly complete.

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?

All 8 parameters have descriptions in the input schema, so the baseline is 3. The description adds no new parameter-level semantics; it mentions 'search volume, rank, and relevance metrics' which map to sortBy enum values, and 'phrase/fuzzy' which is already in queryType. No additional context beyond the schema, so a 3 is appropriate.

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 starts with 'Get keyword expansions' and immediately clarifies the resource: 'Return expanded keywords related to the seed keyword with search volume, rank, and relevance metrics.' It distinguishes from siblings by naming the expansion modes ('phrase' and 'fuzzy') and the use case (building candidate keyword lists), which separates it from detail, trend, and search tools.

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?

Provides an explicit use case: 'Build candidate keyword lists for further research, listing content or advertising evaluation.' It also directs to alternative tools for the next step: 'Use detail or market-profile to assess the returned candidates.' It does not explicitly say when not to use this tool, but the workflow guidance is clear and sufficient.

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