返回 Skill 列表
extension
分类: 营销与增长无需 API Key

amazon-product-search-recommender

当用户希望在预算限制内搜索亚马逊上的特定产品并生成结构化推荐时,此技能会导航到Amazon.com,使用特定标准(价格范围、材质、颜色)执行有针对性的搜索,浏览搜索结果,提取产品详情(标题、价格、商店/品牌、URL),并将推荐汇编成结构化的JSON格式。触发条件包括请求产品推荐、购物协助、预算受限的搜索,或当用户需要在亚马逊上找到具有详细规格的特定商品时。

person作者: jakexiaohubgithub

Skill: Amazon Product Search & Recommender

Purpose

Search Amazon for products matching user criteria (budget, material, color, etc.), extract detailed product information, and output structured recommendations in JSON format.

Core Workflow

  1. Parse Request: Identify the product category, budget, material, color, and any other specific constraints from the user's request.
  2. Navigate & Search: Go to https://www.amazon.com, locate the main search box, and perform a search using a constructed query (e.g., "black leather sofa under 400").
  3. Browse Results: Navigate through the search results page to find relevant product listings.
  4. Extract Details: For each selected product, click into its detail page to gather accurate information:
    • Canonical URL: The full product page URL.
    • Title: The complete product title.
    • Price: The current selling price (prioritize Prime/sale price if shown).
    • Store/Brand Name: The brand or store name (e.g., from "Visit the [Brand] Store" link).
  5. Compile & Output: Format the extracted data into a JSON array matching the required schema and write it to the specified output file (e.g., recommend.json).

Key Instructions & Best Practices

  • Search Query: Construct the search query by combining key attributes from the user request (color, material, product type, budget hint).
  • Element Identification: Use the browser_snapshot_search tool with patterns like "searchbox" or "Search Amazon" to reliably locate the search input field. Avoid interacting with dropdowns or other elements near the search bar.
  • Result Navigation: Use browser_snapshot_navigate_to_span and browser_snapshot_search (e.g., for "price", "$", product brand names) to move through the search results and identify product links and their details.
  • Data Accuracy: Always navigate to the product detail page (browser_click on product link) to capture the definitive canonical_url, title, price, and store_name. Do not rely solely on snippet data from search results.
  • Price Extraction: On the product page, search for price-related patterns ("\\$", "price"). The price is often found near elements like "Prime Member Price" or within the buy box. Extract only the numerical price (e.g., "287.99"), not currency symbols or additional text.
  • Store/Brand Extraction: Look for a link containing "Visit the ... Store" on the product page. The text between "Visit the " and " Store" is typically the store_name.
  • Error Handling: If an action fails (e.g., clicking an element), use snapshot search and navigation tools to re-orient and find the correct element reference.
  • Task Completion: After writing the final JSON file, read it back to verify its contents and call local-claim_done.

Output Schema

The final output must be a JSON file (e.g., recommend.json) containing an array of objects. Each object must have a product_info key containing: