---
title: "Instacart API: grocery search, product details as JSON"
description: "Instacart API for grocery search, product details with nutrition and unit prices, and the stores serving a ZIP code as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/instacart
---

[APIs](https://perceptlayer.com/apis) / [Marketplaces](https://perceptlayer.com/verticals/marketplaces) / Instacart

1 credit per call 3 endpoints 15 datapoints 

# Instacart API

Instacart API for grocery search, product details with nutrition and unit prices, and the stores serving a ZIP code as JSON. 1 credit per successful call.

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

Instacart

GET /v1/instacart/search?query=milk&zip=10016 

```
{
  "success": true,
  "data": {
    "query": "milk",
    "page": 1,
    "count": 14,
    "has_next_page": false,
    "items": [
      {
        "position": 1,
        "id": "items_162737-16960830",
        "product_id": "16960830",
        "name": "Wegmans Vitamin D Whole Milk",
        "brand": "wegmans",
        "size": "1 gal",
        "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_ac2c5c39-7b3e-44b4-ae2c-f2af97b12025.jpeg",
        "availability": "in_stock",
        "retailer_id": "231",
        "shop_id": "366100",
        "price": 4.59,
        "currency": "USD",
        "unit_price": 0.04,
        "unit": "fl oz",
        "unit_price_text": "$0.04/fl oz"
      },
      {
        "position": 2,
        "id": "items_162737-16960902",
        "product_id": "16960902",
        "name": "Wegmans Vitamin D Whole Milk",
        "brand": "wegmans",
        "size": "0.5 gal",
        "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_75cc9c25-7e8f-477c-8f4e-39b2a28cf664.jpeg",
        "availability": "in_stock",
        "retailer_id": "231",
        "shop_id": "366100",
        "price": 3.09,
        "currency": "USD",
        "unit_price": 0.05,
        "unit": "fl oz",
        "unit_price_text": "$0.05/fl oz"
      },
      {
        "position": 3,
        "id": "items_162737-16960897",
        "product_id": "16960897",
        "name": "Wegmans 2% Reduced Fat Milk",
        "brand": "wegmans",
        "size": "0.5 gal",
        "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_0183ef0a-eb36-4f87-9473-7e12e1a3c002.jpeg",
        "availability": "in_stock",
        "retailer_id": "231",
        "shop_id": "366100",
        "price": 3.09,
        "currency": "USD",
        "unit_price": 0.05,
        "unit": "fl oz",
        "unit_price_text": "$0.05/fl oz"
      }
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "attempts": 1,
    "request_id": "req_1b77d461161542e495e1059e45247500",
    "credits_charged": 1,
    "credits_remaining": 977
  }
}
```

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 | product\_id string | name string | brand string | size string | image url | availability string | retailer\_id string | shop\_id string | price number | currency string | unit\_price number | unit string | unit\_price\_text string |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 1 | items\_162737-16960830 | 16960830 | Wegmans Vitamin D Whole Milk | wegmans | 1 gal | https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large\_ac2c5c39-7b3e-44b4-ae2c-f2af97b12025.jpeg | in\_stock | 231 | 366100 | 4.59 | USD | 0.04 | fl oz | $0.04/fl oz |
| 2 | 2 | items\_162737-16960902 | 16960902 | Wegmans Vitamin D Whole Milk | wegmans | 0.5 gal | https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large\_75cc9c25-7e8f-477c-8f4e-39b2a28cf664.jpeg | in\_stock | 231 | 366100 | 3.09 | USD | 0.05 | fl oz | $0.05/fl oz |
| 3 | 3 | items\_162737-16960897 | 16960897 | Wegmans 2% Reduced Fat Milk | wegmans | 0.5 gal | https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large\_0183ef0a-eb36-4f87-9473-7e12e1a3c002.jpeg | in\_stock | 231 | 366100 | 3.09 | USD | 0.05 | fl oz | $0.05/fl oz |

Recorded from our API · 3 items shown · 15 datapoints per item GET /v1/instacart/search?query=milk&zip=10016

15 datapoints

### Identity

-   id string
-   product\_id string
-   name string
-   brand string
-   retailer\_id string
-   shop\_id string

### Reputation

-   image url

### Price

-   price number
-   currency string
-   unit\_price number
-   unit\_price\_text string

### Other

-   position integer
-   size string
-   availability string
-   unit string

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/instacart/search?query=milk&zip=10016" \
  -H "X-API-Key: $API_KEY"
```

Instacart · 3 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

| Endpoint | Required parameters | Returns | Cost |
| --- | --- | --- | --- |
| [GET `/v1/instacart/product`](https://perceptlayer.com/apis/instacart/product) | `id` +2 optional | `product` | 1 credit |
| [GET `/v1/instacart/search`](https://perceptlayer.com/apis/instacart/search) | `query` +3 optional | `position` `id` `product_id` `name` `brand` `size` +9 more | 1 credit |
| [GET `/v1/instacart/stores`](https://perceptlayer.com/apis/instacart/stores) | `zip` | `requested_zip` `market` `stores` | 1 credit |

Overview

## About the Instacart API

## What you can get

The Instacart API returns Instacart grocery products, prices and stores as JSON through 3 endpoints.

-   **Search:** `search` takes a `query`, with `zip`, `retailer` and `page` ( `1`).
-   **Products:** `product` takes an `id`, with `zip` and `retailer`.
-   **Stores:** `stores` takes a `zip`.

The recorded `search` for "milk" in ZIP `10016` returns `items`, each with `position`, `id`, `product_id`, `name`, `brand`, `size`, `image`, `availability`, `retailer_id`, `shop_id`, `price`, `currency`, `unit_price`, `unit` and `unit_price_text`. It reports a `count` of 14 with `has_next_page` false. The first item is Lucerne Whole Milk, 128 fl oz, at 5.99 `USD`, or `$0.05/fl oz`.

## How a call works

Search, then read the product: `GET /v1/instacart/search?query=milk&zip=10016`, with your key in the `X-API-Key` header, returns each item's `id`. Pass that to `product` with the same `zip`, for example `GET /v1/instacart/product?id=items_24841-17652382&zip=10016`. It returned a `description` and `nutrition`, with `serving_size`, `servings_per_container` and a list of `nutrients`. To see which stores serve an area, call `GET /v1/instacart/stores?zip=10016`, which returned a `count` of 342 stores, each with `shop_id`, `retailer_id`, `slug`, `name` and `categories`. 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) [Albert Heijn](https://perceptlayer.com/apis/albert-heijn) [ALDI SÜD](https://perceptlayer.com/apis/aldi-sued) [Alibaba](https://perceptlayer.com/apis/alibaba) [AliExpress](https://perceptlayer.com/apis/aliexpress) [Allegro](https://perceptlayer.com/apis/allegro) [ALTERNATE](https://perceptlayer.com/apis/alternate) [Alza](https://perceptlayer.com/apis/alza) [Amazon](https://perceptlayer.com/apis/amazon) [Americanas](https://perceptlayer.com/apis/americanas) [Aponeo](https://perceptlayer.com/apis/aponeo)

Use cases

### Compare grocery prices by \`unit\_price\` across brands

`` Use the Instacart API to compare grocery prices by `unit_price` across brands `` 

### Track prices for the same product in different ZIP codes

`Use the Instacart API to track prices for the same product in different ZIP codes` 

### List the stores and retailers that serve a ZIP code

`Use the Instacart API to list the stores and retailers that serve a ZIP code` 

### Pull \`nutrition\` facts into a meal-planning or diet app

`` Use the Instacart API to pull `nutrition` facts into a meal-planning or diet app `` 

FAQ

## Questions

**How much does the Instacart API cost?**

Each successful call costs one credit, whichever endpoint you call. New accounts get free credits to start, and credit packs bring the price down as you scale.

**Why do I pass a ZIP code?**

Stores, prices and availability depend on location. \`stores\` needs a \`zip\`, and \`search\` and \`product\` take one to return results for that area.

**What format are responses in?**

Every endpoint returns JSON, with no HTML parsing on your side.

**Do I need an Instacart account?**

No. You call this Instacart API with your Perceptlayer key in the \`X-API-Key\` header, with no Instacart login.

**Is this the official Instacart API?**

No. Perceptlayer is an independent service and is not affiliated with Instacart. It returns Instacart data as JSON with a Perceptlayer key, so there is no Instacart developer account, app review or partner approval to get first. It only reads data: if Instacart has an official API and you need to act on your own Instacart account, such as posting, managing orders or reading private data, use that one.

**Should I build an Instacart scraper instead?**

You can, but an Instacart scraper is code you maintain: page changes break it, requests get blocked, and Instacart's terms govern how you collect data. The Instacart 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 Instacart 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)
