Whole Foods
Whole Foods Search API
Search Whole Foods Market products at one store and get that store's in-store prices: regular_price, sale_price and prime_price (the Prime member price) with the sale start and end dates, plus each product's ASIN, brand, image and on_sale and is_local flags, total_results, and facets for categories, featured filters and diets. store_id is optional and defaults to 10145 (Austin, TX). Costs 1 credit per request.
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/jsonquerystringrequiredSearch keywords.
Example: milk
store_idstring5-digit Whole Foods store id. Prices are that store's in-store (shelf) prices. Defaults to 10145 (Lamar, Austin TX). Find ids with /api/v1/wholefoods/stores.
Example: 10160
sortstringrelevance (default), price_asc or price_desc.
on_salebooleanOnly products on sale at the store. Defaults to false.
Example: true
dietstringOnly products with this dietary attribute: vegan, gluten-free, organic, dairy-free or vegetarian.
categorystringRestrict to one category slug, e.g. milk-cream. Slugs are in the category facet of any search.
Example: milk-cream
limitintegerProducts per page, 1-60. Defaults to 60.
Example: 60
offsetintegerProducts to skip, for paging (60 = page 2 at the default limit), 0-10000. Defaults to 0.
Example: 0
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.whole_foods.search(query="milk", store_id="10160")["data"]
for p in res["products"]:
print(p["asin"], p["name"], p["regular_price"], "sale:", p["sale_price"], "Prime:", p["prime_price"])Response