# Swiggy Instamart Catalogue by Location (`ikmal_suzali_atr/instamart-catalog`) Actor

Every Swiggy Instamart product for a delivery location: category → subcategory → products with price, MRP, discount, in-stock state, purchase cap and a sponsored/ad flag.

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

## Pricing

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

## Swiggy Instamart Catalogue by Location

Pulls the whole Swiggy Instamart storefront for an Indian pincode: every category, every subcategory, every product, with price, MRP, discount, in-stock state, the per-order purchase cap and a sponsored flag. Instamart stocks and prices per dark store, so the catalogue you get is the one a shopper at that pincode sees.

### What you get

- Full tree walk across roughly 35 top-level categories, with `category`, `subcategory`, `subcategory_id`, `page` and `position`.
- Price economics per product: `price`, `mrp`, `discount_amount` and `discount_percent`.
- Availability and purchase limits: `in_stock`, `low_stock_text` and `max_quantity`.
- A sponsored flag on every row: `is_ad` is true where Instamart attaches ad tracking to the tile.
- Identity and store context for joining: `product_id`, `sku`, `name`, `brand`, `pack`, `image_url`, `store_id`, `pod_id` and `store_address`.
- Location honesty: a pincode Instamart does not serve produces a warning and zero rows, never a default store's catalogue under the wrong label.

### Input

Give one or more Indian pincodes. Everything else narrows the crawl.

```json
{
  "pincodes": ["122002"],
  "categoryFilter": ["fruit"],
  "maxSubcategoriesPerCategory": 1,
  "delayMs": 1000,
  "callsPerSession": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  }
}
```

- `pincodes`: 6-digit Indian pincodes, for example `122002`.
- `categoryFilter`: only categories whose name contains one of these strings, case-insensitive. Empty means all, around 35.
- `maxSubcategoriesPerCategory`: 0 means all. `subcategories` narrows further by name or id.
- `proxyConfiguration`: residential country IN is the default and is required in practice.

### Output

One row per product, per subcategory, per location. The run above returned 126 rows, 3 of them sponsored.

```json
{
  "location_label": "Gurgaon-DLF",
  "store_id": "1394451",
  "category": "Fresh Fruits",
  "subcategory": "Fresh Fruits",
  "position": 1,
  "product_id": "XC3J58DTKQ",
  "name": "Crunchy Shimla Apple (Seb)",
  "brand": "Fruits and Vegetables",
  "pack": "2 Pieces x 2",
  "mrp": 212,
  "price": 168,
  "discount_amount": 44,
  "discount_percent": 21,
  "in_stock": true,
  "low_stock_text": null,
  "max_quantity": 1,
  "is_ad": true,
  "fetched_at": "2026-09-11T09:01:18.792Z"
}
```

`rating` and `rating_count` are null on listing tiles: Instamart does not put ratings there. `low_stock_text` is null unless the app shows a low-stock nudge, and `store_address` is often empty.

### Use cases

- Per-store price and discount tracking with `price`, `mrp` and `discount_percent` across pincodes.
- Ad-slot share of voice: count `is_ad` rows by `brand` inside a subcategory and track it daily.
- Out-of-stock monitoring from `in_stock`, with `low_stock_text` as an early warning.
- Assortment gaps by comparing the `product_id` and `sku` sets between cities.

### Notes and limits

- An Indian residential proxy is required. Swiggy's protection layer refuses non-Indian, datacenter and flagged exits, and some residential pools are refused outright. When a pool is rejected the actor retries on fresh exits three times, then reports that location as failed with the reason rather than inventing rows.
- Sessions degrade after roughly 70 rapid calls, first serving empty pages and then a block page. `delayMs` defaults to 1000 and `callsPerSession` to 50 so the actor re-mints first.
- Instamart occasionally serves an empty page to a perfectly good fresh session. The actor retries three times before giving up on that location.
- Exact coordinates can be supplied instead of pincodes through the advanced `locations` field.

### FAQ

**Do I need a proxy?** Yes. Use a residential proxy in India, which is the default. Some Indian residential pools are still refused by the site, in which case the run reports the block plainly instead of returning partial data.

**How many results can I get?** The whole store. One verified run returned 126 products from a single filtered subcategory; clear the filters for full coverage.

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

**How is sponsored detected?** `is_ad` is set when the product tile carries Instamart's own ad tracking context, which is the same signal the app uses to bill the placement.

# Actor input Schema

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

Indian 6-digit pincodes to scrape, e.g. 122002. Each is resolved to the pincode's centre and the platform picks the store serving it. Pincodes with no store nearby are reported as failed locations, never as another city's data.

## `categoryFilter` (type: `array`):

Optional: only categories whose name contains one of these strings (case-insensitive). Empty = all (~35).

## `subcategories` (type: `array`):

Only scrape these subcategories (case-insensitive name match, or the subcategory id). Empty = all subcategories in the selected categories.

## `maxSubcategoriesPerCategory` (type: `integer`):

0 = all.

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

Instamart degrades a session (empty pages, then a block page) after ~70 rapid calls; pace calls and let the actor re-mint sessions.

## `callsPerSession` (type: `integer`):

Open a fresh browser session (new IP when using a rotating proxy) after this many listing calls.

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

Residential IN proxy strongly recommended — Swiggy's WAF blocks an IP after repeated automated sessions. Each minted session is pinned to one proxy exit IP (Apify Proxy sessions; for custom proxy URLs put `{session}` where your provider takes a session id) — the site binds its anti-bot state to the minting IP, so a per-request rotating gateway kills sessions within a few calls.

## `locations` (type: `array`):

Optional instead of pincodes: exact coordinates, e.g. \[{"lat":28.4595,"lng":77.0266,"label":"Gurgaon DLF"}].

## Actor input object example

```json
{
  "pincodes": [
    "122002"
  ],
  "subcategories": [],
  "maxSubcategoriesPerCategory": 0,
  "delayMs": 1000,
  "callsPerSession": 50,
  "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 = {
    "pincodes": [
        "122002"
    ],
    "subcategories": []
};

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

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

```

## MCP server setup

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

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/gF1Z66vGXJB9dYPfh/builds/Rfx993qpU93hsdlQS/openapi.json
