# Instacart Scraper (`crawloop/instacart-scraper`) Actor

Scrape Instacart grocery search by US ZIP. Export product name, brand, size, price, unit price, stock, and store. JSON for price checks and retail research.

- **URL**: https://apify.com/crawloop/instacart-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Instacart Scraper

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by Instacart (Maplebear Inc.) or its affiliates. Data is read from publicly accessible grocery search results only. No login. You are responsible for complying with applicable law and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

Instacart grocery search by US ZIP: product name, brand, size, current price, unit price, stock, and the store that serves that ZIP. Each dataset row is one product at one store. Use it as an Instacart scraper and an Instacart API alternative from Python, Node.js, or MCP.

| Grocery search | US store prices | US weekly ad | EU leaflets | Chain menus |
| :--- | :--- | :--- | :--- | :--- |
| Instacart Scraper ◄── you are here | [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) | [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) | [Lidl Weekly Offers Scraper](https://apify.com/crawloop/lidl-weekly-offers-scraper) | [DoorDash Menu Scraper](https://apify.com/crawloop/doordash-menu-scraper) |

### When to use

- Check grocery prices for a search term in one US ZIP
- Compare the same query across a few stores that deliver there
- Export name, brand, size, price, and stock to JSON

This Actor reads search results for the ZIP you provide. It does not place orders, read accounts, or collect shopper reviews.

### Key features

- US ZIP plus one or more search queries
- Store name, product name, brand, size, price, unit price, and stock
- Up to 12 stores per run, in the order returned for that ZIP
- One row per product at a store
- HTTP fetch, 256 MB, no browser

### Input

| Field | Required | Description |
| :--- | :--- | :--- |
| `queries` | Yes | Search terms, such as `milk` |
| `postalCode` | Yes | Five-digit US ZIP. Prices and stores follow this ZIP |
| `maxRetailers` | No | How many stores to include. Default 4, maximum 12 |
| `maxItems` | No | Stop after this many rows. Default 20, maximum 500 |

#### Input example

```json
{
  "queries": ["milk"],
  "postalCode": "10001",
  "maxRetailers": 4,
  "maxItems": 20
}
```

### Output

| Field | Description |
| :--- | :--- |
| `query` | Search term |
| `postalCode` | ZIP used for the lookup |
| `retailerName` | Store name |
| `retailerSlug` | Store slug |
| `shopId` | Shop id for that store location |
| `productId` | Product id |
| `name` | Product name |
| `brandName` | Brand |
| `size` | Package size |
| `price` | Current price in USD |
| `priceText` | Price label |
| `fullPriceText` | Regular price label when a discount is shown |
| `unitPriceText` | Unit price label |
| `currency` | `USD` |
| `inStock` | Availability flag |
| `stockLevel` | Stock label |
| `onSale` | On-sale flag |
| `category` | Category name |
| `imageUrl` | Product image |
| `productUrl` | Store product path |
| `scrapedAt` | UTC time the row was built |

#### Output example

```json
{
  "query": "milk",
  "postalCode": "10001",
  "retailerName": "Costco",
  "retailerSlug": "costco",
  "shopId": "968",
  "productId": "16902650",
  "name": "Kirkland Signature Whole Milk, 1 gal",
  "brandName": "kirkland signature",
  "size": "1 gal",
  "price": 3.79,
  "priceText": "$3.79",
  "fullPriceText": null,
  "unitPriceText": "$0.03/fl oz",
  "currency": "USD",
  "inStock": true,
  "stockLevel": "inStock",
  "onSale": false,
  "category": "Plain Milk",
  "imageUrl": "https://www.instacart.com/image-server/197x197/filters:fill(FFFFFF,true):format(jpg)/d2lnr5mha7bycj.cloudfront.net/product-image/file/large_example.jpeg",
  "productUrl": "https://www.instacart.com/store/costco/products/16902650",
  "scrapedAt": "2026-09-29T16:00:00+00:00"
}
```

### Use cases

- **ZIP price check** — export milk, eggs, or a brand search for one delivery area
- **Store comparison** — keep the same query across the first few stores in that ZIP
- **Assortment snapshot** — capture name, size, and stock for a short list of queries

### Integration examples

Replace `APIFY_TOKEN` with your Apify token. The Actor name is `crawloop/instacart-scraper`.

#### Node.js

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("crawloop/instacart-scraper").call({
  queries: ["milk"],
  postalCode: "10001",
  maxRetailers: 4,
  maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("crawloop/instacart-scraper").call(run_input={
    "queries": ["milk"],
    "postalCode": "10001",
    "maxRetailers": 4,
    "maxItems": 20,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~instacart-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"queries\":[\"milk\"],\"postalCode\":\"10001\",\"maxItems\":20}"
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call this Actor by its Store name.

Example prompts:

- "Run Instacart Scraper for milk in ZIP 10001 and return store, name, size, and price as JSON"
- "Scrape Instacart for eggs in ZIP 94105, max 4 stores, and list what is in stock"
- "Chain Instacart Scraper for milk in ZIP 10001, then Walmart Scraper for milk in the same ZIP"

### Suite next step

After Instacart search prices, run [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) for ZIP-local Walmart comps. For weekly circulars, use [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) in the US or [Lidl Weekly Offers Scraper](https://apify.com/crawloop/lidl-weekly-offers-scraper) in Europe.

### Related Actors

- Instacart Scraper ◄── you are here
- [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) — ZIP-local Walmart prices and stock
- [Aldi Weekly Ad Scraper](https://apify.com/crawloop/aldi-weekly-ad-scraper) — ALDI US weekly ad and ALDI Finds
- [Lidl Weekly Offers Scraper](https://apify.com/crawloop/lidl-weekly-offers-scraper) — Lidl weekly leaflets
- [DoorDash Menu Scraper](https://apify.com/crawloop/doordash-menu-scraper) — chain restaurant menu items

### FAQ

**Does the price follow the ZIP I enter?**\
Yes. Stores and prices are loaded for that five-digit US ZIP.

**Can I compare several stores?**\
Set `maxRetailers`. The run keeps the first stores returned for that ZIP, up to 12.

**What if the query matches nothing?**\
The run finishes and saves no rows for that query.

**Which country works?**\
US ZIP codes. Other countries are outside this Actor.

# Actor input Schema

## `queries` (type: `array`):

Grocery search terms, such as milk or whole milk gallon.

## `postalCode` (type: `string`):

Five-digit US ZIP. Prices and stores are for this delivery area.

## `maxRetailers` (type: `integer`):

How many stores serving this ZIP to include, in Instacart's store order.

## `maxItems` (type: `integer`):

Stop after this many product rows across all queries and stores.

## Actor input object example

```json
{
  "queries": [
    "milk"
  ],
  "postalCode": "10001",
  "maxRetailers": 4,
  "maxItems": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "milk"
    ],
    "postalCode": "10001"
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/instacart-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["milk"],
    "postalCode": "10001",
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/instacart-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "milk"
  ],
  "postalCode": "10001"
}' |
apify call crawloop/instacart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/instacart-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8D2MdUFEJIPhw90E1/builds/oYMCBfFlWajZ8oKQU/openapi.json
