This skill helps users extract structured product listings from Amazon, including titles, ASINs, prices, ratings, and specifications. Use this skill when users want to search for products on Amazon, find the best selling brand products, track price changes for items, get a list of categories with high ratings, compare different brand products on Amazon, extract Amazon product data for market research, look for products in a specific language or marketplace, analyze competitor pricing for keywords, find featured products for search terms, get technical specifications like material or color for product lists.
This skill utilizes BrowserAct's Amazon Product API template to extract structured product listings from Amazon search results. It provides detailed information including titles, ASINs, prices, ratings, and product specifications, enabling efficient market research and product monitoring without manual data collection.
Before running, check the environment variable. If not set, do not take other measures; ask and wait for the user to provide it. :
BROWSERACT_API_KEY"Since you haven't configured the BrowserAct API Key, please visit the BrowserAct Console to get your Key."
The agent should configure the following parameters based on user requirements:
KeyWords
stringlaptop, wireless earbudsBrand
stringAppleDell, SamsungMaximum_number_of_page_turns
number1language
stringenzh-CN, deAgent should use the following independent script to achieve "one-line command result":
# Example Usage
python -u ./scripts/amazon_product_api.py "keywords" "brand" pages "language"
Since this task involves automated browser operations, it may take some time (several minutes). The script will continuously output status logs with timestamps (e.g., [14:30:05] Task Status: running).
Agent Instructions:
Upon success, the script parses and prints the structured product data from the API response, which includes:
product_title: Full title of the product.asin: Amazon Standard Identification Number.product_url: URL of the Amazon product page.brand: Brand name.price_current_amount: Current price.price_original_amount: Original price (if applicable).rating_average: Average star rating.rating_count: Total number of ratings.featured: Badges like "Best Seller" or "Amazon's Choice".color, material, style: Product attributes (if available).If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
Check Output Content:
"Invalid authorization", it means the API Key is invalid or expired. Do not retry; guide the user to re-check and provide the correct API Key."Invalid authorization" but the task failed (e.g., output starts with Error: or returns empty results), the Agent should automatically try to re-execute the script once.Retry Limit: