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.
Asked
Active
Viewed 4,719 times
8
-
I'm also interested in this, it would be extremely useful and beneficial to not only walmart but us developers as well. – Mike Mulligan Oct 25 '18 at 15:38
-
Exactly Mike. It was my understanding that this was something in the works, but haven't seen anything published yet – jbambrough Nov 04 '18 at 17:17
-
It must be in the works because devices such as Amazon Alexa and Google Home would be able to utilize this and make grocery shopping easier than ever. – Mike Mulligan Nov 05 '18 at 16:05
1 Answers
1
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.

Solomon Antoine
- 554
- 1
- 7
- 14
-
Is this API documented anywhere, or did you reverse-engineer this from the Grocery Web sure or app? If it’s not an official public API, I would be concerned about it changing without notice. – Jason R Jan 09 '19 at 02:15
-
They have two api's the one in the answer was reversed engineered though. – Solomon Antoine Jan 09 '19 at 02:47