---
title: "Whole Foods Market API: 3 endpoints, 1 credit per call"
description: "Whole Foods Market API for store-level grocery search, product details, sale prices, facets and store data as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/whole-foods
---

[APIs](https://perceptlayer.com/apis) / [Marketplaces](https://perceptlayer.com/verticals/marketplaces) / Whole Foods Market

1 credit per call 3 endpoints 11 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.

[Get a free API key](https://perceptlayer.com/signup) Run it below

Whole Foods Market

GET /v1/whole-foods/search?query=milk&store\_id=10245 

```
{
  "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
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `search`: the fields and shapes you will get, shortened to 3 items.

| # | position integer | id string | name string | brand string | url url | image url | is\_local boolean | currency string | price number | regular\_price number | on\_sale boolean |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 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 |

Recorded from our API · 3 items shown · 11 datapoints per item GET /v1/whole-foods/search?query=milk&store\_id=10245

11 datapoints

### Identity

-   id string
-   name string
-   brand string

### Contact

-   url url

### Reputation

-   image url

### Price

-   currency string
-   price number
-   regular\_price number

### Other

-   position integer
-   is\_local boolean
-   on\_sale boolean

Playground

## Run this API

cURL shell 

```
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`](https://perceptlayer.com/apis/whole-foods/product) | none +3 optional | 1 credit |
| [GET `/v1/whole-foods/search`](https://perceptlayer.com/apis/whole-foods/search) | `query` `store_id` +4 optional | 1 credit |
| [GET `/v1/whole-foods/store`](https://perceptlayer.com/apis/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:** `search` takes a `query` and a `store_id`, with `page`, `per_page`, `category` and `diet`.
-   **Products:** `product` takes an `id` or a product `url`, with `store_id`.
-   **Stores:** `store` takes a `store_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.

Marketplaces JSON REST MCP

### More marketplaces APIs

[About You](https://perceptlayer.com/apis/about-you) [adidas](https://perceptlayer.com/apis/adidas) [AliExpress](https://perceptlayer.com/apis/aliexpress) [Allegro](https://perceptlayer.com/apis/allegro) [Amazon](https://perceptlayer.com/apis/amazon) [ASOS](https://perceptlayer.com/apis/asos) [Billiger.de](https://perceptlayer.com/apis/billiger) [bol.com](https://perceptlayer.com/apis/bol) [Chrono24](https://perceptlayer.com/apis/chrono24) [Costco](https://perceptlayer.com/apis/costco) [Craigslist](https://perceptlayer.com/apis/craigslist) [DBA](https://perceptlayer.com/apis/dba)

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 store` 

### Compare prices for the same product across stores

`Use the Whole Foods Market API to compare prices for the same product across stores` 

### Count 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 facets` 

### Find 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.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
