clawhub install keepa-api📖 About This Skill
name: keepa-api description: Keepa API 客户端 - 亚马逊产品价格历史追踪工具。提供 ASIN 查询、价格历史等数据查询功能。 metadata: version: 1.0.0 dependencies: - curl - jq
Keepa API 客户端
基于 Keepa API 的亚马逊产品价格历史追踪工具。
依赖
安装依赖:
# macOS
brew install curl jqUbuntu/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 |
|--------|-------------|
| 查询单个 ASIN 的详细信息,包括价格历史、销售排名、评论等。 返回数据:
获取产品历史价格数据,支持自定义时间范围。 返回数据:
追踪产品销售排名变化趋势,与 asin 命令一起返回。 返回数据:
通过关键词搜索亚马逊产品。 返回数据:
获取类目热销榜产品。 返回数据:
| 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 | Purpose: Check Keepa API configuration. Configuration paths:
1. Project-level: Check command:
First-Time Setup (if config not found): Use 1. Keepa API Key (required):
- Input your Keepa API key
- Get key from: https://keepa.com/#!api 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 ( Analyze user request:
Display confirmation:
Execute curl request:
Output format:
ASIN: B08XYZ123
Title: [Product Title]
Brand: [Brand Name]
Category: [Category] Current Price:
Sales Rank: #1,234 in Electronics
Rating: 4.5/5 (2,847 reviews) Price History (90 days):
| 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 | 1. Visit Keepa API
2. Register or login
3. Go to Account → API Key
4. Copy your API key | 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 | ASIN: B08XYZ123
Title: Wireless Bluetooth Earbuds
Brand: SoundTech
Category: Electronics > Headphones Current Price:
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.
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 | 1. Visit Keepa API
2. Register or login
3. Go to Account → API Key
4. Copy your API key | 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 |--domain | 亚马逊站点 (默认:US) |
| --days | 历史数据天数:30, 90, 180 (默认:90) |
| --category | 商品类目 (Electronics, Home, Beauty 等) |
| --output | 输出格式 (默认:table) |
|
--page | 分页页码 (用于搜索和 Best Sellers) |Core Tools
1. Product Query (产品查询)
/keepa-api asin 2. Price History (价格历史)
/keepa-api price-history 3. Sales Rank History (销售排名历史)
/keepa-api asin 4. Product Search (产品搜索)
/keepa-api search "5. Best Sellers (热销榜)
/keepa-api bestsellers --category Three Dimensions
Marketplace Reference
Workflow
Progress Checklist
Keepa API Query Progress:
Flow
Input → [Step 0: Config Check] ─┬─ Configured → Continue
│
└─ Not configured → Setup required ⛔ BLOCKING
│
└─ Complete setup → Save config → Continue
Step 0: Configuration Check ⛔ BLOCKING
.teamclaw-skills/keepa-api/CONFIG.md
2. User-level: ~/.teamclaw-skills/keepa-api/CONFIG.md# 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"
AskUserQuestion with questions:CONFIG.md):
---
api_key: your-keepa-api-key-here
marketplace: US
default_days: 90
output_format: table
Step 1: Understand Data Requirement
Step 2: Confirm Query Parameters ⚠️
Step 3: Execute API Request
curl -s "https://api.keepa.com/product?key=$API_KEY&domain=$DOMAIN&asin=$ASIN"
Step 4: Parse and Display Results
═══ Keepa Product Report ═══API Endpoints
Product Endpoint
GET /product
Parameters:
Search Endpoint
GET /search
Parameters:
Best Sellers Endpoint
GET /bestsellers
Parameters:
Category IDs
File Structure
skills/keepa-api/
├── SKILL.md # Skill 定义
├── scripts/
│ └── keepa.sh # 主脚本 (纯 curl 实现)
├── references/
│ └── api-docs.md # API 文档参考
└── CONFIG.template.md # 配置文件模板
Configuration
Get API Key
Rate Limits
Token Costs
Output Examples
Product Query Result
═══ Keepa Product Report ═══Search Result
═══ Search Results: "wireless earbuds" ═══Best Practices
数据准确性
API 优化
价格追踪
Troubleshooting
References
Notes
💡 Examples
# 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]
⚙️ Configuration
Get API Key
Rate Limits
Token Costs
📋 Tips & Best Practices
数据准确性
API 优化
价格追踪