There are Developer API's and SDK's for Walmart, but these appear to be designed for general items like TV's, furniture, etc... does anybody happen to know if there is an SDK or API for Walmart Grocery? My use case is to populate a Walmart Grocery shopping cart programmatically for a given store.
The Walmart Marketplace APIs provide resources for sellers to manage their items, orders, prices, promotions, inventory and reports on Walmart.com. The Walmart Developer Portal provides all the tools you need to directly integrate with Walmart Marketplace APIs.
The Walmart Marketplace API provides resources for seller applications to manage items, orders, prices, promotions, inventory and reports on Walmart.com. The Walmart Developer Center provides all the tools you need to directly integrate with the Walmart Marketplace API. Get started.
For the walmart grocery api, you can use cURL to get a list of grocery items. In the example I provide below I will be using PHP (Guzzle/HTTP)
Search For Eggs (PHP)
$client = new Client(['base_uri' => 'https://grocery.walmart.com/v4/api/']);
$method = 'GET';
$path = 'products/search';
$query = [
'query' =>
[
'storeId' => '1855', //store location
'count' => 50,
'page' => 1,
'offset' => 0,
'query' => 'Egg Dozen'
]
];
$req = $client->request($method, $path, $query);
$data = json_decode($req->getBody()->getContents());
$products = $data->products;
print_r($products);
This will list off 50-60 grocery items based off of your search query.
Search For Eggs in cURL
curl -X GET \
'https://grocery.walmart.com/v4/api/products/search?storeId=1855&count=1&page=1&offset=0&query=eggs' \
-H 'Postman-Token: 1723fea5-657d-4c54-b245-027d41b135aa' \
-H 'cache-control: no-cache'
Not sure if that answered your question but I hope it is a start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With