This endpoint will retrieve product list data from Walmart as a result of a search.
Copy import fetch from 'node-fetch' ;
const options = {
method : 'POST' ,
body : JSON .stringify ({
apiKey : 'APIKEY' ,
query : 'QUERY' ,
tld : 'TLD' ,
output_format : 'FORMAT' ,
page : 'PAGE' ,
callback : {
type : 'webhook' ,
url : 'CALLBACK' }}) ,
headers : {
'Content-Type' : 'application/json' ,
} ,
}
fetch ( 'https://async.scraperapi.com/structured/walmart/search' , 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' ,
queries : [ 'QUERY1' , 'QUERY2' ] ,
tld : 'TLD' ,
output_format : 'FORMAT' ,
page : 'PAGE' ,
callback : {
type : 'webhook' ,
url : 'CALLBACK' }}) ,
headers : {
'Content-Type' : 'application/json' ,
} ,
}
fetch ( 'https://async.scraperapi.com/structured/walmart/search' , options)
.then (response => {
response .text () .then (text => console .log (text));
})
.catch (error => {
console .log (error)
})
Copy {
"id" : "2c75d8dc-02e9-4243-bef9-5da4bb352c4c" ,
"status" : "running" ,
"statusUrl" : "https://async.scraperapi.com/jobs/2c75d8dc-02e9-4243-bef9-5da4bb352c4c" ,
"query" : "bucket"
}
Copy [
{
"id" : "b61d65c2-7998-41d5-8852-41175336d4b2" ,
"attempts" : 0 ,
"status" : "running" ,
"statusUrl" : "https://async.scraperapi.com/jobs/b61d65c2-7998-41d5-8852-41175336d4b2" ,
"query" : "bucket"
} ,
{
"id" : "e9d5a1b8-872c-4926-bb25-bc22c17c07bb" ,
"attempts" : 0 ,
"status" : "running" ,
"statusUrl" : "https://async.scraperapi.com/jobs/e9d5a1b8-872c-4926-bb25-bc22c17c07bb" ,
"query" : "sprinkler"
}
]
After the job(s) finish, you will find the result under the response key in the response JSON object. The structure is the same as in the corresponding SYNC data endpoint.