price-comparison
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrice Comparison
价格对比
Find the best place to actually buy a product — lowest price, in stock, from a
reputable seller — using live retailer data, not stale training knowledge.
Combines the Bright Data CLI () for collection with a normalization +
ranking layer to deliver a single cited comparison table and a clear buy
recommendation.
bdataNever quote prices from training knowledge. Prices and stock change hourly.
Always pull live data first, then compare. If a source fails, say so — never
fill a price gap with a guess.
借助实时零售商数据(而非过时的训练知识),找到购买产品的最佳渠道——价格最低、有库存且来自信誉良好的卖家。结合Bright Data CLI()进行数据收集,通过标准化与排序模块生成一份带引用的对比表格及明确的购买推荐。
bdata切勿引用训练知识中的价格。价格和库存每小时都在变化。务必先获取实时数据再进行对比。若某一数据源获取失败,请如实说明——切勿猜测填补价格空缺。
Prerequisites
前提条件
- Bright Data CLI installed:
bash
curl -fsSL https://cli.brightdata.com/install.sh | bash - One-time login completed:
bash
bdata login # or: bdata login --device (SSH / headless)
Verify before collecting:
bash
if ! command -v bdata >/dev/null 2>&1; then
echo "bdata CLI not installed — see skills/bright-data-best-practices/references/cli-setup.md"
elif ! bdata zones >/dev/null 2>&1; then
echo "bdata not authenticated — run: bdata login"
fiHalt and route to setup if either check fails.
- 已安装Bright Data CLI:
bash
curl -fsSL https://cli.brightdata.com/install.sh | bash - 已完成一次性登录:
bash
bdata login # 或:bdata login --device (SSH / 无头模式)
收集数据前请验证:
bash
if ! command -v bdata >/dev/null 2>&1; then
echo "bdata CLI未安装——请查看skills/bright-data-best-practices/references/cli-setup.md"
elif ! bdata zones >/dev/null 2>&1; then
echo "bdata未验证身份——请运行:bdata login"
fi若任一检查失败,请暂停操作并引导至设置流程。
Core Workflow
核心工作流
- Clarify scope — What product (name, ASIN, or URL)? Which retailers (default: Amazon + Google Shopping)? Which country/region (default: US — it changes price, currency, availability, and which retailers apply)? What matters beyond price (reviews, shipping/Prime, new vs refurbished)?
- Resolve, then collect — If you only have a product name, use
and
amazon_product_searchto resolve it to concrete product URLs/offers, then pull each retailer's structured data. Parallelize independent calls.bdata search --type shopping - Normalize — Collapse every result into the single offer schema in references/output-and-pricing.md before comparing. Convert all prices to one currency and note the rate + date used.
- Rank & flag — Sort by total landed cost (price + shipping). Flag out-of-stock, refurbished/used, and third-party-seller offers — a lower price that's unavailable or used is not the winner by default.
- Deliver — Produce the comparison table (Output A), then the explicit "Best buy" recommendation. Every report names the cheapest in-stock option and any meaningful trade-offs.
- 明确范围——要查询的产品是什么(名称、ASIN或URL)?需要对比哪些零售商(默认:Amazon + Google Shopping)?所在国家/地区(默认:美国——会影响价格、货币、库存及适用的零售商)?除价格外还有哪些考量因素(评分、配送/Prime服务、全新 vs 翻新)?
- 解析并收集数据——若仅知晓产品名称,使用和
amazon_product_search将其解析为具体的产品URL/报价,然后获取每个零售商的结构化数据。并行执行独立调用。bdata search --type shopping - 标准化处理——在对比前,将所有结果整理为references/output-and-pricing.md中定义的统一报价 schema。将所有价格转换为同一种货币,并标注所使用的汇率及日期。
- 排序与标记——按总落地成本(价格+运费)排序。标记缺货、翻新/二手及第三方卖家的报价——默认情况下,价格更低但缺货或为二手的选项并非最佳选择。
- 交付结果——生成对比表格(输出A),随后给出明确的“最佳购买渠道”推荐。每份报告需指出最便宜的有库存选项及任何有意义的取舍。
Data Collection Rules
数据收集规则
- Resolve names to URLs first. You rarely have clean URLs up front. Use
and
amazon_product_search "<query>" "https://www.amazon.com"to find the exact items, then feed those URLs to product pipelines.bdata search "<product>" --type shopping --json - Prefer pipelines over scraping for supported retailers. Amazon, Walmart,
eBay, Best Buy, Google Shopping all have structured pipelines that return
clean price/availability/rating JSON. Never — Amazon blocks scrapers; the pipeline bypasses that reliably.
bdata scrape amazon.com - Always pass when you need to parse or compare output.
--json - Be cost-efficient — a standard comparison is ~3–8 calls, not 50. Pull the offers the user asked about, not every seller on the page.
bdata - Parallelize independent calls across multiple Bash tool calls in one response — don't wait for Amazon before starting Walmart.
- Every price needs a source URL and a collection timestamp. No unattributed or undated prices, ever.
- Never fabricate a price or fill gaps. If a retailer returns nothing, report it in "Gaps & caveats".
- 先将名称解析为URL。通常无法直接获取清晰的URL。使用和
amazon_product_search "<query>" "https://www.amazon.com"找到确切商品,然后将这些URL传入产品处理流水线。bdata search "<product>" --type shopping --json - 对支持的零售商优先使用流水线而非抓取。Amazon、Walmart、eBay、Best Buy、Google Shopping均有结构化流水线,可返回干净的价格/库存/评分JSON数据。切勿使用——Amazon会阻止抓取工具,而流水线可可靠地绕过此限制。
bdata scrape amazon.com - 当需要解析或对比输出时,务必传递参数。
--json - 成本高效——一次标准对比约需3–8次调用,而非50次。仅获取用户要求的报价,而非页面上的所有卖家。
bdata - 并行执行——在一次响应中通过多个Bash工具调用并行执行独立任务——无需等待Amazon的结果再启动Walmart的调用。
- 每个价格都需附带来源URL和收集时间戳。绝不允许出现无来源或无日期的价格。
- 切勿编造价格或填补空缺。若某零售商未返回任何数据,请在“空缺与注意事项”中说明。
Retailer Modules
零售商模块
Pick the retailers that fit the product and region. US electronics → Amazon +
Best Buy + Walmart + Google Shopping; marketplace/used → eBay; non-US → confirm
the local Amazon domain and add region-relevant retailers.
根据产品和地区选择合适的零售商。美国电子产品→Amazon + Best Buy + Walmart + Google Shopping;二手/集市商品→eBay;非美国地区→确认当地Amazon域名并添加相关区域的零售商。
Amazon — by URL or ASIN
Amazon — 通过URL或ASIN
bash
bdata pipelines amazon_product "https://www.amazon.com/dp/<ASIN>" --json -o amazon.jsonReturns price, , title, availability, rating, review count, ASIN,
seller, images. Use the right domain for the region (, ,
, …).
final_priceamazon.comamazon.deamazon.co.ukbash
bdata pipelines amazon_product "https://www.amazon.com/dp/<ASIN>" --json -o amazon.json返回价格、、标题、库存状态、评分、评论数、ASIN、卖家、图片。请使用对应地区的域名(、、等)。
final_priceamazon.comamazon.deamazon.co.ukAmazon — discover by keyword (when you only have a name)
Amazon — 通过关键词查找(仅知晓产品名称时)
bash
bdata pipelines amazon_product_search "iPhone 17 Pro 256GB" "https://www.amazon.com" --json -o amzn_search.jsonResolve the right ASIN/URL from the results, then call on it.
amazon_productbash
bdata pipelines amazon_product_search "iPhone 17 Pro 256GB" "https://www.amazon.com" --json -o amzn_search.json从结果中解析出正确的ASIN/URL,然后对其调用。
amazon_productWalmart / eBay / Best Buy — by product URL
Walmart / eBay / Best Buy — 通过产品URL
bash
bdata pipelines walmart_product "https://www.walmart.com/ip/<ID>" --json -o walmart.json
bdata pipelines ebay_product "https://www.ebay.com/itm/<ID>" --json -o ebay.json
bdata pipelines bestbuy_products "https://www.bestbuy.com/site/<ID>.p" --json -o bestbuy.jsonbash
bdata pipelines walmart_product "https://www.walmart.com/ip/<ID>" --json -o walmart.json
bdata pipelines ebay_product "https://www.ebay.com/itm/<ID>" --json -o ebay.json
bdata pipelines bestbuy_products "https://www.bestbuy.com/site/<ID>.p" --json -o bestbuy.jsonGoogle Shopping — cross-retailer overview
Google Shopping — 跨零售商概览
bash
bdata pipelines google_shopping "<google-shopping-product-url>" --json -o gshopping.jsonBest for a fast multi-seller view once you have a Shopping product URL. To
find that URL (and a quick price spread) from a name, use SERP shopping:
bash
bdata search "iPhone 17 Pro 256GB" --type shopping --country us --jsonbash
bdata pipelines google_shopping "<google-shopping-product-url>" --json -o gshopping.json一旦获取到Shopping产品URL,此方式最适合快速查看多卖家信息。若要通过产品名称查找该URL(及快速价格区间),可使用SERP购物搜索:
bash
bdata search "iPhone 17 Pro 256GB" --type shopping --country us --jsonUnknown / local retailer — scrape the page
未知/本地零售商 — 抓取页面
bash
bdata scrape "https://retailer.example/product-page"Then extract price, currency, and stock from the markdown. Use this for local
retailers without a dedicated pipeline (e.g. regional electronics chains).
Pipeline names are inconsistent (singular,amazon_productplural,bestbuy_products). Confirm with the type list before hardcoding — thewalmart_productskill has the verified list, and keyword/multi-arg pipelines (data-feeds) takeamazon_product_search, not a single URL.<keyword> <domain_url>
bash
bdata scrape "https://retailer.example/product-page"然后从markdown中提取价格、货币和库存信息。此方式适用于无专用流水线的本地零售商(如区域性电子连锁店)。
流水线名称不统一(为单数,amazon_product为复数,bestbuy_products为单数)。硬编码前请确认类型列表——walmart_product技能包含已验证的列表,而关键词/多参数流水线(data-feeds)需传入amazon_product_search,而非单一URL。<keyword> <domain_url>
Region Handling
区域处理
- Country changes everything — price, currency, stock, and which retailers exist. Always confirm the region before running; default US only if the user doesn't say.
- Pass to
--country <code>for localized SERP/shopping results (e.g.bdata searchfor Israel,--country il,de).uk - Use the local Amazon domain in product URLs. Many regions (e.g. Israel)
buy via with international shipping and via local chains — cover both and label shipping/import implications.
amazon.com - Normalize currencies to one display currency, state the rate and the date you used, and keep each offer's original-currency price in the dataset.
- 国家/地区决定一切——价格、货币、库存及存在的零售商。开始前务必确认区域;若用户未说明,默认使用美国区域。
- 向传递
bdata search参数以获取本地化的SERP/购物结果(例如--country <code>对应以色列,--country il对应德国,de对应英国)。uk - 在产品URL中使用本地Amazon域名。许多地区(如以色列)的用户既通过购买并使用国际配送,也会通过本地连锁店购买——请覆盖这两种渠道,并标注配送/进口相关影响。
amazon.com - 标准化货币为一种展示货币,说明所使用的汇率及日期,并在数据集中保留每个报价的原始货币价格。
Output
输出
Read references/output-and-pricing.md for:
- The normalized offer record schema (row shape for both the table and the dataset output).
- Total-cost ranking rules (price + shipping + import/tax where known; in-stock and condition gates before declaring a winner).
- Currency normalization conventions.
- Output templates — A (comparison table + recommendation), B (structured dataset), C (both).
请阅读references/output-and-pricing.md获取以下信息:
- 标准化报价记录schema(表格和数据集输出的行格式)。
- 总成本排序规则(价格+运费+已知的进口/税费;在确定最佳选项前需先检查库存状态和商品条件)。
- 货币标准化规范。
- 输出模板——A(对比表格+推荐)、B(结构化数据集)、C(两者兼具)。
Output Quality Standards
输出质量标准
- Every price has a source URL and a timestamp — no undated, unattributed prices.
- Always show availability next to price — a cheaper out-of-stock offer is not the winner. Flag refurbished/used/third-party explicitly.
- Name one "Best buy" — the cheapest in-stock, comparable-condition option, with the runner-up and why someone might pick it instead.
- Be honest about gaps — list retailers that returned nothing or were gated this run. Note when a price looks stale or is a "from" range.
- State currency and region — "$ USD · region: US" or the rate used for conversions.
- Never estimate a missing price. Report the gap; don't fill it.
- 每个价格都需附带来源URL和时间戳——不允许出现无日期、无来源的价格。
- 价格旁务必显示库存状态——价格更低但缺货的选项并非最佳选择。明确标记翻新/二手/第三方卖家的商品。
- 指定一个“最佳购买渠道”——最便宜的有库存、条件相当的选项,同时列出次优选项及选择它的理由。
- 如实说明空缺——列出本次运行中未返回数据或受限的零售商。若某价格看起来过时或为“起售价”区间,请标注说明。
- 标注货币和区域——例如“$ USD · 区域:美国”或转换时使用的汇率。
- 切勿估算缺失的价格。报告空缺即可;不要填补。