Skip to main content
Glama
apiguru-amazon-data

apiguru-amazon-data

Best-seller rankings for a category

best_sellers
Read-onlyIdempotent

Fetch Amazon department rankings for a marketplace and page to see which products currently sell best, with resolved category and subcategory details.

Instructions

Use for what sells best in a department right now. The rank is Amazon's, not a sales figure. Best-seller rankings for a department of one marketplace, 50 per page. Every answer carries the department it resolved to and how (category_resolution: by slug, name or a fragment of a name, with a hint when a fragment such as 'shoes' landed on the whole 'Clothing, Shoes & Jewelry' department, or 'subcategory' when a word such as 'camera' named a subcategory), available_categories (that marketplace's departments with slugs; MCP: with compact=false) and available_subcategories (the children of the node shown, with the ids subcategory_code takes). On amazon.com subcategory_code also takes any browse node id at any depth, or a name resolved under the department ("women's shoes", "mules & clogs"); category.subcategory_path gives the node's full path and category.heading the page's own title line. Price: $0.003 per call. No required parameters - calling it bare returns US appliances page 1. category accepts a slug, a display name, one of the older US department names, or a unique fragment; category_resolution.via says which, and a fragment match adds a hint naming the subcategories that carry the word, with ids. On amazon.com the whole browse tree is known: subcategory_code takes any node id or a name at any depth, subcategory_name and subcategory_path are filled without a fetch, and available_subcategories lists the node's real children (empty on a leaf). Other marketplaces name only what their navigation showed. page is capped at 5 (a 400 beyond, not a 500). rank is the position within the requested list on this page. Rows are the same for every marketplace; only the department vocabulary differs, and the answer carries it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "best_sellers"
  }
}

Input Schema

NameRequiredDescriptionDefault
geoNoMarketplace country code.US
pageNoResult page, 1-based, 50 rows each; Amazon's lists stop at page 5.
limitNoHow many ranked products to return from this page (0 = all of them). A full page is 50 rows, which most clients spill to a file instead of showing inline. The answer carries _truncated with the true count when it trims.
fieldsNoComma-separated row fields to return instead of the light set, e.g. "asin,product_title,product_price". Rows list what they left out under _omitted_fields.
compactNoReturn light rows: identity, price, rating, badges and one delivery_date, dropping the long delivery prose that repeats itself across three fields. false returns every field the REST API sends (roughly 3x the size).
categoryNoBest-seller department, by slug or by name as Amazon shows it for that marketplace (case-insensitive; a unique fragment works, and the answer's category_resolution says when a fragment was used -- 'shoes' is the whole 'Clothing, Shoes & Jewelry' department, and the hint then lists the Shoes subcategories with their ids). Departments and their slugs differ per marketplace: amazon.com has electronics, amazon.de has ce-de (Electronics & Photo). A word that names a subcategory works too: category=camera on amazon.es is Electronics > Camera & Photo (category_resolution.via says 'subcategory'; several equally good matches are a free 400 listing each as category + subcategory_code). REST answers list the marketplace's departments under available_categories (the MCP tool with compact=false); an unknown name is a free 400 listing them.appliances
subcategory_codeNoBrowse node id under `category`: one from available_subcategories of a previous answer, or on amazon.com any node id at any depth (679410011 is Women > Shoes > Mules & Clogs) or a name resolved under the department ("women's shoes", "mens boots", "mules & clogs"). A name that fits two nodes equally (Men > Shoes > Boots and Women > Shoes > Boots) is a free 400 listing both ids with their paths.

Output Schema

NameRequiredDescriptionDefault
dataNo
pageNo
successNo
categoryNo
max_pageNo
page_sizeNo
request_idNo
category_resolutionNo
available_categoriesNo
available_subcategoriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.69
    • changedInput schema / properties / limit / description
      Previous value: -"How many ranked products to return from this page (0 = all of them). A full page is up to 48 rows and about 54 KB, which most clients spill to a file instead of showing inline. The answer carries _truncated with the true count when it trims."New value: +"How many ranked products to return from this page (0 = all of them). A full page is 50 rows, which most clients spill to a file instead of showing inline. The answer carries _truncated with the true count when it trims."
  2. Changed2 schema fields changedv1.1.50
    • changedInput schema / properties / category / description
      Previous value: -"Best-seller department, by slug or by name as Amazon shows it for that marketplace (case-insensitive; a unique fragment works, and the answer's category_resolution says when a fragment was used -- 'shoes' is the whole 'Clothing, Shoes & Jewelry' department, and the hint then lists the Shoes subcategories with their ids). Departments and their slugs differ per marketplace: amazon.com has electronics, amazon.de has ce-de (Electronics & Photo). Every answer lists that marketplace's departments under available_categories; an unknown or ambiguous name is a free 400 listing them."New value: +"Best-seller department, by slug or by name as Amazon shows it for that marketplace (case-insensitive; a unique fragment works, and the answer's category_resolution says when a fragment was used -- 'shoes' is the whole 'Clothing, Shoes & Jewelry' department, and the hint then lists the Shoes subcategories with their ids). Departments and their slugs differ per marketplace: amazon.com has electronics, amazon.de has ce-de (Electronics & Photo). A word that names a subcategory works too: category=camera on amazon.es is Electronics > Camera & Photo (category_resolution.via says 'subcategory'; several equally good matches are a free 400 listing each as category + subcategory_code). REST answers list the marketplace's departments under available_categories (the MCP tool with compact=false); an unknown name is a free 400 listing them."
    • changedInput schema / properties / geo / enum
      Previous value: -[
      -  "US",
      -  "CA",
      -  "DE",
      -  "MX",
      -  "UK",
      -  "FR",
      -  "IT",
      -  "ES",
      -  "AU",
      -  "BR",
      -  "IN",
      -  "JP",
      -  "NL",
      -  "AE",
      -  "PL",
      -  "SA",
      -  "SG",
      -  "SE",
      -  "TR",
      -  "BE"
      -]New value: +[
      +  "US",
      +  "CA",
      +  "DE",
      +  "MX",
      +  "UK",
      +  "FR",
      +  "IT",
      +  "ES",
      +  "AU",
      +  "BR",
      +  "IN",
      +  "JP",
      +  "NL",
      +  "AE",
      +  "PL",
      +  "SA",
      +  "SG",
      +  "SE",
      +  "TR",
      +  "BE",
      +  "IE",
      +  "ZA",
      +  "EG"
      +]
  3. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description earns credit for everything beyond that: cost ($0.003 per call), the page-5 cap returning 400 rather than 500, free 400 errors for unknown departments or ambiguous subcategory names, the compact=false requirement to see available_categories, and the _truncated / _omitted_fields signalling. These are non-obvious behaviors an agent must know before calling.

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

Conciseness2/5

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

The opening is well front-loaded, but the body repeats itself: the amazon.com any-node-id rule appears twice, the fragment-match hint is explained three times, and available_categories/available_subcategories are re-described in multiple places. Substantial trimming is possible without losing any fact.

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 7-parameter tool with an output schema and full annotation coverage, the description fills in the remaining gaps: marketplace-dependent department vocabulary, error semantics, cost, pagination ceiling, and defaults. An agent could call this correctly and interpret the response without further information.

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 description coverage is 100%, so the baseline is 3; the description still adds meaning by explaining category_resolution.via as a post-hoc feedback mechanism and by flagging that on amazon.com subcategory_code accepts any browse node id at any depth or a name. Much of this overlaps with the schema text, and page/limit/fields behavior is largely restated rather than extended.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first two sentences name a specific resource and scope: 'Best-seller rankings for a department of one marketplace, 50 per page,' plus the key caveat that the rank is Amazon's, not a sales figure. That is far more precise than the title alone. It never names a sibling (search, deals, product_details) to contrast with, so differentiation is left implicit.

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

Usage Guidelines3/5

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

'Use for what sells best in a department right now' implies the use case, and the operational note that a bare call returns US appliances page 1 is genuinely helpful activation guidance. However, there is no when-not guidance and no explicit routing to alternatives such as search or product_details when the agent actually wants product attributes rather than a popularity list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.