# Instacart Storefront Price Scraper (`w3crawler/instacart-storefront-price-scraper`) Actor

Extract bounded public grocery prices from Instacart storefront pages with explicit source-access diagnostics.

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

## Pricing

from $2.99 / 1,000 storefront prices

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Storefront Price Scraper

Collect source-backed grocery prices from public Instacart storefront and product pages. Give the Actor a storefront URL to capture several product cards, or a store-specific product URL to capture one item, and it returns the product identity, current and regular price, currency, unit price, package size, brand, retailer context, promotion, stock state, and images that the page exposes. Each price keeps the requested URL, the page that supplied it, its position on the page, and an extraction timestamp.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/instacart-storefront-price-scraper) and select **Try for free**, or open the **Input** tab.
2. Add official HTTPS Instacart storefront or product URLs to `startUrls`. Include `?retailerSlug=` on product URLs when you need a specific retailer's price.
3. Set `maxItems` to the number of prices you want and keep `maxPages` at 1 unless you enable `followPagination`.
4. Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check targets, pages, price records, and any blocked or empty pages.

### Input

Supply a target in `startUrl` or `startUrls`; `startUrl` wins when both are set, and `url` is read only when both are empty. If no target is supplied, the Actor falls back to its bundled grape product page. The other fields are optional, and the example below mirrors `.actor/input.json`.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `startUrl` | string | Optional | Not supplied | Single official HTTPS Instacart storefront or product URL. Takes precedence over `startUrls` and `url`. |
| `startUrls` | object array | Optional | Three URLs: Kent's Market grapes, ibuprofen, and the Sprouts storefront | Official HTTPS Instacart pages to inspect, in order. Each entry is an object with a `url` string; invalid or non-Instacart entries become diagnostic rows. |
| `url` | string | Optional | Not supplied | Compatibility alias read only when `startUrl` and `startUrls` are both empty. |
| `maxItems` | integer | Optional | `5` | Maximum price records saved, 1–100. The bundled example uses 5; the schema default is 25. |
| `maxPages` | integer | Optional | `3` | Maximum pages requested in the run, 1–10. The bundled example uses 3; the schema default is 1. |
| `followPagination` | boolean | Optional | `false` | Follow same-host `rel=next` links from a storefront, up to `maxPages`. Only official Instacart hosts are followed. |
| `requestDelayMs` | integer | Optional | `0` | Pause before each page after the first and before retries, 0–10,000 ms. |
| `maxRequestRetries` | integer | Optional | `1` | Retries for timeouts, transport errors, and HTTP 5xx responses, 0–2. Login redirects, 401/403/429 responses, CAPTCHA, and verification pages stop immediately. |
| `timeoutSecs` | integer | Optional | `30` | Per-request timeout, 5–120 seconds. |
| `maxBytes` | integer | Optional | `5000000` | Largest response body retained per page, 100,000–5,000,000 bytes. |
| `userAgent` | string | Optional | Not supplied | Transparent user-agent string, up to 300 characters. No stealth or fingerprint spoofing is applied. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":true,"apifyProxyCountry":"US"}` | Optional Apify Proxy route. The bundled example enables US proxy traffic; set `useApifyProxy` to `false` for direct access. The bundled file also names an environment-specific proxy group, omitted here. |

Default input from `.actor/input.json`:

```json
{
  "startUrls": [
    {
      "url": "https://www.instacart.com/products/18602684-green-seedless-grapes-per-lb?retailerSlug=kents-market"
    },
    {
      "url": "https://www.instacart.com/products/220058-topcare-ibuprofen-200-mg-tablets-100-ct?retailerSlug=kents-market"
    },
    {
      "url": "https://www.instacart.com/store/sprouts/storefront"
    }
  ],
  "maxItems": 5,
  "maxPages": 3,
  "followPagination": false,
  "timeoutSecs": 30,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}
```

`requestDelayMs` and `maxBytes` keep their schema defaults of `0` and `5000000`. The bundled input has three targets, a five-record limit, three pages, and one retry. The saved rows below came from a separate four-target run with `maxItems: 6`, `maxPages: 4`, and two retries, which is why its summary reports six prices from four targets.

Each target is requested from an official HTTPS Instacart host, with no credentials, bounded retries, and no more than three redirects. Store-specific Apollo state is preferred, followed by Product JSON-LD, page-level Apollo state, and product-card HTML. A storefront URL can yield many cards, while a product URL normally yields one. An unauthenticated request can still be redirected to login or a security check; those outcomes are reported in `OUTPUT` and are never converted into a price.

### Output

Each normal row is one product price. Optional fields are omitted when the page does not publish them, and values are not inferred. A target that fails or exposes no price may add a small diagnostic row containing `url`, `error`, `errorCode`, and `scrapedAt`; filter on `recordType: "instacart-product-price"` before price analysis.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Always | Row discriminator; normal price rows use `instacart-product-price`. |
| `recordId` | string | Always | Deterministic price-record ID, prefixed `product-price_`. |
| `id` | string | Always | Stable product identity alias, prefixed `product_`. |
| `source` | string | Always | Source label, `Instacart`. |
| `url` | string | Always | Requested page URL that supplied the evidence. |
| `sourceUrl` | string | Always | Final page URL where the price was found, after redirects. |
| `productId` | string | Always | Product number used by Instacart, taken from the page or URL. |
| `itemId` | string | Always | Retailer-specific store item ID for this product. |
| `productName` | string | Always | Product name as displayed on the page. |
| `name` | string | Always | Product-name alias, matching `productName`. |
| `productUrl` | string | Always | Public Instacart product URL, which may omit the retailer query when the source does. |
| `brand` | string | When published | Brand name shown for the product. |
| `size` | string | Always | Package size or selling unit, such as `12 ct` or `per lb`. |
| `category` | string | When published | Instacart category or aisle label when the page exposes one. |
| `retailerSlug` | string | Always | Storefront slug, such as `kents-market` or `sprouts`. |
| `retailerName` | string | When published | Retailer display name when the payload includes it. |
| `retailerId` | string | Always | Instacart retailer ID for the storefront. |
| `postalCode` | string | When published | Storefront postal code when the page exposes one; not present in the saved run. |
| `price` | number | Always | Current price as a number, without a currency symbol. |
| `currency` | string | Always | ISO currency code, such as `USD`. |
| `priceString` | string | Always | Current price as displayed, including unit text such as `/lb`. |
| `regularPrice` | number | When published | Regular or pre-discount price when the page shows one. |
| `regularPriceString` | string | When published | Regular price as displayed, with its currency symbol. |
| `pricePerUnitString` | string | Always | Displayed unit price, such as `$0.23/oz`. |
| `promotion` | string | When published | Promotion text, such as `2% off` or `Buy 1, get 1 free`. |
| `discountPercent` | number | When published | Discount percentage reported by the page. |
| `available` | boolean | Always | Whether the product is available at this storefront. |
| `stockLevel` | string | Always | Raw stock marker, such as `inStock` or `Many in stock`. |
| `onSale` | boolean | Always | Whether the page presents sale evidence, separate from a promotion message. |
| `image` | string | Always | Primary product image URL. |
| `images` | string array | Always | Product image URLs found on the page; one entry in the saved run. |
| `description` | string | When published | Product description when the page publishes one. |
| `sourceDomain` | string | Always | Hostname of the product URL, normally `www.instacart.com`. |
| `cardPosition` | integer | Always | One-based position of the product among the cards parsed from that page. |
| `scrapedAt` | string | Always | UTC time the price row was saved, in ISO 8601 format. |
| `retrievedAt` | string | Always | Legacy-compatible timestamp alias matching `scrapedAt`. |

The example below is the complete real saved row for the ibuprofen product from the 2026-10-25 run. It retains the discount fields because that page exposed them.

```json
{
  "recordType": "instacart-product-price",
  "recordId": "product-price_495faf16531588b4d88d",
  "id": "product_9e24f3ae7e177a0a575d",
  "source": "Instacart",
  "url": "https://www.instacart.com/products/220058-topcare-ibuprofen-200-mg-tablets-100-ct?retailerSlug=kents-market",
  "sourceUrl": "https://www.instacart.com/products/220058-topcare-ibuprofen-200-mg-tablets-100-ct?retailerSlug=kents-market",
  "productId": "220058",
  "itemId": "260907749588",
  "productName": "TopCare Ibuprofen, 200 mg, Coated Tablets",
  "name": "TopCare Ibuprofen, 200 mg, Coated Tablets",
  "productUrl": "https://www.instacart.com/products/220058-topcare-ibuprofen-200-mg-tablets-100-ct?retailerSlug=kents-market",
  "brand": "topcare",
  "size": "100 ct",
  "category": "Pain & Fever Relievers",
  "retailerSlug": "kents-market",
  "retailerName": "Kent's Market",
  "retailerId": "2686",
  "price": 8.89,
  "currency": "USD",
  "priceString": "$8.89",
  "regularPrice": 9.09,
  "regularPriceString": "$9.09",
  "pricePerUnitString": "$0.09 each",
  "promotion": "2% off",
  "discountPercent": 2,
  "available": true,
  "stockLevel": "inStock",
  "onSale": true,
  "image": "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_a5821240-315d-459f-9f56-4ea1a7668824.png",
  "images": [
    "https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_a5821240-315d-459f-9f56-4ea1a7668824.png"
  ],
  "description": "TopCare Health 200 mg Ibuprofen 100 Coated Tablets",
  "sourceDomain": "www.instacart.com",
  "cardPosition": 1,
  "scrapedAt": "2026-10-25T20:50:53.371Z",
  "retrievedAt": "2026-10-25T20:50:53.371Z"
}
```

`price` and `regularPrice` are numeric fields for calculations; `priceString` and `regularPriceString` preserve the page's formatting. `onSale` can be true when Instacart shows a reduced price even if `promotion` is a multi-buy offer instead of a percentage. `cardPosition` restarts at 1 on every page, so it is a position within the page, not a global rank.

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT`.

| Field | Meaning |
| --- | --- |
| `status` | Actor outcome: `SUCCEEDED` when at least one price was saved or no target failed, otherwise `FAILED`. |
| `runStatus` | Canonical outcome that mirrors `status`. |
| `dataStatus` | Completeness: `COMPLETE`, `PARTIAL` (price rows plus any diagnostic or optional failure), `NO_RESULTS`, or `FAILED`. |
| `source` | Source label, `Instacart`. |
| `actor` | Actor slug recorded in the summary. |
| `targetCount` | Number of requested targets, including invalid entries. |
| `itemCount` | Price records plus diagnostic records counted for the run; a diagnostic that could not be written still counts here. |
| `priceRecordCount` | Normal `instacart-product-price` rows saved. |
| `diagnosticCount` | Failed, blocked, empty, or invalid targets recorded during the run. |
| `optionalFailureCount` | Non-fatal failures, such as a diagnostic row that could not be written. |
| `blockedCount` | Targets stopped by an access block or login redirect. |
| `dataAvailable` | Whether at least one price record was saved. |
| `pageCount` | Pages requested, capped by `maxPages`. |
| `sourceTransport` | Route used for the run: `direct`, `apify_proxy`, or `fixture`. |
| `fixture` | Whether the run read the bundled QA fixture instead of a live page. |
| `requestCount` | HTTP requests attempted, including retries. |
| `completedAt` | UTC time the summary was written, in ISO 8601 format. |
| `generatedBy` | Build metadata string recorded with the summary. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Prices were saved with no diagnostic or optional failure. |
| `SUCCEEDED` | `PARTIAL` | Prices were saved, but at least one target failed or exposed no price. Saved rows remain usable. |
| `SUCCEEDED` | `NO_RESULTS` | No target failed technically, but none exposed a public price. |
| `FAILED` | `FAILED` | No price was saved and at least one target failed. |

Example `OUTPUT` from the saved 2026-10-25 run:

```json
{
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "source": "Instacart",
  "actor": "instacart-storefront-price-scraper",
  "targetCount": 4,
  "itemCount": 6,
  "priceRecordCount": 6,
  "diagnosticCount": 0,
  "optionalFailureCount": 0,
  "blockedCount": 0,
  "dataAvailable": true,
  "pageCount": 4,
  "sourceTransport": "apify_proxy",
  "fixture": false,
  "requestCount": 4,
  "completedAt": "2026-10-25T20:50:59.307Z",
  "generatedBy": "OpenAI Codex with GPT-6"
}
```

The saved run requested four pages and saved six prices because the Sprouts storefront supplied three cards from one page. `fixture` is `false`, so every row came from a live public page.

### Coverage and limitations

The Actor reads public Instacart pages without an account, cookies, or a customer address. Prices and availability can depend on the storefront selected by `retailerSlug` or the store URL; the same product can cost different amounts at different retailers. A storefront page shows only the cards Instacart renders for that request, so a limited storefront may expose a fraction of the catalog.

Instacart may redirect an unauthenticated request to login or a security check even when a browser shows products. Those responses stop without retry and are counted in `diagnosticCount` or `blockedCount`; no price is estimated. The Actor does not solve CAPTCHAs or bypass access controls. Optional fields such as `brand`, `category`, `retailerName`, `postalCode`, `regularPrice`, `promotion`, and `description` appear only when the page supplies them.

A hidden `fixture: true` runner option loads a bundled HTML file for offline QA. It is not part of the published input schema; leave it unset for production, and treat summaries with `fixture: true` as non-live examples.

### Usage and support

Cost depends on Apify compute, the number of pages, response size, retries, and whether proxy traffic is enabled. A storefront URL can return many prices from one request, which is usually cheaper than one product URL per item. Start with one page and `maxItems` below 10, check `priceRecordCount` and `diagnosticCount`, then scale.

Use the [Actor Issues page](https://apify.com/w3crawler/instacart-storefront-price-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT` summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by Instacart. Use it only for public data and in accordance with Instacart's terms, robots guidance, and applicable law.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/instacart-storefront-price-scraper/changelog.md

# Actor input Schema

## `startUrl` (type: `string`):

Optional primary official HTTPS Instacart storefront or product page. It takes precedence over startUrls and url.

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

Public HTTPS Instacart storefront or product pages used when startUrl is empty. Store-specific product pages expose source-backed price, unit, retailer and availability state.

## `url` (type: `string`):

Compatibility alias used when startUrl and startUrls are empty.

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

Global maximum of normal price records; diagnostics are bounded by the same row limit.

## `maxPages` (type: `integer`):

Maximum public pages requested when pagination is enabled.

## `followPagination` (type: `boolean`):

Follow only official same-host rel=next links.

## `requestDelayMs` (type: `integer`):

Polite delay before additional page requests and retries.

## `maxRequestRetries` (type: `integer`):

Retries timeouts, transport failures, and HTTP 5xx responses. HTTP 401/403/429 responses, login redirects, CAPTCHA, and identity or security verification pages stop without retry.

## `timeoutSecs` (type: `integer`):

Maximum time allowed for each public request.

## `maxBytes` (type: `integer`):

Maximum response size retained from each page.

## `userAgent` (type: `string`):

Optional transparent user-agent string.

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

Optional Apify Proxy configuration; direct access is the default and the proxy does not bypass access controls.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.instacart.com/products/18602684-green-seedless-grapes-per-lb?retailerSlug=kents-market"
    },
    {
      "url": "https://www.instacart.com/products/220058-topcare-ibuprofen-200-mg-tablets-100-ct?retailerSlug=kents-market"
    },
    {
      "url": "https://www.instacart.com/products/42649918-tide-pods-with-downy-25-ct?retailerSlug=kents-market"
    }
  ],
  "maxItems": 25,
  "maxPages": 1,
  "followPagination": false,
  "requestDelayMs": 0,
  "maxRequestRetries": 1,
  "timeoutSecs": 30,
  "maxBytes": 5000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `runSummary` (type: `string`):

Run status and counters stored by the Actor.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/instacart-storefront-price-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/instacart-storefront-price-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 '{}' |
apify call w3crawler/instacart-storefront-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/instacart-storefront-price-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/cvmsOxKQv2huhOZy8/builds/sBvCsvqWOSoqDjGoG/openapi.json
