Amazon Product
Retrieve Amazon product details through Frevana.
Purpose
This skill is for looking up a specific Amazon product.
Inputs:
asin- optional
amazon_domain - optional
gl - optional
hl - optional
customer_zipcode - optional
force_refresh
Output:
- validated response JSON with Amazon product details
This skill validates that the response is JSON and returns it unchanged. Do not rewrite or reshape the returned data unless the user explicitly asks for a transformation.
What This Skill Needs
- user-provided
asin - optional
amazon_domain,gl,hl,customer_zipcode,force_refresh FREVANA_TOKENin the environment variables, or an explicit--tokenoverride for the current runcurlbashpython3
Execution Order
Use this flow so the request stays simple and reliable:
- Confirm the user has provided
asin. - Prefer the script over ad hoc
curlcommands. - Let the script read
FREVANA_TOKENfirst. - In interactive shell usage, if
FREVANA_TOKENis missing, the script may prompt for it. - In non-interactive or agent workflows, fail fast if the token is missing and tell the user to set
FREVANA_TOKENor pass--tokenexplicitly. - Return the validated response JSON, or summarize the fields the user actually cares about if they do not need the full payload.
- When useful, also save the JSON to a file.
Commands
Basic product lookup
bash <skill-path>/scripts/fetch_product.sh \
--asin B0BDJ49KVD
Delivery-aware lookup
bash <skill-path>/scripts/fetch_product.sh \
--asin B0BDJ49KVD \
--customer-zipcode 10001
Full request with explicit options
bash <skill-path>/scripts/fetch_product.sh \
--asin B0BDJ49KVD \
--amazon-domain amazon.com \
--gl US \
--hl en \
--customer-zipcode 10001 \
--force-refresh false \
--output ./out/amazon-product-result.json
Token override for the current run
bash <skill-path>/scripts/fetch_product.sh \
--asin B0BDJ49KVD \
--token "your bearer token"
Fixed Request Shape
The script sends this payload shape:
{
"asin": "B0BDJ49KVD",
"amazon_domain": "amazon.com",
"gl": "US",
"hl": "en",
"customer_zipcode": "10001",
"force_refresh": false
}
Default values when not provided:
amazon_domain:amazon.comgl:UShl:enforce_refresh:false
Response Shape
The API returns JSON. This skill validates the response as JSON and returns it unchanged.
Output
- Success: the script validates that the response body is JSON and prints it to stdout
- With
--output: the same JSON is also written to the specified file path - Failure: the script prints the response body or parsing error and exits non-zero
Notes
- Require
--asin - Ask the user for the ASIN if they only provide a product name or Amazon URL
- Use
--customer-zipcodewhen delivery availability or localized offer details matter - If
curlis missing, stop and tell the user to installcurl - If
python3is missing, stop and tell the user to installpython3 - Do not echo the Bearer token back to the user
- Summarize the key fields the user actually cares about instead of dumping raw JSON unless they ask for the full payload
Example Prompts
中文
- "查一下 ASIN B0BDJ49KVD 的商品详情"
- "帮我查 ASIN B0BDJ49KVD,收货邮编 10001"
- "调用 Amazon product API 并把原始 JSON 保存到文件"
English
- "Fetch Amazon product details for ASIN B0BDJ49KVD"
- "Check ASIN B0BDJ49KVD with customer ZIP 10001"
- "Look up this Amazon ASIN and save the raw JSON to a file"