Skip to main content
Glama

openapi_v2_keyword_trend_profile

Get keyword trend profile

  1. Function

Return precomputed trend profiles for one or more keywords over fixed 4, 8, 12, or 26-period windows, preserving keyword and requested-window order. A keyword is billed once when at least one window profile is available. Read trend for search-demand and ABA-rank direction, and trendEvidence for supporting metrics. These are observed conclusions, not forecasts or causal explanations.

  1. Use cases

Summarize observed search-demand and ABA-rank direction over a supported window. Use trend to inspect the weekly data behind a conclusion.

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[KeywordTrendProfileData]",
  "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
dateYesLookup date (YYYY-MM-DD). Returns the latest profile 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
windowPeriodsYesFixed period counts for the analysis windows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 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 profile 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
    • addedInput schema / properties / windowPeriods / 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. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers substantial behavioral disclosure: the data is precomputed (not live), output preserves keyword/window order, billing occurs once per keyword with at least one window profile, and results are observed conclusions, not forecasts or causal explanations. These traits go well beyond anything the schema states.

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 tight and front-loaded: Function, then Use cases, with the loaded facts (precomputed, window sizes, order preservation, billing, non-forecast) in the first short paragraph. Minor redundancy — the heading repeats the phrase 'Get keyword trend profile' — but no filler or irrelevant detail.

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 tool is moderately complex (6 params, a oneOf keyword/keywords gate, no output schema, no annotations), and the description compensates well by teaching how to read the response ('Read trend for search-demand and ABA-rank direction, and trendEvidence for supporting metrics'). It could have given a data-shape example, but the field-level guidance covers the essential interpretation need.

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, and the schema documents each parameter thoroughly (date lookback, mutual exclusivity, LOWER(TRIM(value)) constraints, window enums). The description adds meaning beyond the schema: ordering of results preserves keyword/requested-window order, and the billing-per-keyword semantic tying windows to a single charge, which are not visible in the input schema.

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: 'Return precomputed trend profiles for one or more keywords over fixed 4, 8, 12, or 26-period windows.' The 'precomputed profile' framing differentiates it from the raw sibling openapi_v2_keyword_trend, and the 'observed conclusions, not forecasts' clause scopes its semantics. An agent can tell this from sibling trend tools without opening either schema.

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?

Gives explicit use-case context: 'Summarize observed search-demand and ABA-rank direction over a supported window.' It names the alternative directly — 'Use trend to inspect the weekly data behind a conclusion' — routing the agent to the sibling raw-trend tool when detail is needed. This is explicit when-to-use and when-to-prefer-alternative 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.

Resources