This endpoint will retrieve Walmart product list for a specified product category.
Copy <?php
$curl = curl_init();
$data = json_encode(array(
'apiKey' => 'APIKEY',
'category' => 'CATEGORY',
'output_format' => 'FORMAT',
'tld' => 'TLD',
'page' => 'PAGE',
'callback' => array(
'type' => 'webhook',
'url' => 'CALLBACK'
)
));
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://async.scraperapi.com/structured/walmart/category',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
} else {
echo $response;
}
curl_close($curl);
?>
Copy <?php
$curl = curl_init();
$data = json_encode(array(
'apiKey' => 'APIKEY',
'categories' => array('CATEGORY1', 'CATEGORY2'),
'output_format' => 'FORMAT',
'tld' => 'TLD',
'page' => 'PAGE',
'callback' => array(
'type' => 'webhook',
'url' => 'CALLBACK'
)
));
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://async.scraperapi.com/structured/walmart/category',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
} else {
echo $response;
}
curl_close($curl);
?>
Copy {
"id": "ce93d237-4595-4508-8d81-f94365fc542c",
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/ce93d237-4595-4508-8d81-f94365fc542c",
"category": "3944_1089430_37807",
}
Copy [
{
"id": "ec4a6153-368c-440e-8c02-6c302a661db9",
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/ec4a6153-368c-440e-8c02-6c302a661db9",
"category": "3920"
},
{
"id": "8a024945-f74a-4327-80e3-12f26c737ec6",
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/8a024945-f74a-4327-80e3-12f26c737ec6",
"category": "3944_1089430_37807"
}
]
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.