# Instacart Scraper - $0.90 / 1000 Products (`scrapeunblocker/instacart-scraper`) Actor

Scrape any retailer on Instacart (Costco, ALDI, Publix, Safeway, Albertsons, Vons, Kroger, CVS, Sprouts...) at the store for your ZIP: price, sale price, unit price, deals, stock, rating, ingredients. $0.90 per 1000 products.

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

## Pricing

from $0.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Scrape **any retailer on Instacart** as clean JSON: **Costco, ALDI, Publix, Safeway, Albertsons, Vons, Jewel-Osco, ACME, Kroger, Sprouts, Wegmans, Sam's Club, CVS, Walgreens, Petco** and hundreds more. Prices and stock come from the **store that serves your ZIP code**, and every item says which store that is. Each product has its name, brand, size and pack size, USD **price, sale price and was-price, unit price** (per oz, lb or count), deals such as "Buy 1, get 1 free", **stock level**, rating and review count, category, store-brand flag, dietary tags, image and link. Product mode adds the **description, ingredients, directions, warnings** and the image gallery.

Instacart prices can be higher than the retailer's in-store prices; they are the prices Instacart shoppers see for that store.

### Features

- **Search mode** - the products each retailer lists for each search term (`queries` x `retailers`), up to 300 per search in Instacart's order.
- **Product mode** - one product per input (`products`: product id, item id from a search, or product link) with description and ingredients.
- **Any Instacart retailer** - give its slug, the part after `/store/` in an Instacart link (`costco`, `safeway`, `jewel-osco`, ...). Safeway's sister banners (Albertsons, Vons, Jewel-Osco, ACME, Randalls, Tom Thumb, Pavilions, Haggen...) work the same way.
- **Local prices** - `zipCode` picks the delivery area; the answer names the store (shop id, location id, ZIP).
- **Many inputs per run** - retailers, search terms and products in parallel.

### Use cases

- **Grocery price tracking** - the same basket at Costco, Safeway and ALDI, ZIP by ZIP.
- **Promotion monitoring** - sale prices and multibuy deals across retailers.
- **Assortment research** - which brands a store carries for a category and how they rank.
- **Product catalogues** - ingredients, descriptions and images for a list of products.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `search` | `search` or `product`. |
| `retailers` | array | `costco` | Instacart retailer slugs (or store links). Every search term or product id runs at every retailer. |
| `queries` | array | `milk` | Search terms (search mode). |
| `products` | array | - | Product ids, item ids or product links (product mode). |
| `zipCode` | string | - | 5-digit US ZIP code; empty = 94105 (San Francisco). |
| `maxResults` | integer | `30` | Products per retailer and search term (1-300). |
| `concurrency` | integer | `3` | Inputs processed at the same time (1-5). |

#### Example input

```json
{
  "mode": "search",
  "retailers": ["costco", "safeway", "aldi"],
  "queries": ["greek yogurt", "eggs"],
  "zipCode": "94110",
  "maxResults": 60
}
```

### Output

One dataset item per product:

```json
{
  "mode": "search",
  "input": "greek yogurt",
  "position": 1,
  "store": {
    "shopId": "5468",
    "retailerId": "1",
    "retailerLocationId": "75",
    "retailerName": "Safeway",
    "serviceType": "delivery",
    "postalCode": "94110",
    "zoneId": "1"
  },
  "id": "items_75-35877468",
  "productId": "35877468",
  "name": "Lucerne Strained Greek Nonfat Plain Yogurt",
  "brand": "Lucerne",
  "brandId": "48795",
  "size": "32 oz",
  "packageSize": "32 oz",
  "price": 6.99,
  "priceText": "$6.99",
  "wasPrice": null,
  "onSale": false,
  "unitPrice": { "price": 0.22, "per": "oz", "text": "$0.22/oz" },
  "soldBy": "each",
  "estimatedWeight": null,
  "promotions": [],
  "available": true,
  "stockLevel": "in_stock",
  "stockText": null,
  "rating": null,
  "reviewCount": null,
  "category": "Greek & Icelandic Yogurt",
  "storeBrand": true,
  "dietary": ["Fat-free"],
  "aisle": null,
  "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_afba90e7-97e3-4fc2-816f-94593ebb5f27.png",
  "sponsored": false,
  "url": "https://www.instacart.com/products/35877468-lucerne-nonfat-plain-strained-greek-yogurt-32-oz?retailerSlug=safeway",
  "retailer": "safeway"
}
```

A product-mode item adds `description`, `ingredients`, `directions`, `warnings`, `sections` (every text block of the product page) and `images`.

`stockLevel` is `high`, `in_stock`, `low` or `out_of_stock`. `soldBy` is `each` or `weight`; for goods sold by weight `priceText` shows the estimated package price (`$11.99 /pkg (est.)`), `estimatedWeight` the weight it assumes and `unitPrice` the price per lb.

The key-value store holds `SEARCHES` (per retailer and search term: the store, total results on Instacart, products collected) and `ERRORS` (inputs without products and why).

### Pricing

**$0.90 per 1000 products** (pay per result). Searches or products that return nothing (no match, unknown retailer or product, no store for the ZIP code, a failed call) are listed in `ERRORS` and **not billed**.

### Notes

- Instacart returns at most about 300 products for a search; `totalResults` in `SEARCHES` says how many it has.
- Prices are the ones Instacart shows for that store and can differ from the retailer's own website or shelf prices.
- A retailer with no store for the ZIP code returns an error for that input (not billed); some retailers serve every ZIP code from a nearby or shipping store.
- This actor is not affiliated with Instacart or any retailer.
- Powered by [ScrapeUnblocker](https://www.scrapeunblocker.com).

# Actor input Schema

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

Search: the products each retailer lists for each search term. Product: one product per input, with description, ingredients, directions, warnings and images.

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

Instacart retailer slugs, the part after /store/ in an Instacart link: costco, aldi, publix, safeway, albertsons, vons, jewel-osco, acme-markets, kroger, sprouts, wegmans, sams-club, cvs, walgreens, petco and many more. Every search term (or product id) is run at every retailer. One per line.

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

Used when What to scrape = Search. What to search for, e.g. milk, greek yogurt, paper towels. One per line.

## `products` (type: `array`):

Used when What to scrape = Product. Instacart product ids (16902650), item ids from a search (items_284-16902650) or product links (https://www.instacart.com/products/16902650-...). A link with retailerSlug is asked at that retailer only. One per line.

## `zipCode` (type: `string`):

5-digit US ZIP code of the delivery area. Prices and stock belong to the store serving it, and every item says which store that is. Empty = 94105 (San Francisco).

## `maxResults` (type: `integer`):

Upper limit of products for each retailer and search term (1-300), in Instacart's order.

## `concurrency` (type: `integer`):

How many searches or products to process at the same time (1-5).

## Actor input object example

```json
{
  "mode": "search",
  "retailers": [
    "costco"
  ],
  "queries": [
    "milk"
  ],
  "zipCode": "",
  "maxResults": 30,
  "concurrency": 3
}
```

# Actor output Schema

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

One item per product with the input it came from, its position and the store that priced it

## `searches` (type: `string`):

Per retailer and search term: the store used, total results on Instacart and products collected

## `errors` (type: `string`):

Inputs that returned no products (no match, unknown retailer or product, no store for the ZIP code, blocked), with the reason (not billed)

# 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 = {
    "retailers": [
        "costco"
    ],
    "queries": [
        "milk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeunblocker/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 = {
    "retailers": ["costco"],
    "queries": ["milk"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeunblocker/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 '{
  "retailers": [
    "costco"
  ],
  "queries": [
    "milk"
  ]
}' |
apify call scrapeunblocker/instacart-scraper --silent --output-dataset

```

## MCP server setup

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