Walmart
Walmart Stores API
Find the Walmart stores near a US ZIP code or a Canadian postal code as JSON, nearest first - store id, name, store type, distance in miles, address, coordinates, opening hours and pickup options. The store_id is what Walmart Search and Walmart Product take to return one store's assortment, price and availability. Costs 1 credit.
POST/api/v1/walmart/stores
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonzipcodestringrequiredA 5-digit US ZIP code, or a Canadian postal code such as M5V 2T6 (with or without the space) when domain is ca.
Example: 50036
domainenum<string>default:comWhich Walmart to list stores for. Use the returned store_id with the same domain on Walmart Search or Walmart Product.
com— walmart.com (US). zipcode is a 5-digit ZIP.ca— walmart.ca (Canada). zipcode is a postal code such as M5V 2T6.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
stores = client.walmart.stores("50036")
nearest = stores["data"]["stores"][0]
# Search that store's assortment
results = client.walmart.search("whole milk", delivery_zip="50036", store_id=nearest["store_id"])
print(results["data"]["location"])Response
"zipcode": "50036",
"count": 9,
"domain": "com"
},
"response_time": 1744,
"credits_used": 1,
"credits_remaining": 999
}