Pangolinfo Amazon Scraper
Scrape Amazon product data via Pangolin's APIs. Returns parsed JSON with product details, search results, rankings, reviews, and more across 13 Amazon regions.
When to Use This Skill
| Intent (EN) | Intent (CN) | Action |
|---|
| Look up an Amazon product / ASIN | 查一下亚马逊上的这个商品 | Product detail |
| Search Amazon for a keyword |
在亚马逊搜索关键词 | Keyword search |
| Show bestsellers in a category | 看看某个类目的畅销榜 | Bestsellers |
| Show new releases | 看看最新上架的商品 | New releases |
| Browse a category on Amazon | 浏览亚马逊某个分类 | Category products |
| Find products from a seller | 查看某个卖家的商品 | Seller products |
| Get reviews for a product | 看看这个产品的评论 | Reviews |
| Compare prices across regions | 对比不同国家亚马逊的价格 | Multi-region |
| Check seller/variant options | 查看其他卖家选项 / 变体 | Follow seller / Variant |
Do not use for Google search, SERP, or non-Amazon data -- those require a different skill.
Prerequisites
- - Python 3.8+ (stdlib only, no pip install needed)
- Pangolin account at pangolinfo.com
- Environment variables:
PANGOLIN_API_KEY (recommended) OR PANGOLIN_EMAIL + INLINECODE2
macOS SSL error? Run: INLINECODE3
Script Execution
CODEBLOCK0
Intent-to-Command Mapping
1. Product Detail by ASIN
CODEBLOCK1
INLINECODE4 auto-uppercases and selects amzProductDetail.
2. Keyword Search
CODEBLOCK2
Non-ASIN text auto-selects amzKeyword.
3. Bestsellers
CODEBLOCK3
4. New Releases
CODEBLOCK4
5. Category Products
CODEBLOCK5
6. Seller Products
CODEBLOCK6
7. Follow Seller (Other Seller Options)
CODEBLOCK7
8. Variant ASIN (Product Variants)
CODEBLOCK8
9. Product Reviews
CODEBLOCK9
Star filter mapping:
| User says | INLINECODE7 |
|---|
| all reviews / 所有评论 | INLINECODE8 |
| 5-star / 五星 |
five_star |
| 4-star / 四星 |
four_star |
| 3-star / 三星 |
three_star |
| 2-star / 两星 |
two_star |
| 1-star / 一星 |
one_star |
| positive / 好评 |
positive |
| critical / 差评 |
critical |
Sort: --sort-by recent (default) or INLINECODE17
Multiple pages: --pages N (each page costs 5 credits)
10. Product by URL (Legacy)
CODEBLOCK10
Site code auto-inferred from URL domain.
Smart Defaults
- 1. ASIN detection -- 10-char codes starting with
B0 auto-select INLINECODE20 - Keyword detection -- non-ASIN text auto-selects INLINECODE21
- Defaults to
amz_us if no --site provided - Auto-switches to review mode if
--filter-star is set or INLINECODE25 - Site inferred from URL when using INLINECODE26
- Parser auto-inference only runs when
--parser is not specified -- explicit --parser is never overridden
All CLI Options
| Flag | Description | Default |
|---|
| INLINECODE29 | Search query or keyword | -- |
| INLINECODE30 |
Target Amazon URL (legacy) | -- |
|
--content | Content ID: ASIN, keyword, category Node ID, seller ID | -- |
|
--asin | ASIN shortcut (auto-uppercases) | -- |
|
--site /
--region | Amazon site/region code |
amz_us |
|
--mode |
amazon or
review |
amazon |
|
--parser | Parser name (auto-inferred if omitted) | auto |
|
--zipcode | US zipcode for localized pricing |
10041 |
|
--format |
json,
rawHtml,
markdown |
json |
|
--filter-star | Star filter for reviews |
all_stars |
|
--sort-by | Review sort:
recent or
helpful |
recent |
|
--pages | Review pages (5 credits/page) |
1 |
|
--auth-only | Auth check only (no credits) | -- |
|
--raw | Output raw API response | -- |
|
--timeout | Timeout in seconds |
120 |
|
--cache-key | Persist API key to
~/.pangolin_api_key | off |
Amazon Parsers
| Parser | Use Case | Content Value | Endpoint |
|---|
| INLINECODE62 | Single product page | ASIN | INLINECODE63 |
| INLINECODE64 |
Keyword search results | Keyword |
/api/v1/scrape |
|
amzProductOfCategory | Category listing | Node ID |
/api/v1/scrape |
|
amzProductOfSeller | Seller's products | Seller ID |
/api/v1/scrape |
|
amzBestSellers | Best sellers ranking | Category keyword |
/api/v1/scrape |
|
amzNewReleases | New releases ranking | Category keyword |
/api/v1/scrape |
|
amzFollowSeller | Other sellers | ASIN |
/api/v1/scrape/follow-seller |
|
amzVariantAsin | Product variants | ASIN |
/api/v1/scrape/variant-asin |
|
amzReviewV2 | Product reviews | ASIN (via
--mode review) |
/api/v1/scrape |
Amazon Sites
| Code | Region | Domain |
|---|
| INLINECODE81 | United States | amazon.com |
| INLINECODE82 |
United Kingdom | amazon.co.uk |
|
amz_ca | Canada | amazon.ca |
|
amz_de | Germany | amazon.de |
|
amz_fr | France | amazon.fr |
|
amz_jp | Japan | amazon.co.jp |
|
amz_it | Italy | amazon.it |
|
amz_es | Spain | amazon.es |
|
amz_au | Australia | amazon.com.au |
|
amz_mx | Mexico | amazon.com.mx |
|
amz_sa | Saudi Arabia | amazon.sa |
|
amz_ae | UAE | amazon.ae |
|
amz_br | Brazil | amazon.com.br |
Cost
| Operation | Credits |
|---|
Amazon scrape (json) | 1 |
Amazon scrape (rawHtml / markdown) |
0.75 |
| Follow Seller | 1 |
| Variant ASIN | 1 |
| Review page | 5 per page |
Credits consumed on success only (API code 0). Auth checks are free.
Output Format
JSON to stdout on success, error JSON to stderr on failure.
Success
CODEBLOCK11
Error (stderr)
CODEBLOCK12
Response Presentation
Match the user's language. Never dump raw JSON.
- - Product Detail: structured card with title, price, rating, features, rank
- Keyword Search: numbered list with title, price, rating
- Bestsellers/New Releases: ranked list emphasizing position
- Follow Seller / Variant: option comparison table
- Reviews: summary + top 3-5 reviews + pattern analysis
- Empty results: suggest checking ASIN spelling, trying another region, broadening search
Exit Codes
API error |
| 2 | Usage error (bad arguments) |
| 3 | Network error |
| 4 | Authentication error |
Error Reference
Script Error Codes
| Code | Meaning | Resolution |
|---|
| INLINECODE97 | No credentials | Set env vars |
| INLINECODE98 |
Wrong credentials | Verify email/password |
|
RATE_LIMIT | Too many requests | Wait and retry |
|
NETWORK | Connection issue | Check internet |
|
SSL_CERT | Certificate error | See macOS SSL fix |
|
API_ERROR | Pangolin API error | Check
api_code and
hint |
|
PARSE_ERROR | Invalid API response | Retry |
|
USAGE_ERROR | Bad arguments | Fix CLI args |
Pangolin API Error Codes
| Code | Meaning | Resolution |
|---|
| 1004 | Invalid token | Auto-retried by script |
| 1009 |
Invalid parser name | Check
--parser value |
| 2001 | Insufficient credits | Top up at
pangolinfo.com |
| 2005 | No active plan | Subscribe at
pangolinfo.com |
| 2007 | Account expired | Renew at
pangolinfo.com |
| 2009 | Usage limit reached | Wait for next billing cycle |
| 4029 | Rate limited | Reduce request frequency |
| 10000/10001 | Task failed | Retry |
First-Time Setup
See references/setup-guide.md for interactive setup instructions.
Quick start:
CODEBLOCK13
Important Notes for AI Agents
- 1. Never dump raw JSON. Parse and present per the Response Presentation guidelines.
- Match the user's language.
- Be proactive. Highlight best matches, summarize review patterns, flag out-of-stock.
- Handle multi-step requests. E.g., "compare US vs JP price" = two queries + comparison table.
- Credit awareness. Warn before multi-page reviews (5 credits/page).
- ASIN detection. 10-char codes starting with B0 are almost always ASINs -- auto-detect.
- Default to
amz_us unless context implies another region. - Security. Never expose API keys or passwords.
- Use
--parser explicitly for category, seller, bestsellers, new releases, follow-seller, variant-asin. Auto-inference only works for ASIN vs keyword. - Combine results. "Find a good mouse under $30 with good reviews" = keyword search + review fetch for top candidates.
Output Schema
See references/output-schema.md for per-parser field documentation.
Pangolinfo Amazon Scraper
通过Pangolin的API抓取亚马逊产品数据。返回包含产品详情、搜索结果、排名、评论等信息的解析后JSON数据,覆盖13个亚马逊区域。
何时使用此技能
| 意图(英文) | 意图(中文) | 操作 |
|---|
| Look up an Amazon product / ASIN | 查一下亚马逊上的这个商品 | 产品详情 |
| Search Amazon for a keyword |
在亚马逊搜索关键词 | 关键词搜索 |
| Show bestsellers in a category | 看看某个类目的畅销榜 | 畅销榜 |
| Show new releases | 看看最新上架的商品 | 新品发布 |
| Browse a category on Amazon | 浏览亚马逊某个分类 | 分类产品 |
| Find products from a seller | 查看某个卖家的商品 | 卖家产品 |
| Get reviews for a product | 看看这个产品的评论 | 评论 |
| Compare prices across regions | 对比不同国家亚马逊的价格 | 多区域 |
| Check seller/variant options | 查看其他卖家选项 / 变体 | 关注卖家 / 变体 |
不要用于谷歌搜索、SERP或非亚马逊数据——这些需要不同的技能。
前提条件
- - Python 3.8+(仅标准库,无需pip安装)
- Pangolin账户,访问 pangolinfo.com
- 环境变量:PANGOLINAPIKEY(推荐)或 PANGOLINEMAIL + PANGOLINPASSWORD
macOS SSL错误?运行:/Applications/Python\ 3.x/Install\ Certificates.command
脚本执行
bash
python3 scripts/pangolin.py --content B0DYTF8L2W --mode amazon --site amz_us
意图到命令的映射
1. 按ASIN查询产品详情
bash
python3 scripts/pangolin.py --asin B0DYTF8L2W --site amz_us
--asin 自动转换为大写并选择 amzProductDetail。
2. 关键词搜索
bash
python3 scripts/pangolin.py --q 无线鼠标 --site amz_us
非ASIN文本自动选择 amzKeyword。
3. 畅销榜
bash
python3 scripts/pangolin.py --content 电子产品 --parser amzBestSellers --site amz_us
4. 新品发布
bash
python3 scripts/pangolin.py --content 玩具 --parser amzNewReleases --site amz_us
5. 分类产品
bash
python3 scripts/pangolin.py --content 172282 --parser amzProductOfCategory --site amz_us
6. 卖家产品
bash
python3 scripts/pangolin.py --content A1B2C3D4E5 --parser amzProductOfSeller --site amz_us
7. 关注卖家(其他卖家选项)
bash
python3 scripts/pangolin.py --asin B0G4QPYK4Z --parser amzFollowSeller --site amz_us
8. 变体ASIN(产品变体)
bash
python3 scripts/pangolin.py --asin B0G4QPYK4Z --parser amzVariantAsin --site amz_us
9. 产品评论
bash
python3 scripts/pangolin.py --content B00163U4LK --mode review --site amz_us --filter-star critical
星级筛选映射:
| 用户表述 | --filter-star |
|---|
| all reviews / 所有评论 | allstars |
| 5-star / 五星 |
fivestar |
| 4-star / 四星 | four_star |
| 3-star / 三星 | three_star |
| 2-star / 两星 | two_star |
| 1-star / 一星 | one_star |
| positive / 好评 | positive |
| critical / 差评 | critical |
排序: --sort-by recent(默认)或 --sort-by helpful
多页: --pages N(每页消耗5积分)
10. 按URL查询产品(旧版)
bash
python3 scripts/pangolin.py --url https://www.amazon.com/dp/B0DYTF8L2W --mode amazon
站点代码从URL域名自动推断。
智能默认值
- 1. ASIN检测——以B0开头的10位字符自动选择amzProductDetail
- 关键词检测——非ASIN文本自动选择amzKeyword
- 默认使用amz_us——如果未提供--site
- 自动切换到评论模式——如果设置了--filter-star或--parser amzReviewV2
- 从URL推断站点——使用--url时
- 仅当未指定--parser时自动推断解析器——明确的--parser不会被覆盖
所有CLI选项
| 标志 | 描述 | 默认值 |
|---|
| --q | 搜索查询或关键词 | -- |
| --url |
目标亚马逊URL(旧版) | -- |
| --content | 内容ID:ASIN、关键词、分类节点ID、卖家ID | -- |
| --asin | ASIN快捷方式(自动转换为大写) | -- |
| --site / --region | 亚马逊站点/区域代码 | amz_us |
| --mode | amazon 或 review | amazon |
| --parser | 解析器名称(省略时自动推断) | auto |
| --zipcode | 用于本地化定价的美国邮政编码 | 10041 |
| --format | json、rawHtml、markdown | json |
| --filter-star | 评论的星级筛选 | all_stars |
| --sort-by | 评论排序:recent 或 helpful | recent |
| --pages | 评论页数(5积分/页) | 1 |
| --auth-only | 仅认证检查(不消耗积分) | -- |
| --raw | 输出原始API响应 | -- |
| --timeout | 超时时间(秒) | 120 |
| --cache-key | 将API密钥持久化到~/.pangolin
apikey | off |
亚马逊解析器
| 解析器 | 使用场景 | 内容值 | 端点 |
|---|
| amzProductDetail | 单个产品页面 | ASIN | /api/v1/scrape |
| amzKeyword |
关键词搜索结果 | 关键词 | /api/v1/scrape |
| amzProductOfCategory | 分类列表 | 节点ID | /api/v1/scrape |
| amzProductOfSeller | 卖家的产品 | 卖家ID | /api/v1/scrape |
| amzBestSellers | 畅销榜排名 | 分类关键词 | /api/v1/scrape |
| amzNewReleases | 新品发布排名 | 分类关键词 | /api/v1/scrape |
| amzFollowSeller | 其他卖家 | ASIN | /api/v1/scrape/follow-seller |
| amzVariantAsin | 产品变体 | ASIN | /api/v1/scrape/variant-asin |
| amzReviewV2 | 产品评论 | ASIN(通过--mode review) | /api/v1/scrape |
亚马逊站点
| 代码 | 区域 | 域名 |
|---|
| amzus | 美国 | amazon.com |
| amzuk |
英国 | amazon.co.uk |
| amz_ca | 加拿大 | amazon.ca |
| amz_de | 德国 | amazon.de |
| amz_fr | 法国 | amazon.fr |
| amz_jp | 日本 | amazon.co.jp |
| amz_it | 意大利 | amazon.it |
| amz_es | 西班牙 | amazon.es |
| amz_au | 澳大利亚 | amazon.com.au |
| amz_mx | 墨西哥 | amazon.com.mx |
| amz_sa | 沙特阿拉伯 | amazon.sa |
| amz_ae | 阿联酋 | amazon.ae |
| amz_br | 巴西 | amazon.com.br |
费用
| 操作 | 积分 |
|---|---|
| 亚马逊抓取(json