# Instacart Store Scraper (`datascrapers/instacart-store-scraper`) Actor

Extract department and aisle products from an Instacart store by store URL or store name and postal code.

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

## Pricing

from $1.70 / 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 Store Scraper** creates a structured dataset of grocery products collected from Instacart storefronts. Each dataset item is one product and can include the item and product ids, name, brand, size, price, offer, stock, rating, department, store, and postal code. Query the source with a store URL, store name, or postal code, optionally limit departments, cap results with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![Instacart Store Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/instacart-store-scraper/instacart-store-scraper-value-demo.gif)](https://apify.com/datascrapers/instacart-store-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | Instacart storefronts |
| Record unit | One product |
| Input methods | `startUrls`, `searchQueries`, `postalCode` |
| Main identifiers | `itemId`, `productId` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, and other Apify dataset exports |
| Update model | Fresh records per Actor run |
| Pricing | $2.00 per 1,000 products on the Free plan |

### Coverage and available records

Supported inputs are Instacart store URLs, store names in `searchQueries`, a postal code, and a street address. `departments` limits the aisles, such as `Pets`. `includeFeaturedCollections` adds featured collections when enabled. `serviceType` selects the shopping service, such as delivery.

`maxItems` caps products. Set `0` when you want every product in the selected departments. Inside one run, the same product is saved once even if it appears in more than one aisle.

The Actor collects the catalog returned for that store and postal code. It does not collect order history or shopper accounts.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| itemId | string | No | Stable item key used for deduplication | items_32608-94144 |
| productId | string | No | Instacart product id | 94144 |
| name | string | No | Product name | Milk-Bone Soft and Chewy Dog Treats, Chicken Recipe With Chicken Breast |
| brandName | string | Yes | Brand | milk-bone |
| size | string | Yes | Package size | 5.6 oz |
| price | number | Yes | Numeric price | 4.93 |
| priceString | string | Yes | Display price | $4.93 |
| currency | string | Yes | Currency symbol | $ |
| offerLabel | string | Yes | Promotion text | Buy 1, get 1 free |
| available | boolean | Yes | Whether the product is available | true |
| stockLevelLabel | string | Yes | Stock label | Many in stock |
| ratingStars | number | Yes | Star rating | 4.8 |
| ratingCount | integer | Yes | Rating count | 261 |
| storeName | string | Yes | Store | Publix |
| shopId | string | Yes | Store shop id | 195719 |
| postalCode | string | Yes | Postal code used for the catalog | 32080 |
| departmentName | string | Yes | Department | Pets |
| url | string | Yes | Product URL | https://www.instacart.com/products/94144-milk-bone-dog-treat-5-6-oz |

### Example dataset record

```json
{
  "itemId": "items_32608-94144",
  "productId": "94144",
  "name": "Milk-Bone Soft and Chewy Dog Treats, Chicken Recipe With Chicken Breast",
  "brandName": "milk-bone",
  "size": "5.6 oz",
  "price": 4.93,
  "priceString": "$4.93",
  "currency": "$",
  "offerLabel": "Buy 1, get 1 free",
  "available": true,
  "stockLevelLabel": "Many in stock",
  "ratingStars": 4.8,
  "ratingCount": 261,
  "storeName": "Publix",
  "shopId": "195719",
  "serviceType": "delivery",
  "postalCode": "32080",
  "departmentName": "Pets",
  "url": "https://www.instacart.com/products/94144-milk-bone-dog-treat-5-6-oz"
}
```

### Query and input reference

| Field | Required | Description |
|---|---|---|
| startUrls | No | Instacart store URLs |
| searchQueries | No | Store names |
| postalCode | No | Postal code for the catalog |
| streetAddress | No | Street address used to resolve the store |
| departments | No | Department names to include |
| includeFeaturedCollections | No | Include featured collections |
| serviceType | No | Shopping service, such as delivery |
| maxItems | No | Maximum products. `0` means the selected departments |
| proxyConfiguration | No | Apify proxy settings. A US residential proxy matches a US store |

Provide a store URL or store name, plus a postal code when the catalog depends on location.

### Retrieve the data through the API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/instacart-store-scraper").call(run_input={
    "startUrls": [{"url": "https://www.instacart.com/store/publix"}],
    "searchQueries": ["Publix"],
    "postalCode": "32080",
    "departments": ["Pets"],
    "maxItems": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["priceString"], item["storeName"])
```

### Data quality and record handling

Deduplicate on `itemId`. The Actor already keeps one row per `itemId` inside a run. Across runs, keep the first record for each `itemId` when you merge datasets. `productId` is the catalog id and can be shared across stores, so do not use it alone when you compare shops.

### Pricing and cost examples

Pay per event. The event is `dataset-item`. Prices are per 1,000 products. Platinum and Diamond use the Gold rate. Platform usage is not billed separately.

| Event | Free | Bronze | Silver | Gold |
|---|---:|---:|---:|---:|
| dataset-item | $2.00 | $1.90 | $1.80 | $1.70 |

A Free-plan run that saves 1,000 products costs $2.00. A run capped at 5 products costs $0.01.

### Limitations and responsible data use

Prices, offers, and stock follow the store and postal code. Another postal code can return a different catalog. Collect public product fields only, and keep `maxItems` small while you confirm a store.

### Dataset questions

#### What is one dataset item?

One product in one store and postal code.

#### Which field is the deduplication key?

`itemId`.

#### Does a product in two departments appear twice?

No. One run keeps a single row for each `itemId`.

### Related datasets from Data Scrapers

- [Carrefour Scraper](https://apify.com/datascrapers/carrefour-scraper) for grocery products
- [MediaMarkt Scraper](https://apify.com/datascrapers/mediamarkt-de-scraper) for retail products
- [TheFork Scraper](https://apify.com/datascrapers/thefork-scraper) for restaurant listings

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com.

# Actor input Schema

## `startUrls` (type: `array`):

Instacart store URLs, such as https://www.instacart.com/store/publix. A collection URL such as https://www.instacart.com/store/publix/collections/produce scrapes that aisle only.

## `searchQueries` (type: `array`):

Store names to find near the postal code when you do not have a URL, such as Publix or ALDI.

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

Postal code used to choose the nearby store location.

## `streetAddress` (type: `string`):

Optional street address. When empty, the postal code alone is used to pick the location.

## `departments` (type: `array`):

Optional aisle or department names to scrape, such as Produce or Pets. Leave empty to scrape every department.

## `includeFeaturedCollections` (type: `boolean`):

Also scrape promotional collections such as Sales and seasonal aisles. Departments are always included.

## `serviceType` (type: `string`):

Which shop to open when a retailer offers more than one.

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

Maximum number of products to save. Set to 0 to scrape every product in the selected aisles.

## `proxyConfiguration` (type: `object`):

Proxy settings. Residential proxies are used by default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.instacart.com/store/publix"
    }
  ],
  "searchQueries": [],
  "postalCode": "32080",
  "streetAddress": "",
  "departments": [
    "Pets"
  ],
  "includeFeaturedCollections": false,
  "serviceType": "any",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

Dataset of products extracted from the selected store aisles.

## `runStats` (type: `string`):

Record count and timestamps for this run.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.instacart.com/store/publix"
        }
    ],
    "postalCode": "32080",
    "departments": [
        "Pets"
    ],
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/instacart-store-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 = {
    "startUrls": [{ "url": "https://www.instacart.com/store/publix" }],
    "postalCode": "32080",
    "departments": ["Pets"],
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/instacart-store-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 '{
  "startUrls": [
    {
      "url": "https://www.instacart.com/store/publix"
    }
  ],
  "postalCode": "32080",
  "departments": [
    "Pets"
  ],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call datascrapers/instacart-store-scraper --silent --output-dataset

```

## MCP server setup

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