← Back to Skills Marketplace
boyd4y

Keepa Api

by Yang Jun · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
422
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install keepa-api
Description
Keepa API 客户端 - 亚马逊产品价格历史追踪工具。提供 ASIN 查询、价格历史等数据查询功能。
README (SKILL.md)

Keepa API 客户端

基于 Keepa API 的亚马逊产品价格历史追踪工具。

依赖

  • curl (HTTP 请求)
  • jq (JSON 解析)

安装依赖:

# macOS
brew install curl jq

# Ubuntu/Debian
apt-get install curl jq

Usage

# ASIN 查询 - 获取产品详情和价格历史
/keepa-api asin B08XYZ123

# 批量 ASIN 查询
/keepa-api batch-asin B08XYZ123,B09ABC456,B07DEF789

# 查询价格历史
/keepa-api price-history B08XYZ123 --days 90

# 关键词搜索产品
/keepa-api search "wireless earbuds" --category Electronics

# 查询 Best Sellers
/keepa-api bestsellers --category Electronics --page 1

# 指定亚马逊站点
/keepa-api asin B08XYZ123 --domain JP

# 直接输入 ASIN
/keepa-api
[paste ASIN or product URL]

Options

Option Description
--domain \x3CUS|UK|DE|...> 亚马逊站点 (默认:US)
--days \x3Cnumber> 历史数据天数:30, 90, 180 (默认:90)
--category \x3Cname> 商品类目 (Electronics, Home, Beauty 等)
--output \x3Ctable|json> 输出格式 (默认:table)
--page \x3Cnumber> 分页页码 (用于搜索和 Best Sellers)

Core Tools

1. Product Query (产品查询)

查询单个 ASIN 的详细信息,包括价格历史、销售排名、评论等。

/keepa-api asin \x3CASIN> [--marketplace US] [--days 90]

返回数据:

  • 产品基础信息 (标题、品牌、类目、图片)
  • 当前价格 (Amazon 价格、第三方价格)
  • 价格历史记录
  • 销售排名 (BSR)
  • 评论数量和评分
  • 库存状态

2. Price History (价格历史)

获取产品历史价格数据,支持自定义时间范围。

/keepa-api price-history \x3CASIN> [--days 30|90|180|365]

返回数据:

  • 每日价格点
  • 价格变化时间线
  • 历史最低价/最高价
  • 平均价格

3. Sales Rank History (销售排名历史)

追踪产品销售排名变化趋势,与 asin 命令一起返回。

/keepa-api asin \x3CASIN> --days 90

返回数据:

  • 每日 BSR 排名
  • 排名变化趋势
  • 类目前 100 记录

4. Product Search (产品搜索)

通过关键词搜索亚马逊产品。

/keepa-api search "\x3Ckeyword>" [--category \x3Ccategory>] [--page \x3Cn>]

返回数据:

  • 匹配产品列表
  • ASIN、标题、价格
  • 评分和评论数
  • 图片链接

5. Best Sellers (热销榜)

获取类目热销榜产品。

/keepa-api bestsellers --category \x3Ccategory> [--page \x3Cn>]

返回数据:

  • 热销产品排名
  • 产品 ASIN 和信息
  • 当前价格

Three Dimensions

Dimension Controls Options
Data Type 数据类型 product, price, rank, offers, search
Marketplace 亚马逊站点 US, EU, UK, JP, CA, AU, IN
Output Format 数据输出格式 table, json

Marketplace Reference

Marketplace Code Domain
美国 US amazon.com
英国 UK amazon.co.uk
德国 DE amazon.de
法国 FR amazon.fr
日本 JP amazon.co.jp
加拿大 CA amazon.ca
澳大利亚 AU amazon.com.au
印度 IN amazon.in

Workflow

Progress Checklist

Keepa API Query Progress:
- [ ] Step 0: Check API configuration ⛔ BLOCKING
- [ ] Step 1: Understand data requirement
- [ ] Step 2: Confirm query parameters ⚠️ REQUIRED
- [ ] Step 3: Execute API request
- [ ] Step 4: Parse and display results

Flow

Input → [Step 0: Config Check] ─┬─ Configured → Continue
                                │
                                └─ Not configured → Setup required ⛔ BLOCKING
                                                   │
                                                   └─ Complete setup → Save config → Continue

Step 0: Configuration Check ⛔ BLOCKING

Purpose: Check Keepa API configuration.

Configuration paths:

  1. Project-level: .teamclaw-skills/keepa-api/CONFIG.md
  2. User-level: ~/.teamclaw-skills/keepa-api/CONFIG.md

Check command:

# Check project-level first
test -f .teamclaw-skills/keepa-api/CONFIG.md && echo "project"

# Then user-level
test -f "$HOME/.teamclaw-skills/keepa-api/CONFIG.md" && echo "user"

First-Time Setup (if config not found):

Use AskUserQuestion with questions:

  1. Keepa API Key (required):

  2. Default marketplace:

    • US (amazon.com)
    • UK (amazon.co.uk)
    • DE (amazon.de)
    • JP (amazon.co.jp)
    • Other
  3. Default history days:

    • 30 days
    • 90 days (default)
    • 180 days
    • 365 days
  4. Output format:

    • Table (default, readable)
    • JSON (for integration)

Configuration file format (CONFIG.md):

---
api_key: your-keepa-api-key-here
marketplace: US
default_days: 90
output_format: table
---

Step 1: Understand Data Requirement

Analyze user request:

  • Data type needed (product/price/rank/offers/search)
  • Target ASIN(s) or keyword(s)
  • Marketplace
  • Time period

Step 2: Confirm Query Parameters ⚠️

Display confirmation:

  • Query type
  • Target (ASIN/keyword)
  • Marketplace
  • Days range
  • Output format

Step 3: Execute API Request

Execute curl request:

curl -s "https://api.keepa.com/product?key=$API_KEY&domain=$DOMAIN&asin=$ASIN"

Step 4: Parse and Display Results

Output format:

═══ Keepa Product Report ═══

ASIN: B08XYZ123
Title: [Product Title]
Brand: [Brand Name]
Category: [Category]

Current Price:
- Amazon: $29.99
- 3rd Party New: $27.99
- 3rd Party Used: $22.99

Sales Rank: #1,234 in Electronics
Rating: 4.5/5 (2,847 reviews)

Price History (90 days):
- Lowest: $24.99 (2024-01-15)
- Highest: $34.99 (2024-02-01)
- Average: $29.50

API Endpoints

Product Endpoint

GET /product
Parameters:
- key: API key
- domain: Amazon domain (1=US, 3=UK, 4=DE, 5=FR, 6=JP, 7=CA, 9=AU, 10=IN)
- asin: ASIN or comma-separated list
- history: Include price history (1/0)
- rating: Include rating (1/0)

Search Endpoint

GET /search
Parameters:
- key: API key
- domain: Amazon domain
- query: Search query
- category: Category ID (optional)
- page: Page number (optional)

Best Sellers Endpoint

GET /bestsellers
Parameters:
- key: API key
- domain: Amazon domain
- categoryId: Category ID
- page: Page number (optional)

Category IDs

Category ID
Electronics 172282
Computers 541966
Home & Kitchen 1055398
Beauty & Personal Care 3760911
Sports & Outdoors 3375251
Toys & Games 165793011
Clothing 7141123011
Books 283155
Office Products 1064954
Garden & Outdoor 2972638011

File Structure

skills/keepa-api/
├── SKILL.md                 # Skill 定义
├── scripts/
│   └── keepa.sh             # 主脚本 (纯 curl 实现)
├── references/
│   └── api-docs.md          # API 文档参考
└── CONFIG.template.md       # 配置文件模板

Configuration

Get API Key

  1. Visit Keepa API
  2. Register or login
  3. Go to Account → API Key
  4. Copy your API key

Rate Limits

Plan Tokens/Day Cost per Request
Free 100 1-2 tokens
Basic (9€/mo) 100,000 1-2 tokens
Pro (19€/mo) 500,000 1-2 tokens
Ultra (49€/mo) 2,000,000 1-2 tokens

Token Costs

Request Type Token Cost
Product (single ASIN) 1-2 tokens
Product (batch 10 ASINs) 10-20 tokens
Search 1 token
Best Sellers 1 token
Offers 1-3 tokens

Output Examples

Product Query Result

═══ Keepa Product Report ═══

ASIN: B08XYZ123
Title: Wireless Bluetooth Earbuds
Brand: SoundTech
Category: Electronics > Headphones

Current Price:
- Amazon: $29.99
- 3rd Party New: $27.99
- 3rd Party Used: $22.99
- Lowest in 30 days: $24.99

Sales Rank: #1,234 in Electronics (#45 in Earbud Headphones)
Rating: 4.5/5 (2,847 reviews)

Price History (90 days):
┌──────────────┬────────────┐
│ Date         │ Price      │
├──────────────┼────────────┤
│ 2024-01-15   │ $24.99 (Low)│
│ 2024-02-01   │ $34.99 (High)│
│ Current      │ $29.99     │
└──────────────┴────────────┘

Recommendation: Price is near average. Wait for deal if not urgent.

Search Result

═══ Search Results: "wireless earbuds" ═══

Page 1 of 5 (48 results)

#1  B08XYZ123  Wireless Earbuds Pro    $29.99  ★★★★☆ (2,847)
#2  B09ABC456  Bluetooth Earbuds Sport $24.99  ★★★★☆ (1,523)
#3  B07DEF789  True Wireless Earbuds   $39.99  ★★★★★ (987)
...

Best Practices

数据准确性

  • 价格数据每 15 分钟更新
  • 销售排名每小时更新
  • 历史数据最多保留 2 年

API 优化

  • 批量查询 ASIN 节省 tokens
  • 仅请求需要的字段
  • 缓存常用查询结果

价格追踪

  • 设置价格提醒
  • 关注历史低价
  • 比较多个卖家

Troubleshooting

Issue Solution
Invalid API Key Verify key in Keepa dashboard
Token limit exceeded Wait for daily reset or upgrade plan
Product not found Check ASIN and marketplace
Rate limit Slow down requests

References

Notes

  • 需要有效的 Keepa API key
  • 免费账户每日 100 tokens
  • 数据更新频率:15 分钟
  • 支持 8 个亚马逊站点
Usage Guidance
This skill is a simple wrapper around the official Keepa API and the code and docs are consistent with that function, but the published metadata omitted that it needs your Keepa API key and reads/suggests saving a config file at .teamclaw-skills/keepa-api/CONFIG.md or ~/.teamclaw-skills/keepa-api/CONFIG.md. Before installing: (1) review the included scripts/keepa.sh to confirm it only calls api.keepa.com and does not send your key elsewhere (it does not in the provided code); (2) prefer exporting KEEPA_API_KEY in your session instead of writing the key to a shared project file if you are concerned about persistence; (3) verify the skill source/author (no homepage and unknown owner); and (4) be aware Keepa requests consume tokens/costs on your Keepa account. If you are uncomfortable storing an API key for an unknown/unsigned skill, do not install or run it until you host/inspect it locally or obtain it from a trusted source.
Capability Analysis
Type: OpenClaw Skill Name: keepa-api Version: 1.0.0 The skill bundle is designed for a legitimate purpose (Keepa API client). However, the `scripts/keepa.sh` script contains a URL parameter injection vulnerability in the `cmd_search` function. The `query` parameter, which is user-controlled, is only partially URL-encoded (spaces replaced with '+') before being embedded into the `curl` request. This allows other URL special characters (e.g., '&', '=') to be injected, potentially manipulating the API request to `api.keepa.com` by overriding or adding parameters. While this is a vulnerability and not clear evidence of intentional malice (e.g., exfiltration to an attacker-controlled server), it represents a significant security flaw in input sanitization.
Capability Assessment
Purpose & Capability
Name/description match the included code: this is a Keepa API client that queries api.keepa.com. However the registry metadata declares no required environment variables or credentials, while the shipped script and SKILL.md clearly expect a Keepa API key (KEEPA_API_KEY) and configuration files under .teamclaw-skills/keepa-api/CONFIG.md or ~/.teamclaw-skills/keepa-api/CONFIG.md. That mismatch is inconsistent and worth scrutiny.
Instruction Scope
The SKILL.md and scripts stay within the stated purpose: they ask for API key, marketplace, days, then use curl to call api.keepa.com and jq to parse results. The instructions reference only Keepa endpoints and local config paths; there are no hidden remote endpoints or broad system file collection steps.
Install Mechanism
No install spec is provided (instruction-only with a bundled shell script). This is low-risk from an install perspective, but the shipped script will be executed by the agent/runtime if invoked — review the script before running.
Credentials
The skill requires a Keepa API key and supports env vars (KEEPA_API_KEY, KEEPA_DOMAIN, KEEPA_OUTPUT_FORMAT, KEEPA_DEFAULT_DAYS) and reads user/project config files, but the skill metadata did not declare any required env vars or a primary credential. Requiring an API key is reasonable for the purpose, but the omission in metadata is an inconsistency that could cause users to unintentionally expose credentials.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It reads configuration from project/user paths under .teamclaw-skills which is scoped to the user/project and is a normal place to persist credentials/configuration for a skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install keepa-api
  3. After installation, invoke the skill by name or use /keepa-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of keepa-api: an Amazon price history tracking tool using the Keepa API. - Provides ASIN-based product queries, price history, sales rank, search, and best seller listings. - Supports multiple Amazon marketplaces and customizable query parameters (domain, days, category, output format, etc). - Requires curl and jq as dependencies. - Guides users through API key/setup and configuration on first use. - Clear workflow steps for API config, query confirmation, execution, and result display.
Metadata
Slug keepa-api
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Keepa Api?

Keepa API 客户端 - 亚马逊产品价格历史追踪工具。提供 ASIN 查询、价格历史等数据查询功能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 422 downloads so far.

How do I install Keepa Api?

Run "/install keepa-api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Keepa Api free?

Yes, Keepa Api is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Keepa Api support?

Keepa Api is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Keepa Api?

It is built and maintained by Yang Jun (@boyd4y); the current version is v1.0.0.

💬 Comments