GET/api/v1/history?google_product_id=6883422599141817139&marketplace=us
Authorization: Bearer pb_••••••••
200 OKapplication/json
{"google_product_id": "6883422599141817139","marketplace": "us","currency": "USD","lowest_price": 74.5,"highest_price": 99.99,"average_price": 86.12,"history": [{ "price": 79.99, … }, …]}
PriceBell 在应用里能做的事,脚本也能做:在某个国家搜索 Google Shopping、追踪一个结果、设置目标价并读取历史。三次调用就能上手。
1. 在某个国家搜索
在德国的 Google Shopping 搜索 AirPods Pro 2
curl "https://www.pricebell.dev/api/v1/search?query=airpods+pro+2&marketplace=de" \
-H "Authorization: Bearer $PRICEBELL_API_KEY" \
| jq '.results[] | {google_product_id, title, price, currency}'搜索免费,但有每小时上限。每个结果都带有 google_product_id,也就是你用来追踪它的编码。
2. 追踪一个结果
追踪,并设置目标价
curl -X POST "https://www.pricebell.dev/api/v1/products" \
-H "Authorization: Bearer $PRICEBELL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product": "6883422599141817139", "marketplace": "de", "target_price": 180, "wait": true}'第一次查价会立即进行(1 个积分);之后商品按自己的频率查价,默认每天一次,提醒和在应用中设置的一样发送。
我的耳机过去 3 个月的最低价是多少?
AI 助手pricebell · get_google_product_history
10月24日 的 US$74.50 是 3 个月内的最低价。今天是 US$79.99。
3. 读取历史
GET /api/v1/products/{id} 返回商品以及该时段内读取到的每个价格,按时间从早到晚排列。同一份清单也显示在应用中:脚本和人可以共用。
完整参考见 API 文档。也可以看看 Google Shopping 价格 API 页面。