Skip to main content
Glama

openapi_v2_keyword_detail

Get keyword detail

  1. Function

Return a single-week raw statistical snapshot for one or more keywords: search demand, competition and advertising metrics from the latest available week on or before date. The observed period is reported in context.dataWindow; resolvedDate is the actual snapshot date. Both single and batch requests return data.context + data.items[]. This is snapshot data, not a scored market assessment.

  1. Use cases

Use detail to compare current raw metrics when screening candidate keywords. Use market-profile for business evidence, levels and interpretations; use trend for raw weekly history.

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[KeywordDetailData]",
  "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

NameRequiredDescriptionDefault
dateYesLookup date (YYYY-MM-DD). Returns the latest snapshot on or before this date; actual date is `resolvedDate`.
keywordNoSingle keyword; mutually exclusive with `keywords`. Surrounding whitespace is trimmed; letter case is accepted.
keywordsNoKeyword list, up to 20; mutually exclusive with `keyword`. Must equal `LOWER(TRIM(value))`; uppercase letters and surrounding whitespace are rejected. Duplicate keywords are rejected.
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. Changed15 schema fields changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "keyword"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "keywords"
      +    ]
      +  }
      +]
    • changedInput schema / properties / date / description
      Previous value: -"Lookup date in YYYY-MM-DD format. Returns the latest weekly snapshot on or before this date."New value: +"Lookup date (YYYY-MM-DD). Returns the latest snapshot on or before this date; actual date is `resolvedDate`."
    • addedInput schema / properties / date / format
      Added value: +"date"
    • addedInput schema / properties / date / pattern
      Added value: +"^\\d{4}-(0[1-9]|1[0-2])-([0-2]\\d|3[01])$"
    • addedInput schema / properties / granularity
      Added value: +{
      +  "const": "week",
      +  "default": "week",
      +  "description": "Data period granularity. Only `week` is currently supported.",
      +  "title": "granularity",
      +  "type": "string"
      +}
    • removedInput schema / properties / keyword / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / keyword / description
      Previous value: -"Keyword to look up."New value: +"Single keyword; mutually exclusive with `keywords`. Surrounding whitespace is trimmed; letter case is accepted."
    • addedInput schema / properties / keyword / minLength
      Added value: +1
    • addedInput schema / properties / keyword / pattern
      Added value: +"\\S"
    • removedInput schema / properties / keywords / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 20,
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]
    • changedInput schema / properties / keywords / description
      Previous value: -"Keywords to look up in batch, up to 20."New value: +"Keyword list, up to 20; mutually exclusive with `keyword`. Must equal `LOWER(TRIM(value))`; uppercase letters and surrounding whitespace are rejected. Duplicate keywords are rejected."
    • addedInput schema / properties / keywords / items
      Added value: +{
      +  "minLength": 1,
      +  "pattern": "^[^A-Z\\s](?:[^A-Z]*[^A-Z\\s])?$",
      +  "type": "string"
      +}
    • addedInput schema / properties / keywords / maxItems
      Added value: +20
    • addedInput schema / properties / keywords / minItems
      Added value: +1
    • addedInput schema / properties / keywords / uniqueItems
      Added value: +true
  2. Changed1 schema field changed
    • removedInput schema / properties / granularity
      Removed value: -{
      -  "const": "week",
      -  "default": "week",
      -  "description": "Time granularity. Keyword detail currently supports `week` only.",
      -  "title": "granularity",
      -  "type": "string"
      -}
  3. 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"
      -]
  4. Changed1 schema field changed
    • changedInput schema / properties / date / description
      Previous 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."New value: +"Lookup date in YYYY-MM-DD format. Returns the latest weekly snapshot on or before this date."
  5. Changed4 schema fields changed
    • addedInput schema / properties / granularity
      Added value: +{
      +  "const": "week",
      +  "default": "week",
      +  "description": "Time granularity. Keyword detail currently supports `week` only.",
      +  "title": "granularity",
      +  "type": "string"
      +}
    • addedInput schema / properties / keyword / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  }
      +]
    • addedInput schema / properties / keywords
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "maxItems": 20,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Keywords to look up in batch, up to 20.",
      +  "title": "keywords",
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "date",
      -  "keyword"
      -]New value: +[
      +  "date"
      +]
  6. Changed3 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 / keyword / description
      Previous value: -"要查询的关键词"New value: +"Keyword to look up."
    • changedInput schema / properties / marketplace / description
      Previous value: -"亚马逊站点代码"New value: +"Amazon marketplace code"
  7. Added

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden, and it does disclose real behavior: the date is a lookup that resolves to the latest snapshot on or before it, the actual date surfaces as resolvedDate, and single and batch calls both return data.context + data.items[]. It does not mention auth requirements, credit consumption, or failure modes, which keeps it short of a 5.

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 prose is front-loaded and organized into Function and Use cases sections, with no wasted narrative sentences. It loses a point for the clunky numbered headers and for the large embedded response-schema block, which carries ADR/TODO noise that is not agent-relevant.

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?

For a 5-parameter read tool with full schema coverage and no annotations, the description covers purpose, response shape, date resolution, and sibling routing well enough to call correctly. It stops short of disclosing cost/credit implications or error behavior, minor gaps given the embedded response schemas.

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 description coverage is 100%, so the schema already documents date resolution, keyword/keywords mutual exclusivity and normalization, and the week/US constraints. The prose restates the date and keyword semantics ('one or more keywords', 'latest available week on or before date') without adding syntax or format detail beyond the schema, so the 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?

The Function section names a specific verb and resource and pins down the payload precisely: a single-week raw snapshot with search demand, competition and advertising metrics, plus the date-resolution semantics (resolvedDate, dataWindow). It explicitly contrasts itself with siblings by stating 'This is snapshot data, not a scored market assessment,' which separates it from market-profile and trend without schema inspection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Use cases section gives an explicit when-to-use ('compare current raw metrics when screening candidate keywords') and names two alternatives with their selecting conditions: market-profile for 'business evidence, levels and interpretations' and trend for 'raw weekly history.' That is a complete routing rule set.

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