This endpoint will retrieve offers for a specified product from an Amazon offers page and transform it into usable JSON.
Copy import fetch from 'node-fetch' ;
const options = {
method : 'POST' ,
body : JSON .stringify ({
apiKey : 'APIKEY' ,
asin : 'ASIN' ,
callback : {
type : 'webhook' ,
url : 'CALLBACK' }}) ,
headers : {
'Content-Type' : 'application/json' ,
} ,
}
fetch ( 'http://async.scraperapi.com/structured/amazon/offers' , options)
.then (response => {
response .text () .then (text => console .log (text));
})
.catch (error => {
console .log (error)
})
Copy import fetch from 'node-fetch' ;
const options = {
method : 'POST' ,
body : JSON .stringify ({
apiKey : 'APIKEY' ,
asin : [ 'ASIN1' , 'ASIN2' , 'ASIN3' ] ,
callback : {
type : 'webhook' ,
url : 'CALLBACK' }}) ,
headers : {
'Content-Type' : 'application/json' ,
} ,
}
fetch ( 'http://async.scraperapi.com/structured/amazon/offers' , options)
.then (response => {
response .text () .then (text => console .log (text));
})
.catch (error => {
console .log (error)
})
Copy {
"id" : "f9c41146-ecd3-415c-ae0a-461de670e2e8" ,
"status" : "running" ,
"statusUrl" : "http://async.scraperapi.com/structured/amazon/offers/f9c41146-ecd3-415c-ae0a-461de670e2e8" ,
"asin" : "B079BLHH67"
}
Copy [
{
"id" : "5b0c838a-d0eb-46c3-ad9a-e82e398d56a5" ,
"status" : "running" ,
"statusUrl" : "http://async.scraperapi.com/structured/amazon/offers/5b0c838a-d0eb-46c3-ad9a-e82e398d56a5" ,
"asin" : "B079BLHH67"
} ,
{
"id" : "df83b9e1-be25-40de-8702-4e934f057867" ,
"status" : "running" ,
"statusUrl" : "http://async.scraperapi.com/structured/amazon/offers/df83b9e1-be25-40de-8702-4e934f057867" ,
"asin" : "B07G98GG51"
}
]