Install
openclaw skills install keepa-apiKeepa API 客户端 - 亚马逊产品价格历史追踪工具。提供 ASIN 查询、价格历史等数据查询功能。
openclaw skills install keepa-api基于 Keepa API 的亚马逊产品价格历史追踪工具。
安装依赖:
# macOS
brew install curl jq
# Ubuntu/Debian
apt-get install curl jq
# 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]
| Option | Description |
|---|---|
--domain <US|UK|DE|...> | 亚马逊站点 (默认:US) |
--days <number> | 历史数据天数:30, 90, 180 (默认:90) |
--category <name> | 商品类目 (Electronics, Home, Beauty 等) |
--output <table|json> | 输出格式 (默认:table) |
--page <number> | 分页页码 (用于搜索和 Best Sellers) |
查询单个 ASIN 的详细信息,包括价格历史、销售排名、评论等。
/keepa-api asin <ASIN> [--marketplace US] [--days 90]
返回数据:
获取产品历史价格数据,支持自定义时间范围。
/keepa-api price-history <ASIN> [--days 30|90|180|365]
返回数据:
追踪产品销售排名变化趋势,与 asin 命令一起返回。
/keepa-api asin <ASIN> --days 90
返回数据:
通过关键词搜索亚马逊产品。
/keepa-api search "<keyword>" [--category <category>] [--page <n>]
返回数据:
获取类目热销榜产品。
/keepa-api bestsellers --category <category> [--page <n>]
返回数据:
| Dimension | Controls | Options |
|---|---|---|
| Data Type | 数据类型 | product, price, rank, offers, search |
| Marketplace | 亚马逊站点 | US, EU, UK, JP, CA, AU, IN |
| Output Format | 数据输出格式 | table, json |
| 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 |
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
Input → [Step 0: Config Check] ─┬─ Configured → Continue
│
└─ Not configured → Setup required ⛔ BLOCKING
│
└─ Complete setup → Save config → Continue
Purpose: Check Keepa API configuration.
Configuration paths:
.teamclaw-skills/keepa-api/CONFIG.md~/.teamclaw-skills/keepa-api/CONFIG.mdCheck 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:
Keepa API Key (required):
Default marketplace:
Default history days:
Output format:
Configuration file format (CONFIG.md):
---
api_key: your-keepa-api-key-here
marketplace: US
default_days: 90
output_format: table
---
Analyze user request:
Display confirmation:
Execute curl request:
curl -s "https://api.keepa.com/product?key=$API_KEY&domain=$DOMAIN&asin=$ASIN"
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
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)
GET /search
Parameters:
- key: API key
- domain: Amazon domain
- query: Search query
- category: Category ID (optional)
- page: Page number (optional)
GET /bestsellers
Parameters:
- key: API key
- domain: Amazon domain
- categoryId: Category ID
- page: Page number (optional)
| 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 |
skills/keepa-api/
├── SKILL.md # Skill 定义
├── scripts/
│ └── keepa.sh # 主脚本 (纯 curl 实现)
├── references/
│ └── api-docs.md # API 文档参考
└── CONFIG.template.md # 配置文件模板
| 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 |
| 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 |
═══ 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 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)
...
| 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 |