Amazon ASIN Lookup Skill
📖 Introduction
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.
✨ Features
- 1. No Hallucinations: Pre-set workflows avoid AI generative hallucinations, ensuring stable and precise data extraction.
- No Captcha Issues: No need to handle reCAPTCHA or other verification challenges.
- No IP Restrictions: No need to handle regional IP restrictions or geofencing.
- Faster Execution: Tasks execute faster compared to pure AI-driven browser automation solutions.
- Cost-Effective: Significantly lowers data acquisition costs compared to high-token-consuming AI solutions.
🔑 API Key Setup
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."
🛠️ Input Parameters
The agent should configure the following parameters based on user requirements:
- 1. ASIN (Amazon Standard Identification Number)
-
Type:
string
-
Description: The unique identifier for the Amazon product.
-
Required: Yes
-
Example: INLINECODE2
🚀 Usage
The agent should execute the following script to get results in one command:
CODEBLOCK0
⏳ Execution Monitoring
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:
- - While waiting for the script result, keep monitoring the terminal output.
- As long as the terminal is outputting new status logs, the task is running normally; do not mistake it for a deadlock or unresponsiveness.
- Only if the status remains unchanged for a long time or the script stops outputting without returning a result should you consider triggering the retry mechanism.
📊 Data Output
Upon success, the script parses and prints the structured product data from the API response, which includes:
- -
product_title: Full title of the product. - INLINECODE5 : The provided ASIN.
- INLINECODE6 : URL of the Amazon product page.
- INLINECODE7 : Brand name.
- INLINECODE8 : Current price.
- INLINECODE9 : Original price (if applicable).
- INLINECODE10 : Discount amount (if applicable).
- INLINECODE11 : Average star rating.
- INLINECODE12 : Total number of ratings.
- INLINECODE13 : Badges like "Amazon's Choice".
- INLINECODE14 : Color variant (if applicable).
- INLINECODE15 : List of compatible devices (if applicable).
- INLINECODE16 : Full product description.
- INLINECODE17 : Highlighted features.
- INLINECODE18 : Style attribute (if applicable).
- INLINECODE19 : Material used (if applicable).
⚠️ Error Handling & Retry
If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
- 1. Check Output Content:
- If the output
contains "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.
- If the output
does not contain "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.
- 2. Retry Limit:
- Automatic retry is limited to
one time. If the second attempt fails, stop retrying and report the specific error information to the user.
🌟 Typical Use Cases
- 1. Product Data Enrichment: Retrieve full details for a list of ASINs to update an e-commerce database.
- Price Comparison: Lookup current Amazon prices for specific ASINs to compare with other retailers.
- Review Monitoring: Track changes in rating averages and review counts for key products.
- Availability Checks: Automatically verify if a specific product is currently in stock on Amazon.
- Brand Analysis: Identify the brand and manufacturer of products identified by ASIN.
- Detailed Specifications: Fetch material, style, and color information for catalog management.
- Feature Highlighting: Extract "special features" and detailed descriptions for marketing copy.
- Compatibility Verification: Check "compatible devices" for electronics or accessories.
- Market Research: Analyze featured badges like "Amazon's Choice" for specific product IDs.
- URL Resolution: Convert a list of ASINs into full Amazon product page URLs.
Amazon ASIN 查询技能
📖 简介
本技能利用 BrowserAct 的 Amazon ASIN 查询 API 模板,提供了一种无缝获取亚马逊产品完整信息的方式。只需提供 ASIN,即可提取包括标题、价格、评分、品牌和详细描述在内的结构化数据,直接集成到您的应用中,无需手动抓取。
✨ 功能特点
- 1. 无幻觉问题:预设工作流程避免 AI 生成幻觉,确保数据提取稳定精准。
- 无验证码问题:无需处理 reCAPTCHA 或其他验证挑战。
- 无 IP 限制:无需处理区域 IP 限制或地理围栏。
- 执行更快:相比纯 AI 驱动的浏览器自动化方案,任务执行速度更快。
- 成本效益高:相比高 Token 消耗的 AI 方案,显著降低数据获取成本。
🔑 API 密钥设置
运行前,检查 BROWSERACT
APIKEY 环境变量。如果未设置,不要采取其他措施;询问并等待用户提供。
代理必须告知用户:
由于您尚未配置 BrowserAct API 密钥,请访问 BrowserAct 控制台 获取您的密钥。
🛠️ 输入参数
代理应根据用户需求配置以下参数:
- 1. ASIN(亚马逊标准识别号)
-
类型:string
-
描述:亚马逊产品的唯一标识符。
-
必填:是
-
示例:B07TS6R1SF
🚀 使用方法
代理应执行以下脚本,通过一条命令获取结果:
bash
使用示例
python -u ./scripts/amazon
asinlookup
api.py ASINVALUE
⏳ 执行监控
由于此任务涉及自动化浏览器操作,可能需要一些时间(几分钟)。脚本将
持续输出带有时间戳的状态日志(例如,[14:30:05] 任务状态:运行中)。
代理指令:
- - 在等待脚本结果时,持续监控终端输出。
- 只要终端持续输出新的状态日志,任务即正常运行;不要误认为是死锁或无响应。
- 仅当状态长时间不变或脚本停止输出且未返回结果时,才考虑触发重试机制。
📊 数据输出
成功时,脚本解析并打印 API 响应中的结构化产品数据,包括:
- - producttitle:产品完整标题。
- ASIN:提供的 ASIN。
- producturl:亚马逊产品页面 URL。
- brand:品牌名称。
- pricecurrentamount:当前价格。
- priceoriginalamount:原价(如适用)。
- pricediscountamount:折扣金额(如适用)。
- ratingaverage:平均星级评分。
- ratingcount:评分总数。
- featured:徽章,如亚马逊推荐。
- color:颜色变体(如适用)。
- compatibledevices:兼容设备列表(如适用)。
- productdescription:产品完整描述。
- special_features:突出功能特点。
- style:风格属性(如适用)。
- material:使用材料(如适用)。
⚠️ 错误处理与重试
如果脚本执行过程中发生错误(例如网络波动或任务失败),代理应遵循以下逻辑:
- 1. 检查输出内容:
- 如果输出
包含 Invalid authorization,表示 API 密钥无效或已过期。
不要重试;引导用户重新检查并提供正确的 API 密钥。
- 如果输出
不包含 Invalid authorization 但任务失败(例如,输出以 Error: 开头或返回空结果),代理应
自动尝试重新执行脚本一次。
- 2. 重试限制:
- 自动重试限制为
一次。如果第二次尝试失败,停止重试并向用户报告具体的错误信息。
🌟 典型使用场景
- 1. 产品数据丰富:获取 ASIN 列表的完整详情,更新电商数据库。
- 价格比较:查询特定 ASIN 的当前亚马逊价格,与其他零售商比较。
- 评论监控:跟踪关键产品的平均评分和评论数量的变化。
- 库存检查:自动验证特定产品当前在亚马逊是否有货。
- 品牌分析:识别由 ASIN 标识的产品的品牌和制造商。
- 详细规格:获取材料、风格和颜色信息,用于目录管理。
- 功能突出:提取特殊功能和详细描述,用于营销文案。
- 兼容性验证:检查电子产品或配件的兼容设备。
- 市场研究:分析特定产品 ID 的亚马逊推荐等特色徽章。
- URL 解析:将 ASIN 列表转换为完整的亚马逊产品页面 URL。