This skill utilizes BrowserAct's Amazon ASIN Lookup API template to provide a seamless way to retrieve comprehensive product information from Amazon. By simply providing an ASIN, you can extract structured data including title, price, ratings, brand, and detailed descriptions directly into your application without manual scraping.
Before running, check the BROWSERACT_API_KEY environment variable. If not set, do not take other measures; ask and wait for the user to provide it.
Agent must inform the user:
> "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:
stringB07TS6R1SFThe agent should execute the following script to get results in one command:
# Example Usage
python -u ./scripts/amazon_asin_lookup_api.py "ASIN_VALUE"
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: The provided ASIN.product_url: URL of the Amazon product page.brand: Brand name.price_current_amount: Current price.price_original_amount: Original price (if applicable).price_discount_amount: Discount amount (if applicable).rating_average: Average star rating.rating_count: Total number of ratings.featured: Badges like "Amazon's Choice".color: Color variant (if applicable).compatible_devices: List of compatible devices (if applicable).product_description: Full product description.special_features: Highlighted features.style: Style attribute (if applicable).material: Material used (if applicable).If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
"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.共 1 个版本