amazon-bestseller-listing
它能做什么
它介绍如何读取 Amazon 畅销榜页面上按排名排列的商品列表,涵盖不同类目和分页。适用于想获取某个类目当前排名的购物者和分析人员。
适用场景
- ✓当分析人员想获取 Amazon 某个类目中排名前 50 的商品及其排名时。
- ✓当卖家想查看商品在某个类目畅销榜上的位置时。
- ✓当有人需要畅销榜列表的下一页时。
技能链接
https://github.com/browser-act/skills/blob/main/solutions/ecommerce/amazon-bestseller-listing/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示 Amazon 畅销榜上厨房刀具的热门商品,包括价格和评分。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能在浏览器中打开畅销榜页面,读取排名商品卡片,包括排名、标题、链接、价格、星级和评论数。它还会读取类目和分页信息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Amazon — Best Sellers Listing
Input any Amazon Best Sellers (/zgbs/ or /gp/bestsellers/) URL → output ranked product list (position 1..N) + category info + pagination.
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Extract the ranked product list from any Amazon Best Sellers page for any category or sub-category, across all Amazon regional TLDs, with pagination to walk beyond the first 50 items.
Prerequisites
- Target page is already open in the browser: any Amazon Best Sellers URL (e.g.
https://www.amazon.com/gp/bestsellers/{category-slug},https://www.amazon.com/Best-Sellers/zgbs/{category-slug},https://www.amazon.com/Best-Sellers/zgbs/{category-slug}/{node-id}, or the paginated variant?pg={pageNumber}) - No login required
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session → skip this step.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
Capability Components
This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the user on the page, never bypassing authentication or access controls. Its role is equivalent to copy-pasting on the user's behalf — the data is already on screen, automation merely saves time. JS code is encapsulated in Python files under the
scripts/directory, invoked viabrowser-act --session {name} eval "$(python scripts/xxx.py {params})". The$(...)is bash command substitution — it runs the python script, captures its printed JS text, and hands that JS string as a single argument tobrowser-act eval. Do not runeval "$(python ...)"as a bare shell command; that would ask bash to execute the JS as shell, which fails.
DOM: extract bestseller cards from current best-sellers page
Bestseller pages are server-rendered — no XHR/fetch API for chart data. Cards use the stable #gridItemRoot container (30 cards per page, 2 pages up to top 50).
navigate {any Amazon bestseller URL, e.g. https://www.amazon.com/gp/bestsellers/{category}, https://www.amazon.com/Best-Sellers/zgbs/{category}?pg=2}wait stable- Extract:
browser-act --session {name} eval "$(python scripts/extract-bestseller.py)"
On error path, the script returns:
{"error": true, "message": "no bestseller cards found - is this a /bestsellers/, /gp/bestsellers/ or /zgbs/ page?"}when#gridItemRootselectors match zero cards (possibly wrong URL, or Amazon returned an interstitial)
Output example:
{
"categoryName": "Electronics", // parsed from document.title
"categoryFullName": "Best Electronics", // full title
"categoryUrl": "https://www.amazon.com/gp/bestsellers/electronics", // origin + pathname
"currentPage": 1, // page from .a-pagination .a-selected, defaults 1
"hasNextPage": true, // true when 'Next page' pagination link exists
"nextPageUrl": "https://www.amazon.com/Best-Sellers/zgbs/electronics/?pg=2", // absolute URL, null when last page
"itemCount": 30, // typically 30 per page
"items": [
{
"rank": 1, // extracted from .zg-bdg-text (e.g. "#1"), falls back to grid index
"asin": "B08JHCVHTY", // 10-char ASIN from data-asin
"title": "blink plus plan with monthly auto-renewal", // truncated title from p13n-sc-css-line-clamp
"url": "https://www.amazon.com/Blink-Plus-Plan-monthly-auto-renewal/dp/B08JHCVHTY/...", // absolute product URL
"image": "https://images-na.ssl-images-amazon.com/images/I/31...png", // thumbnail
"imageAlt": "blink plus plan with monthly auto-renewal", // img alt
"price": {"value": 11.99, "currencyRaw": "$", "raw": "$11.99"}, // null when not shown
"stars": 4.4, // 0-5 rating, null when no reviews
"reviewCount": 277638, // total ratings, null when absent
"ratingRaw": "4.4 out of 5 stars" // full a11y text
}
]
}
Pagination
URL Pagination: Amazon bestseller pages use ?pg={N} (starting at 1, typically pages 1-2 with 30 cards each = top 50). To iterate:
- Read
nextPageUrlf
常见问题
它适用于 Amazon 各国站点吗?
适用。该技能说明它可用于 Amazon 的各地区站点。
它能超过第一页吗?
能。它会读取分页状态,并可以移动到列表的下一页。
它需要登录吗?
不需要。该技能说明,畅销榜页面无需登录。
详情
作者的原始描述
Amazon Best Sellers listing scraper: extract product cards from any Amazon Best Sellers (zgbs) or /gp/bestsellers/ category page — returns rank (position on chart), asin, title, url, image, imageAlt, price, stars, reviewCount, ratingRaw per item, plus category metadata (categoryName, categoryFullName, categoryUrl) and pagination state (currentPage, hasNextPage, nextPageUrl). Works across all Amazon regional TLDs (amazon.com, amazon.co.uk, amazon.de, amazon.co.jp, amazon.fr, amazon.it, amazon.es, amazon.ca, amazon.com.au, amazon.in, etc.). Use when user mentions Amazon Best Sellers, Amazon best
repo: browser-act/skills
热度
- GitHub 星标
- 6.3k
- 排名
- #14252
- 许可证
- MIT
- 更新时间
- 2026/8/24
评论
- …
同一仓库的更多技能
browser-act-skill-forge
6.3k帮你的智能体探索一次网站,并保存一个带脚本的可复用技能,使之后从该网站提取数据更快。
browser-act
6.3k帮你的智能体运行浏览器自动化工具,打开页面、读取渲染后的内容、填写表单、截图,并管理已登录的会话。
1688-product-detail
6.3k帮你的智能体从 1688.com 批发页面提取商品详情,例如价格阶梯、规格变体、卖家统计数据和属性。
airbnb-listing-detail
6.3k帮你的智能体根据 ID 获取 Airbnb 房源的公开详情,例如照片、设施、评分和房屋规则。