Keepa Product Data Request
This skill guides you on how to retrieve Amazon product details via the Keepa product request API, helping Amazon sellers and analysts obtain structured product data for one or more ASINs across multiple Amazon marketplaces.
Core Concepts
The Keepa Product Request API returns detailed product listing data from Amazon, sourced through Keepa. Given one or more ASINs and a marketplace, it returns comprehensive product information: pricing, title, Item Highlights (itemHighlights, when available), main image, listing date, material, weight, dimensions, sales rank, monthly sales units (current and up to 12 months of history), FBA fees, ratings, review counts, category tree, and more.
Key points:
- You can query up to 5 ASINs in a single request by separating them with commas.
- The
domainparameter is a numeric marketplace ID (e.g.,1= Amazon.com US), not a country code. - Setting
historyto1includes historical sales data (monthly sales for up to 12 prior months, average sales rank over 30/90/180 days). Setting it to0returns only current product information. products[].itemHighlightsis a single string of short product information separate fromtitle; it may benull, blank, or absent. It requires no extra request parameter and can be returned withhistory=0.- The response does not include full product descriptions or review content. Item Highlights is not the same as bullet points (
features) or a full description.
Parameter Guide
domain (Required)
Numeric Amazon marketplace ID. The mapping is:
| Domain ID | Marketplace |
|---|---|
| 1 | Amazon.com (US) |
| 2 | Amazon.co.uk (UK) |
| 3 | Amazon.de (Germany) |
| 4 | Amazon.fr (France) |
| 5 | Amazon.co.jp (Japan) |
| 6 | Amazon.ca (Canada) |
| 8 | Amazon.it (Italy) |
| 9 | Amazon.es (Spain) |
| 10 | Amazon.in (India) |
| 11 | Amazon.com.mx (Mexico) |
| 12 | Amazon.com.br (Brazil) |
Default to 1 (US) when the user does not specify a marketplace.
asin (Required)
One or more Amazon Standard Identification Numbers. For multiple ASINs, separate with commas. Maximum 5 ASINs per request, with a total string length limit of 300 characters.
history (Optional)
Whether to include historical data such as monthly sales for the past 12 months and average sales rank over 30/90/180 days. Set to 1 to include history, 0 (default) for basic info only.
Usage Examples
1. Single ASIN lookup (US marketplace, basic info)
{"asin": "B0088PUEPK", "domain": "1"}
2. Single ASIN with historical sales data
{"asin": "B0088PUEPK", "domain": "1", "history": 1}
3. Batch lookup of multiple ASINs (Germany)
{"asin": "B0088PUEPK,B00U26V4VQ,B07M68S376", "domain": "3", "history": 1}
4. Product lookup on Amazon Japan
{"asin": "B09V3KXJPB", "domain": "5", "history": 0}
5. Competitor comparison across multiple ASINs (US, with sales history)
{"asin": "B0CXYZ1234,B0CXYZ5678,B0CXYZ9012,B0CXYZABCD", "domain": "1", "history": 1}
调用方式
- API 端点:
POST /keepa/productRequest(完整参数/响应/错误码见references/api.md) - Python 脚本:
python scripts/keepa_product_detail.py '<JSON 参数>' [--inline] - 成本约束:本工具会消耗算力;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换关键词、翻页或改邮编连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-keepa-product-request-<timestamp>.json(<cwd>为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;<session>取自环境变量SESSION_ID,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错) - 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如
total/costToken、最大列表字段的长度 + 前 3 条样本) - 加
--inline强制全量打印到 stdout(同样落盘)
读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jq或ConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
解决认证和算力问题
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
异常情况
- 未配置API Key:环境变量未配置
LINKFOX_AGENT_API_KEY,也未配置LINKFOXAGENT_API_KEY。 - 响应401或402状态码
- 响应提示算力或余额不足:消息含"算力余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
Display Rules
- Present data clearly: Show product details in well-structured tables. Group related fields (e.g., dimensions together, sales data together) for readability.
- Price and currency: Always display the price alongside its currency (e.g., "$29.99 USD"). The
currencyfield in the response indicates the local currency. - Sales trend: When historical data is included, present the 12-month sales trend in a table or describe the trajectory (growing, declining, stable) to help users quickly assess momentum.
- Dimensions and weight: Convert millimeter values to more intuitive units when appropriate (e.g., show both mm and inches, or mm and cm). Note that weight is in grams.
- Unavailable data: Fields with value
0or-1indicate data is unavailable. Do not display these as actual measurements; instead note "N/A" or omit them. - Image display: If
imageUrlis present, display the product image to help users visually identify the product. - Error handling: When a query fails, explain the issue based on the response and suggest corrections (e.g., invalid ASIN format, unsupported marketplace).
- Large batch results: For batch queries with many ASINs, present a summary table first and offer to show individual product details on request.
- Item Highlights: Read
products[].itemHighlightsfrom the full response, not just the stdout summary orcolumns. Display the original value separately fromtitle. If it is missing,null, or blank, label it "未返回/不可用"; do not infer that the Amazon listing lacks it or reconstruct it from title, bullets, or description.
Important Limitations
- No full product descriptions or reviews: The API can return short Item Highlights, but not full product description text or review content.
- Item Highlights availability: Requires a backend deployment that passes through
itemHighlightsand available upstream data. Do not promise a value for every ASIN. - Maximum 5 ASINs per request: Batch queries are capped at 5 ASINs.
- ASIN string length limit: The
asinparameter has a maximum length of 300 characters. - Historical data is optional: Monthly sales history is only returned when
historyis set to1. - Data freshness: The
lastUpdatefield indicates when the product data was last refreshed.
User Expression & Scenario Quick Reference
Applicable -- Product data retrieval by ASIN:
| User Says | Scenario |
|---|---|
| "Look up this ASIN", "Get product details for B0XXXXXXXX" | Single ASIN lookup |
| "查这个 ASIN 的 Item Highlights", "标题之外的商品亮点/补充信息" | Retrieve existing itemHighlights separately from title |
| "What's the price of this product on Amazon" | Price query |
| "How many units does this product sell per month" | Monthly sales check |
| "Compare these ASINs", "batch lookup these products" | Multi-ASIN comparison |
| "Show me the sales trend for this ASIN" | Historical sales analysis |
| "What category is this product in" | Category / classification lookup |
| "Product dimensions", "how much does it weigh" | Physical specs query |
| "FBA fees for this product" | Fee estimation |
| "When was this product listed", "listing date" | Listing age / launch date |
| "Is this product FBA or FBM" | Fulfillment method check |
Not applicable -- Needs beyond ASIN-level product data:
- Search term / keyword analysis (use ABA data tools instead)
- Full product descriptions, review text, or generating new listing copy (retrieving existing
titleanditemHighlightsis supported) - Advertising / PPC campaign data
- Seller account or store-level analytics
- Product research without specific ASINs (e.g., "find trending products in kitchen category")
- Price history charts or Buy Box history over time (only current and average rank data are available)
Boundary judgment: When users say "product research" or "competitor analysis", if they have specific ASINs and want structured product data (price, sales, dimensions, category), this skill applies. If they want keyword-level analysis, market-wide trends without specific ASINs, or advertising metrics, this skill does not apply.
算力消耗规则
按动态规则计费:消耗算力 = 0.045 × 本次商品详情查询消耗的 Keepa token。
重要:本技能的服务按倍数动态计算,可能一次性消耗大量算力,必须提醒用户,由用户决定是否继续。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.