APIs / Marketplaces / Whole Foods Market
1 credit per call3 endpoints11 datapoints
Whole Foods Market API
Whole Foods Market API for store-level grocery search, product details, sale prices, facets and store data as JSON. 1 credit per successful call.
{
"success": true,
"data": {
"query": "milk",
"store_id": "10245",
"page": 1,
"per_page": 24,
"total_results": 514,
"has_next_page": true,
"items": [
{
"position": 1,
"id": "B082VVT75S",
"name": "Unsweetened Oat Milk, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-oat-milk-32-fz-b082vvt75s",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41W8VdoCfGL.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
},
{
"position": 2,
"id": "B07HFJJ49P",
"name": "Unsweetened Almond Milk, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-almond-milk-32-fz-b07hfjj49p",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41wCG4yX-9L.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
},
{
"position": 3,
"id": "B078WVT2BC",
"name": "Unsweetened Hazelnut Milked, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-hazelnut-milked-32-fz-b078wvt2bc",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41Z7pgsEWEL.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
}
],
"facets": [
{
"key": "category",
"label": "Category",
"options": [
{
"slug": "all-products",
"label": "All Search Results",
"count": 514
},
{
"slug": "dairy-eggs",
"label": "Dairy & Eggs",
"count": 348,
"options": [
"…",
"…",
"…"
]
},
{
"slug": "prepared-foods",
"label": "Prepared Foods",
"count": 2,
"options": [
"…"
]
}
]
},
{
"key": "featured",
"label": "Featured",
"options": [
{
"slug": "on-sale",
"label": "Sales & Deals",
"count": 248
},
{
"slug": "365-by-whole-foods-market",
"label": "365 by Whole Foods Market",
"count": 73
},
{
"slug": "local",
"label": "Local",
"count": 37
}
]
},
{
"key": "diets",
"label": "Dietary Preference",
"options": [
{
"slug": "vegan",
"label": "Vegan",
"count": 52
},
{
"slug": "gluten-free",
"label": "Gluten-Free",
"count": 111
},
{
"slug": "organic",
"label": "Organic",
"count": 223
}
]
}
]
},
"meta": {
"endpoint_family": "search",
"request_id": "req_879324b5d62f4830a8a5d093a16a2e43",
"credits_charged": 1,
"credits_remaining": 1908
}
}Sample data
What one call returns
A recorded run of search: the fields and shapes you will get, shortened to 3 items.
| # | positioninteger | idstring | namestring | brandstring | urlurl | imageurl | is_localboolean | currencystring | pricenumber | regular_pricenumber | on_saleboolean |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | B082VVT75S | Unsweetened Oat Milk, 32 FZ | Elmhurst | https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-oat-milk-32-fz-b082vvt75s | https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41W8VdoCfGL.jpg | true | USD | 7.29 | 7.29 | false |
| 2 | 2 | B07HFJJ49P | Unsweetened Almond Milk, 32 FZ | Elmhurst | https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-almond-milk-32-fz-b07hfjj49p | https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41wCG4yX-9L.jpg | true | USD | 7.29 | 7.29 | false |
| 3 | 3 | B078WVT2BC | Unsweetened Hazelnut Milked, 32 FZ | Elmhurst | https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-hazelnut-milked-32-fz-b078wvt2bc | https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41Z7pgsEWEL.jpg | true | USD | 7.29 | 7.29 | false |
[
{
"position": 1,
"id": "B082VVT75S",
"name": "Unsweetened Oat Milk, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-oat-milk-32-fz-b082vvt75s",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41W8VdoCfGL.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
},
{
"position": 2,
"id": "B07HFJJ49P",
"name": "Unsweetened Almond Milk, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-almond-milk-32-fz-b07hfjj49p",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41wCG4yX-9L.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
},
{
"position": 3,
"id": "B078WVT2BC",
"name": "Unsweetened Hazelnut Milked, 32 FZ",
"brand": "Elmhurst",
"url": "https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-hazelnut-milked-32-fz-b078wvt2bc",
"image": "https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41Z7pgsEWEL.jpg",
"is_local": true,
"currency": "USD",
"price": 7.29,
"regular_price": 7.29,
"on_sale": false
}
]position,id,name,brand,url,image,is_local,currency,price,regular_price,on_sale 1,B082VVT75S,"Unsweetened Oat Milk, 32 FZ",Elmhurst,https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-oat-milk-32-fz-b082vvt75s,https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41W8VdoCfGL.jpg,true,USD,7.29,7.29,false 2,B07HFJJ49P,"Unsweetened Almond Milk, 32 FZ",Elmhurst,https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-almond-milk-32-fz-b07hfjj49p,https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41wCG4yX-9L.jpg,true,USD,7.29,7.29,false 3,B078WVT2BC,"Unsweetened Hazelnut Milked, 32 FZ",Elmhurst,https://www.wholefoodsmarket.com/product/elmhurst-unsweetened-hazelnut-milked-32-fz-b078wvt2bc,https://m.media-amazon.com/images/S/assets.wholefoodsmarket.com/PIE/product/41Z7pgsEWEL.jpg,true,USD,7.29,7.29,false
Recorded from our API · 3 items shown · 11 datapoints per itemGET /v1/whole-foods/search?query=milk&store_id=10245
11 datapoints
Identity
- idstring
- namestring
- brandstring
Contact
- urlurl
Reputation
- imageurl
Price
- currencystring
- pricenumber
- regular_pricenumber
Other
- positioninteger
- is_localboolean
- on_saleboolean
Playground
Run this API
curl "https://api.perceptlayer.com/v1/whole-foods/search?query=milk&store_id=10245" \
-H "X-API-Key: $API_KEY"Whole Foods Market · 3 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters and an example request.
| Endpoint | Required parameters | Cost |
|---|---|---|
GET/v1/whole-foods/product | none+3 optional | 1 credit |
GET/v1/whole-foods/search | querystore_id+4 optional | 1 credit |
GET/v1/whole-foods/store | store_id | 1 credit |
Overview
About the Whole Foods Market API
What you can get
The Whole Foods Market API returns Whole Foods Market grocery and store data as JSON through 3 endpoints.
- Search:
searchtakes aqueryand astore_id, withpage,per_page,categoryanddiet. - Products:
producttakes anidor a producturl, withstore_id. - Stores:
storetakes astore_id.
The recorded search for "milk" at store 10245 returns query, store_id, page, per_page, total_results (514 in that recording), has_next_page, items and facets. Each item has position, id, name, brand, url, image, is_local, currency, price, regular_price and on_sale. The facets group category, featured and dietary options, each with a slug, label and count.
How a call works
Search a store: GET /v1/whole-foods/search?query=milk&store_id=10245 with your key in the X-API-Key header. Each item carries an id, such as B0005XMS0C; product takes that id with the same store_id. Check has_next_page before asking for the next page. Every successful call costs 1 credit; failed calls cost nothing.
More marketplaces APIs
Use cases
Track grocery prices and sales at a given store
Use the Whole Foods Market API to track grocery prices and sales at a given storeCompare prices for the same product across stores
Use the Whole Foods Market API to compare prices for the same product across storesCount a store's vegan, gluten-free or organic products from the facets
Use the Whole Foods Market API to count a store's vegan, gluten-free or organic products from the facetsFind local products with `is_local`
Use the Whole Foods Market API to find local products with `is_local`FAQ
Questions
How much does the Whole Foods Market API cost?
Each successful call costs one credit, and each search page is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.
Why does search need a store_id?
Prices and assortment are per store, so `search` takes a `store_id`. `product` takes one too, and `store` returns that store's details.
What format are responses in?
Every endpoint returns JSON, with no HTML parsing on your side.
Should I build a Whole Foods Market scraper instead?
You can, but a Whole Foods Market scraper is code you maintain: page changes break it, requests get blocked, and Whole Foods Market's terms govern how you collect data. The Whole Foods Market API gives you 3 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.
Try the Whole Foods Market API with 100 free credits
No credit card. Failed calls are never billed.