price-comparison

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Price 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 (
bdata
) for collection with a normalization + ranking layer to deliver a single cited comparison table and a clear buy recommendation.
Never 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

前提条件

  1. Bright Data CLI installed:
    bash
    curl -fsSL https://cli.brightdata.com/install.sh | bash
  2. 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"
fi
Halt and route to setup if either check fails.
  1. 已安装Bright Data CLI:
    bash
    curl -fsSL https://cli.brightdata.com/install.sh | bash
  2. 已完成一次性登录:
    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

核心工作流

  1. Clarify scopeWhat 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)?
  2. Resolve, then collect — If you only have a product name, use
    amazon_product_search
    and
    bdata search --type shopping
    to resolve it to concrete product URLs/offers, then pull each retailer's structured data. Parallelize independent calls.
  3. 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.
  4. 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.
  5. 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.
  1. 明确范围——要查询的产品是什么(名称、ASIN或URL)?需要对比哪些零售商(默认:Amazon + Google Shopping)?所在国家/地区(默认:美国——会影响价格、货币、库存及适用的零售商)?除价格外还有哪些考量因素(评分、配送/Prime服务、全新 vs 翻新)?
  2. 解析并收集数据——若仅知晓产品名称,使用
    amazon_product_search
    bdata search --type shopping
    将其解析为具体的产品URL/报价,然后获取每个零售商的结构化数据。并行执行独立调用。
  3. 标准化处理——在对比前,将所有结果整理为references/output-and-pricing.md中定义的统一报价 schema。将所有价格转换为同一种货币,并标注所使用的汇率及日期。
  4. 排序与标记——按总落地成本(价格+运费)排序。标记缺货、翻新/二手及第三方卖家的报价——默认情况下,价格更低但缺货或为二手的选项并非最佳选择。
  5. 交付结果——生成对比表格(输出A),随后给出明确的“最佳购买渠道”推荐。每份报告需指出最便宜的有库存选项及任何有意义的取舍。

Data Collection Rules

数据收集规则

  • Resolve names to URLs first. You rarely have clean URLs up front. Use
    amazon_product_search "<query>" "https://www.amazon.com"
    and
    bdata search "<product>" --type shopping --json
    to find the exact items, then feed those URLs to product pipelines.
  • 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
    bdata scrape amazon.com
    — Amazon blocks scrapers; the pipeline bypasses that reliably.
  • Always pass
    --json
    when you need to parse or compare output.
  • Be cost-efficient — a standard comparison is ~3–8
    bdata
    calls, not 50. Pull the offers the user asked about, not every seller on the page.
  • 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"
    bdata search "<product>" --type shopping --json
    找到确切商品,然后将这些URL传入产品处理流水线。
  • 对支持的零售商优先使用流水线而非抓取。Amazon、Walmart、eBay、Best Buy、Google Shopping均有结构化流水线,可返回干净的价格/库存/评分JSON数据。切勿使用
    bdata scrape amazon.com
    ——Amazon会阻止抓取工具,而流水线可可靠地绕过此限制。
  • 当需要解析或对比输出时,务必传递
    --json
    参数
  • 成本高效——一次标准对比约需3–8次
    bdata
    调用,而非50次。仅获取用户要求的报价,而非页面上的所有卖家。
  • 并行执行——在一次响应中通过多个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.json
Returns price,
final_price
, title, availability, rating, review count, ASIN, seller, images. Use the right domain for the region (
amazon.com
,
amazon.de
,
amazon.co.uk
, …).
bash
bdata pipelines amazon_product "https://www.amazon.com/dp/<ASIN>" --json -o amazon.json
返回价格、
final_price
、标题、库存状态、评分、评论数、ASIN、卖家、图片。请使用对应地区的域名(
amazon.com
amazon.de
amazon.co.uk
等)。

Amazon — 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.json
Resolve the right ASIN/URL from the results, then call
amazon_product
on it.
bash
bdata pipelines amazon_product_search "iPhone 17 Pro 256GB" "https://www.amazon.com" --json -o amzn_search.json
从结果中解析出正确的ASIN/URL,然后对其调用
amazon_product

Walmart / 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.json
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.json

Google Shopping — cross-retailer overview

Google Shopping — 跨零售商概览

bash
bdata pipelines google_shopping "<google-shopping-product-url>" --json -o gshopping.json
Best 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 --json
bash
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 --json

Unknown / 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 (
amazon_product
singular,
bestbuy_products
plural,
walmart_product
). Confirm with the type list before hardcoding — the
data-feeds
skill has the verified list, and keyword/multi-arg pipelines (
amazon_product_search
) take
<keyword> <domain_url>
, not a single URL.
bash
bdata scrape "https://retailer.example/product-page"
然后从markdown中提取价格、货币和库存信息。此方式适用于无专用流水线的本地零售商(如区域性电子连锁店)。
流水线名称不统一
amazon_product
为单数,
bestbuy_products
为复数,
walmart_product
为单数)。硬编码前请确认类型列表——
data-feeds
技能包含已验证的列表,而关键词/多参数流水线(
amazon_product_search
)需传入
<keyword> <domain_url>
,而非单一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
    --country <code>
    to
    bdata search
    for localized SERP/shopping results (e.g.
    --country il
    for Israel,
    de
    ,
    uk
    ).
  • Use the local Amazon domain in product URLs. Many regions (e.g. Israel) buy via
    amazon.com
    with international shipping and via local chains — cover both and label shipping/import implications.
  • 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
    传递
    --country <code>
    参数
    以获取本地化的SERP/购物结果(例如
    --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

输出质量标准

  1. Every price has a source URL and a timestamp — no undated, unattributed prices.
  2. Always show availability next to price — a cheaper out-of-stock offer is not the winner. Flag refurbished/used/third-party explicitly.
  3. Name one "Best buy" — the cheapest in-stock, comparable-condition option, with the runner-up and why someone might pick it instead.
  4. 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.
  5. State currency and region — "$ USD · region: US" or the rate used for conversions.
  6. Never estimate a missing price. Report the gap; don't fill it.
  1. 每个价格都需附带来源URL和时间戳——不允许出现无日期、无来源的价格。
  2. 价格旁务必显示库存状态——价格更低但缺货的选项并非最佳选择。明确标记翻新/二手/第三方卖家的商品。
  3. 指定一个“最佳购买渠道”——最便宜的有库存、条件相当的选项,同时列出次优选项及选择它的理由。
  4. 如实说明空缺——列出本次运行中未返回数据或受限的零售商。若某价格看起来过时或为“起售价”区间,请标注说明。
  5. 标注货币和区域——例如“$ USD · 区域:美国”或转换时使用的汇率。
  6. 切勿估算缺失的价格。报告空缺即可;不要填补。