Get a product's price, details and rating
curl --request POST \
--url https://api.stophy.dev/v1/amazon/product \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product: '<string>'})
};
fetch('https://api.stophy.dev/v1/amazon/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/amazon/product"
payload = { "product": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"product": {
"url": "<string>",
"id": "<string>",
"title": "<string>",
"brand": "<string>",
"price": 1,
"originalPrice": 1,
"currency": "<string>",
"availability": "<string>",
"rating": 123,
"reviews": 0,
"bullets": [
"<string>"
],
"description": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"variants": [
{
"id": "<string>",
"attributes": {}
}
],
"seller": {
"name": "<string>",
"id": "<string>",
"shipsFrom": "<string>"
},
"categories": [
"<string>"
],
"bestSellersRank": [
{
"rank": 0,
"category": "<string>"
}
],
"specs": {},
"topReviews": [
{
"isVerified": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"rating": 123,
"title": "<string>",
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"variant": "<string>",
"helpful": 0,
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
]
}
]
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Amazon
Amazon product API
Call the Amazon product API to get title, brand, price, original price, currency and availability, as JSON or markdown. 5 credits.
POST
/
v1
/
amazon
/
product
Get a product's price, details and rating
curl --request POST \
--url https://api.stophy.dev/v1/amazon/product \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product: '<string>'})
};
fetch('https://api.stophy.dev/v1/amazon/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/amazon/product"
payload = { "product": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"product": {
"url": "<string>",
"id": "<string>",
"title": "<string>",
"brand": "<string>",
"price": 1,
"originalPrice": 1,
"currency": "<string>",
"availability": "<string>",
"rating": 123,
"reviews": 0,
"bullets": [
"<string>"
],
"description": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"variants": [
{
"id": "<string>",
"attributes": {}
}
],
"seller": {
"name": "<string>",
"id": "<string>",
"shipsFrom": "<string>"
},
"categories": [
"<string>"
],
"bestSellersRank": [
{
"rank": 0,
"category": "<string>"
}
],
"specs": {},
"topReviews": [
{
"isVerified": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"rating": 123,
"title": "<string>",
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"variant": "<string>",
"helpful": 0,
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
]
}
]
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
amazon.product - Returns:
datahasproduct. - Cost: 5 credits. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.amazon.product({ product: "https://www.amazon.com/dp/B0CX23V2ZK" });
console.log(result.data.product);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.amazon.product(product="https://www.amazon.com/dp/B0CX23V2ZK")
print(result["data"]["product"])
curl -X POST https://api.stophy.dev/v1/amazon/product \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"product":"https://www.amazon.com/dp/B0CX23V2ZK"}'
stophy amazon product https://www.amazon.com/dp/B0CX23V2ZK
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json