Whole Foods
Whole Foods Category API
Browse one Whole Foods Market category at one store, with sort and filters: the category breadcrumb, total_results, facets, and each product's in-store regular, sale and Prime member price with sale dates, ASIN, brand and image. all-products lists the whole store. 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/jsoncategorystringrequiredCategory slug, e.g. dairy-eggs, cheese, produce, fresh-fruit. all-products lists the whole store. Slugs are in the category facet of any search.
Example: cheese
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
sortstringfeatured (default), popular, price_asc, price_desc, brand_az or brand_za.
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.
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.category(category="cheese", store_id="10160")["data"]
print(" > ".join(c["label"] for c in res["breadcrumb"]), res["total_results"])
for p in res["products"]:
print(p["name"], p["regular_price"], "per", p["price_unit"] or "item")Response