# Instacart Scraper: Grocery Prices by Store (`memo23/instacart-scraper`) Actor

Compare Instacart grocery prices across stores at one US ZIP. Search a product at Costco, Safeway and the other stores nearby, or list every store that delivers there. Each row has the price, sale price, unit price, size, brand, stock and the store address. JSON or CSV out.

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

## Pricing

from $1.20 / 1,000 product or stores

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: Grocery Prices by Store

**The price each store quotes for a product, at one US ZIP.** Search milk at Costco and Safeway, or list every store that delivers to that ZIP. Each product row has the price, the struck-through regular price when there is one, the unit price, the size, the brand, the stock and the store. JSON or CSV out.

### How it works

![How the Instacart Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-instacart.png)

### Why use this scraper?

- **Several stores in one run.** One search word is checked at every store you name, so the dataset is a price comparison.
- **The store stays on the row.** Banner, delivery or pickup, and the branch address when you named the store. A grocery price without its store is not a fact.
- **Unit prices, where the store prints them.** Price per ounce, pound or count, so a gallon and a half-gallon can be compared.
- **A sale is a struck-through price.** `onSale` is set when the store shows a regular price above the one you pay.
- **Store discovery.** Ask which stores serve a ZIP before you decide what to price, with the address and, if you turn it on, the department names.

### Overview

Instacart is a local marketplace. The same milk is one price at Costco and another at Safeway, and the stores that exist depend on the ZIP. This actor returns the price the store shows for that ZIP.

It is built for price comparison, meal-planning apps, retail analysts and anyone tracking a grocery list across banners. A search run is one row per product. A store run is one row per store.

One search word at one store returns the products that store shows for that word, often a few dozen, not the whole catalog. Department links are skipped. Customer reviews are not part of the product. US ZIP codes only.

### Supported inputs

| Input | What you enter | What comes back |
|---|---|---|
| **Search products** | Search words, store names, a ZIP | One row per product, at each named store. Leave stores empty to walk the stores that serve the ZIP until Maximum rows. |
| **Find stores** | A ZIP | One row per store that serves it: name, delivery or pickup, address, categories. Turn on Include departments for the aisle names. |
| **Paste links** | An Instacart search, product or store link | The search, that product, or the store. A link that asks for page 2 returns the same first page. A department link is skipped. |

**Not supported:** department pages, customer reviews, Canada, and anything that requires a login.

### Use cases

| Who | What they do with it |
|---|---|
| **Price comparison** | Run one word at every nearby banner and sort by unit price before ordering. |
| **Meal planning** | Check a shopping list across retailers for a ZIP. |
| **Retail analysts** | Track how a price and its unit price move store by store. |
| **Deal watchers** | Keep only rows where the regular price is struck through. |
| **Market research** | Build a grocery basket across US ZIP codes. |

### How to use it

1. Pick Search products, Find stores, or Paste links.
2. Set the US ZIP. Add search words and store names, or paste links.
3. Set Maximum rows. A free plan stops at 20.
4. Run, then download JSON, CSV or Excel.

Compare one word at two stores:

```json
{
  "mode": "search",
  "queries": ["organic milk"],
  "retailers": ["costco", "safeway"],
  "postalCode": "10001",
  "sortBy": "unitPriceAsc",
  "maxItems": 40
}
```

List the stores that serve a ZIP, with departments:

```json
{
  "mode": "store",
  "postalCode": "94105",
  "includeDepartments": true,
  "maxItems": 50
}
```

Read pasted links:

```json
{
  "mode": "url",
  "urls": [
    "https://www.instacart.com/store/costco/s?k=greek+yogurt",
    "https://www.instacart.com/store/costco/products/19208138"
  ],
  "postalCode": "94105",
  "maxItems": 25
}
```

A store name is the piece after `/store/` in the address. In `instacart.com/store/safeway/storefront` the name is `safeway`. `Whole Foods` is matched to the store at your ZIP. If nothing matches, the run says so.

Latitude and longitude are optional. They choose which stores are nearby. The ZIP still selects the prices. If the point is more than 50 miles from the ZIP center, the run warns you.

### Output

Search and link runs return product rows. Find stores returns store rows. The same product at the same store is saved once.

#### Product

```json
{
  "recordType": "product",
  "name": "Kirkland Signature Whole Milk, 1 Gallon, 2-count",
  "brand": "kirkland signature",
  "size": "each",
  "price": 9.19,
  "priceString": "$9.19",
  "fullPrice": null,
  "onSale": false,
  "unitPrice": 0.04,
  "unitPriceString": "$0.04/fl oz",
  "pricingUnit": "fl oz",
  "available": true,
  "stockLevel": "highlyInStock",
  "stockLevelLabel": "Many in stock",
  "dietaryAttributes": [],
  "retailerName": "Costco",
  "retailerSlug": "costco",
  "serviceType": "delivery",
  "storeAddress": "450 10th St, San Francisco, CA 94103",
  "productUrl": "https://www.instacart.com/store/costco/products/19208138-kirkland-signature-homogenized-milk-2-gal-2-gal",
  "searchQuery": "milk",
  "scrapedAt": "2026-11-24T10:09:58.358Z"
}
```

That row is from a Costco search for milk at ZIP 94105. `fullPrice` is present only while the item is discounted. `storeAddress` is filled when you name the store, or when the link names it. A search that walks every nearby store leaves the address empty.

`image` and `imageUrl` are the same picture. `brand` and `brandName` are the same name. `url` repeats `productUrl`.

#### Store

`recordType` is `store`. The row has `retailerName`, `retailerSlug`, `retailerType`, `serviceType`, `address`, `latitude`, `longitude`, `categories`, `departments`, `departmentCount` and `storefrontUrl`. Delivery and pickup are separate rows when both serve the ZIP.

### Key fields

| Field | Meaning |
|---|---|
| `price` | Number, for filters and arithmetic. `priceString` is how the store prints it. |
| `fullPrice` | The struck-through regular price. Empty when the item is not discounted. |
| `onSale` | True when a regular price is shown above the current price. |
| `unitPrice` | Price per unit, when the store prints one. `pricingUnit` is that unit, such as `fl oz`. |
| `stockLevel` | The store's stock label, such as `highlyInStock`. `stockLevelLabel` is the words on the page, such as `Many in stock`. |
| `dietaryAttributes` | Tags the store prints, such as Vegan. |
| `retailerSlug` | Store name as it appears in an Instacart address. |
| `serviceType` | `delivery` or `pickup`. |
| `storeAddress` | Street address of the branch, when the store was named. |

### FAQ

**Why do I only get a few dozen products for a word?**
A store shows one page of results for a search word. A narrow word (`greek yogurt`) is a closer list than a broad one (`yogurt`). The run says how many came back. It does not invent a second page.

**Why is the address empty?**
The branch address is added when you name the store, or when you paste a link that names it. A search across every nearby store skips the address so the run stays on the products.

**Can I watch price changes?**
Run the same input on a schedule and diff the dataset on `recordId`. This actor returns the current rows. It does not itself drop the unchanged ones.

**Which ZIP codes work?**
US five-digit ZIP codes. Canada is not covered.

**What does a free plan get?**
20 rows. Set Maximum rows to 0 on a paid plan for no cap other than your run's cost limit.

### Support

Open an issue on the actor's Issues tab. Include the run ID, the ZIP, the store name and the search word.

### Additional services

Need a private feed, a fixed basket of products, or a schedule that lands in your warehouse? Use the contact form on the actor page.

### Explore more scrapers

- [Costco Scraper](https://apify.com/memo23/costco-scraper)
- [ALDI Scraper](https://apify.com/memo23/aldi-scraper)
- [Tesco Scraper](https://apify.com/memo23/tesco-scraper)
- [Walmart Scraper](https://apify.com/memo23/walmart-scraper)

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/instacart-scraper`).

**Purpose:** Returns public Instacart product prices for a US ZIP, or the stores that serve that ZIP. One row per product, or one row per store.

**Minimal input:**

```json
{ "queries": ["milk"], "retailers": ["costco"], "postalCode": "94105", "maxItems": 20 }
```

**Output:** recordType, name, brand, size, price, priceString, fullPrice, onSale, unitPrice, unitPriceString, pricingUnit, available, stockLevel, stockLevelLabel, dietaryAttributes, retailerName, retailerSlug, serviceType, storeAddress, productUrl, searchQuery, scrapedAt. Store rows use address, categories, departments and storefrontUrl instead of the product fields.

**Behaviors an agent should know:**

- Always set `postalCode` and `maxItems`. Prices belong to a ZIP.
- `retailers` are store slugs such as `costco`. An empty list walks nearby stores until `maxItems`.
- `sortBy` is `bestMatch`, `priceAsc`, `priceDesc`, `unitPriceAsc` or `unitPriceDesc`.
- `onSaleOnly` keeps rows with a struck-through regular price. `inStockOnly` drops unavailable products.
- One search word returns the products the store shows for it, not the whole catalog.
- Department links are skipped. Customer reviews are not returned. US ZIPs only.
- The same product at the same store is saved once per run.
- An empty dataset means nothing matched. It is not a failed run.
- Pay-per-event: one actor-start charge plus one charge per saved row. See the Pricing tab. Free plans are capped at 20 rows.

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Maplebear Inc. (Instacart) or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available Instacart store and product pages. It does not log in or bypass authentication, and it does not use paid or subscriber-only features. Users are responsible for ensuring their use complies with Instacart's Terms of Service, applicable data-protection law (GDPR, CCPA, etc.), and any contractual obligations of their own organization.

### SEO Keywords

Instacart scraper, scrape Instacart, Instacart grocery prices, Instacart API, Instacart.com scraper, Apify Instacart, grocery price scraper, supermarket price comparison, unit price data, Costco Instacart prices, Safeway price scraper, grocery price index, retail price tracking, US grocery data, delivery price comparison, in-stock grocery data, grocery basket data, CPG price monitoring

# Actor input Schema

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

US ZIP the prices belong to. Example: 94105. Store names are matched to the banners that deliver or pick up there.

## `latitude` (type: `number`):

Optional. A point more precise than the ZIP center. Set it with Longitude. Nearby stores are chosen from this point. The ZIP still picks the prices.

## `longitude` (type: `number`):

Optional. Set it with Latitude.

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

What to look up, one per line. Example: milk. Each word is checked at every store you name. A specific word returns a tighter list than a broad one.

## `retailers` (type: `array`):

Banners to compare, one per line, written the way they appear after /store/ in an Instacart address. Example: costco. Empty means walk the banners at this ZIP until the row cap.

## `mode` (type: `string`):

Search checks each word at the stores you name. Stores lists the banners at the ZIP. Links reads an Instacart search, product or store address.

## `urls` (type: `array`):

Used when What to collect is Paste links. A search link returns that search. A product link returns that product. A store link returns the store. Aisle links are skipped.

## `sortBy` (type: `string`):

How one store orders its matches. Best match keeps the store's own order.

## `maxPrice` (type: `number`):

Skip anything above this many dollars. A product with no price is skipped too.

## `minPrice` (type: `number`):

Skip anything under this many dollars. A product with no price is skipped too.

## `onSaleOnly` (type: `boolean`):

Keep rows where the store shows a higher regular price crossed out.

## `inStockOnly` (type: `boolean`):

Drop products the store marks unavailable.

## `includeDepartments` (type: `boolean`):

On Find stores, add the aisle names. Product rows ignore this.

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

Stop after this many products or stores. 0 means no cap other than the plan limit. A free plan stops at 20. The form starts at 20 so a first run stays small.

## `maxConcurrency` (type: `integer`):

How many store searches to run at once. Default is 4. Lower it if a run slows down or fails.

## `proxy` (type: `object`):

Residential proxies recommended. The default works out of the box.

## Actor input object example

```json
{
  "postalCode": "94105",
  "queries": [
    "milk"
  ],
  "retailers": [
    "costco"
  ],
  "mode": "search",
  "urls": [
    "https://www.instacart.com/store/costco/s?k=milk"
  ],
  "sortBy": "bestMatch",
  "onSaleOnly": false,
  "inStockOnly": false,
  "includeDepartments": false,
  "maxItems": 20,
  "maxConcurrency": 4
}
```

# Actor output Schema

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

Every saved row: a product with its price and store, or a store that serves the ZIP.

# 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 = {
    "postalCode": "94105",
    "queries": [
        "milk"
    ],
    "retailers": [
        "costco"
    ],
    "urls": [
        "https://www.instacart.com/store/costco/s?k=milk"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = {
    "postalCode": "94105",
    "queries": ["milk"],
    "retailers": ["costco"],
    "urls": ["https://www.instacart.com/store/costco/s?k=milk"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/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 '{
  "postalCode": "94105",
  "queries": [
    "milk"
  ],
  "retailers": [
    "costco"
  ],
  "urls": [
    "https://www.instacart.com/store/costco/s?k=milk"
  ],
  "maxItems": 20
}' |
apify call memo23/instacart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/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/7xf85r3xeeSmjJErD/builds/IyTEQT2lQH9QzXlqF/openapi.json
