# Instamart Product Details by Pincode (`ikmal_suzali_atr/instamart-details`) Actor

Swiggy Instamart product details for any product id or URL at any Indian pincode: price, MRP, discount, pack size, stock, rating, images, category, variants, store id and delivery ETA. One row per product × pincode, resolved by the store serving that pincode.

- **URL**: https://apify.com/ikmal\_suzali\_atr/instamart-details.md
- **Developed by:** [AtTheRate AI](https://apify.com/ikmal_suzali_atr) (community)
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 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

## Instamart Product Details by Pincode

Reads the full Swiggy Instamart product page for any product id or URL, at any Indian pincode, one row per product and pincode. Instamart prices, stocks and delivers per dark store, so the same item returns a different price, offer and delivery promise depending on the pincode you ask for.

### What you get

- Price economics per store: `price`, `original_price`, `discount_percent`, `discount_amount`, the `offer_text` on the page and every promotion in `offers`.
- Availability and purchase limits: `in_stock`, `is_avail`, `low_stock_text`, `max_quantity`.
- Store and delivery context: `store_id`, `pod_id`, `store_serviceability`, `delivery_eta_minutes` and a human `delivery` string.
- A sponsored marker: `is_sponsored_listing` is true when the item carries Instamart's ad tracking context.
- Page content: `name`, `brand`, `unit`, `category_path`, `description`, `highlights`, `specifications`, `images`, `variants`.
- Nothing is dropped: `found: false` rows carry a `reason` of `invalid_id`, `pincode_unresolved`, `not_serviceable`, `not_found`, `blocked` or `failed`.

### Input

Both `productIds` and `pincodes` are required. Every product is fetched at every pincode.

```json
{
  "productIds": ["4M2JLMBEXY", "XC3J58DTKQ"],
  "pincodes": ["122002", "560001"],
  "maxConcurrency": 2,
  "delayMs": 400,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  }
}
```

- `productIds`: Instamart product ids such as `4M2JLMBEXY`, or `/instamart/item/<id>` URLs.
- `pincodes`: 6-digit Indian pincodes, each a separate store resolution.
- `maxConcurrency`: fetches in flight per pincode, 1 to 4.
- `proxyConfiguration`: residential country IN is the default and required in practice.

### Output

One row per product and pincode: two products across two pincodes give four rows.

```json
{
  "requested": "XC3J58DTKQ",
  "product_id": "XC3J58DTKQ",
  "pincode": "122002",
  "location_label": "Gurgaon, Gurugram",
  "found": true,
  "name": "Crunchy Shimla Apple (Seb)",
  "brand": "Fruits and Vegetables",
  "unit": "2 Pieces x 2",
  "price": 168,
  "original_price": 212,
  "discount_percent": 21,
  "in_stock": true,
  "low_stock_text": null,
  "max_quantity": 1,
  "is_sponsored_listing": false,
  "store_id": "1394451",
  "delivery": "9 mins",
  "delivery_eta_minutes": 9,
  "fetched_at": "2026-09-11T09:01:18.792Z"
}
```

Null by design: `stock_quantity`, `seller`, `seller_rating` and `review_count` are always null, because the product page publishes no unit count, seller or review count. `low_stock_text` is null unless the app shows a low-stock nudge.

### Use cases

- City-by-city price comparison for a fixed item list from `price` and `discount_percent`.
- Promotion tracking with `offer_text` and `offers`, which differ by store far more than base price.
- Serviceability and delivery mapping from `store_serviceability` and `delivery_eta_minutes`.
- Pack-ladder analysis from `variants`, which lists sibling sizes with their own price and stock.

### Notes and limits

- An Indian residential proxy is required. Swiggy refuses non-Indian, datacenter and flagged exits, and some residential pools are refused outright. In a verified test the whole run was refused and stopped with a message naming the fix rather than returning partial rows.
- Retries run on fresh exits three times before stopping, so one bad IP does not end a run. Each session is pinned to one exit IP; in custom `proxyUrls`, put `{session}` where your provider takes a session id.
- One browser mint serves every pincode; only the location changes and Swiggy re-resolves the store. A session serves up to 150 fetches before re-minting.
- An unknown product id is recorded as `reason: not_found`, not a failed run.

### FAQ

**Do I need a proxy?** Yes, residential and Indian, which is the default. Some Indian residential pools are still refused by the site; the run then reports the block plainly instead of guessing.

**How many results can I get?** One row per product and pincode pair, with no cap on either list. Sessions rotate every 150 fetches.

**Does it need login or an API key?** No Swiggy account or key of your own is required.

**How does a pincode pick a store?** The pincode is resolved to coordinates that set the delivery location, and Swiggy picks the dark store itself. That store is stamped on the row as `store_id`, so you can confirm two pincodes really hit two stores.

# Actor input Schema

## `productIds` (type: `array`):

Swiggy Instamart product ids (e.g. 4M2JLMBEXY) or product URLs (https://www.swiggy.com/instamart/item/<id>). One row is produced per product for every pincode.

## `pincodes` (type: `array`):

Indian 6-digit pincodes, e.g. 122002. Each is resolved to coordinates and the app picks the dark store serving it; prices, stock and ETA are for that store. Unresolvable pincodes and pincodes with no store are reported per row (reason pincode\_unresolved / not\_serviceable), never silently skipped.

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

Product fetches in flight per pincode (1–4). Sessions are rate-limited per IP; 2 is safe.

## `delayMs` (type: `integer`):

Pause between product fetches on one session.

## `proxyUrls` (type: `array`):

Optional: your own proxy URLs (http://user:pass@host:port). Put `{session}` where the provider takes a session id so every minted session keeps one exit IP. Overrides the proxy block below.

## `useApifyProxy` (type: `boolean`):

Apify platform only: route through Apify residential proxy (country IN). Ignored on ATR servers, where our own residential proxy is used.

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

Residential IN proxy strongly recommended: Swiggy's AWS WAF challenges datacenter and non-Indian exits and burns an IP after repeated automated sessions. Sessions are pinned to one exit IP (put `{session}` in custom proxy URLs).

## Actor input object example

```json
{
  "productIds": [
    "4M2JLMBEXY"
  ],
  "pincodes": [
    "122002"
  ],
  "maxConcurrency": 2,
  "delayMs": 400,
  "proxyUrls": [],
  "useApifyProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IN"
  }
}
```

# Actor output Schema

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

One row per product.

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

Counts for the run: what was requested, captured, skipped and failed.

# 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 = {
    "productIds": [
        "4M2JLMBEXY"
    ],
    "pincodes": [
        "122002"
    ],
    "proxyUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ikmal_suzali_atr/instamart-details").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 = {
    "productIds": ["4M2JLMBEXY"],
    "pincodes": ["122002"],
    "proxyUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ikmal_suzali_atr/instamart-details").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 '{
  "productIds": [
    "4M2JLMBEXY"
  ],
  "pincodes": [
    "122002"
  ],
  "proxyUrls": []
}' |
apify call ikmal_suzali_atr/instamart-details --silent --output-dataset

```

## MCP server setup

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

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/RDvZwQgrEFCoAEmB5/builds/JIjO5j4wq4tyYZfHN/openapi.json
