# Swiggy Instamart Scraper (`solidcode/swiggy-scraper`) Actor

\[💰 $4.0 / 1K] Extract grocery products from Swiggy Instamart. Get name, brand, quantity, price, MRP, discount, per-unit price, rating, stock, category, description, and image. Search by keyword or paste category page URLs, and pick the city that sets local availability and pricing.

- **URL**: https://apify.com/solidcode/swiggy-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 6 total users, 4 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Swiggy Instamart Scraper

Pull grocery product data from Swiggy Instamart at scale — selling price, MRP, discount, per-unit price, brand, pack size, star rating, stock status, and images for every product across India's biggest quick-commerce catalog. Search a whole basket of keywords or sweep entire category pages, all pinned to the exact city and neighbourhood you care about. Built for pricing analysts, e-commerce sellers, and market researchers who need live Instamart price and availability data without running one search at a time or hunting raw IDs out of URLs.

### Why This Scraper?

- **15 major Indian metros in one dropdown** — Bangalore, Mumbai, Delhi, Hyderabad, Chennai, Pune, Kolkata, Gurgaon, Noida, Ahmedabad, Jaipur, Chandigarh, Lucknow, Kochi, and Coimbatore. Prices and stock reflect the city you pick.
- **Neighbourhood-level pricing** — narrow to a specific area (e.g. "Koramangala", "Andheri West") so the price, discount, and availability match that exact locality, not a citywide average.
- **Real price-comparison data, not just a headline price** — every product carries selling price, MRP, savings amount, a computed discount label ("25% OFF"), and per-unit price, so you can rank offers and track margins directly.
- **Live in-stock / out-of-stock status** — a boolean `inStock` flag on every product tells you what's actually buyable right now in that location.
- **Star rating plus rating count per product** — average rating and the normalized number of ratings (handles "369.9k"-style display counts) for demand and quality signals.
- **Batch a whole keyword basket in one run** — pass many search terms at once ("Amul Milk", "Olive Oil", "Eggs") instead of re-running the actor for each product.
- **Paste category URLs, no ID hunting** — drop in a full Swiggy Instamart collection page link and the actor reads the collection ID for you, then sweeps the entire aisle.
- **Image URL and canonical product link for every item** — a ready-to-use product image and a shareable Swiggy product page URL on every row.
- **Self-describing rows** — each product carries the `city`, `area`, and originating `sourceQuery` or `sourceCategoryUrl`, so multi-keyword, multi-location runs stay untangled in a single dataset.

### Use Cases

**Price Monitoring & Competitive Intelligence**

- Track selling price, MRP, and discount on the same product across cities
- Watch daily price and discount swings on fast-moving grocery lines
- Benchmark your own quick-commerce prices against Instamart
- Spot deep-discount and clearance offers by filtering on the discount label

**Market Research**

- Map assortment and pricing differences between metros
- Measure how availability shifts by neighbourhood within a city
- Study per-unit pricing to compare pack sizes fairly
- Rank categories by average rating and rating volume

**Assortment & Range Analysis**

- Sweep an entire category page to inventory every SKU in an aisle
- Compare brand coverage across cities for a product type
- Identify out-of-stock gaps you could fill
- Track new products entering a category over time

**Lead Generation & Catalog Building**

- Build a structured grocery product catalog with images and prices
- Feed clean product rows into pricing dashboards and BI tools
- Enrich existing SKU databases with live Instamart pricing and stock
- Power price-comparison and deal-alerting apps

### Getting Started

#### Search a Single Keyword

The simplest run — one product term in the default city:

```json
{
    "searchQueries": ["Amul Milk"]
}
```

#### Multi-Keyword Basket in a Chosen City

Batch several terms and pin the city:

```json
{
    "searchQueries": ["Amul Milk", "Olive Oil", "Eggs", "Sunscreen"],
    "city": "Mumbai",
    "maxResults": 100
}
```

#### Category Sweep with a Neighbourhood

Paste a full category page URL and refine to an exact area:

```json
{
    "categoryUrls": [
        "https://www.swiggy.com/instamart/collection-listing?collectionId=1140525"
    ],
    "city": "Bangalore",
    "area": "Koramangala",
    "maxResults": 0
}
```

### Input Reference

#### What to Collect

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | string\[] | `["Amul Milk"]` | Products to search for, one per line (e.g. "Amul Milk", "Sunscreen", "Olive Oil"). Each term is searched separately. Leave empty if you are only pasting category URLs. |
| `categoryUrls` | string\[] | `[]` | Full Swiggy Instamart category or collection page URLs to list every product in them. Copy the address straight from your browser. Leave empty if you are only searching by keyword. |

#### Location

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `city` | select | `Bangalore` | The city that sets availability and pricing: Bangalore, Mumbai, Delhi, Hyderabad, Chennai, Pune, Kolkata, Gurgaon, Noida, Ahmedabad, Jaipur, Chandigarh, Lucknow, Kochi, or Coimbatore. |
| `area` | string | (empty) | Optional area or neighbourhood within the city (e.g. "Koramangala", "Andheri West") to refine availability and pricing. Leave empty to use the city centre. |

#### Limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | Maximum products to collect for each search term and each category URL. Set to 0 to collect as many as are available. Start low for a quick first run, then raise it to collect hundreds. |

### Output

Each product is one row in the dataset. Here's a representative result:

```json
{
    "recordType": "product",
    "productId": "GH8XKQ2M1P",
    "name": "Amul Taaza Toned Milk",
    "brand": "Amul",
    "quantity": "500 ml",
    "price": 27,
    "mrp": 30,
    "savings": 3,
    "discount": "10% OFF",
    "pricePerUnit": "₹5.4/100 ml",
    "rating": 4.5,
    "ratingCount": 12400,
    "inStock": true,
    "isAd": false,
    "adTitle": null,
    "category": "Milk",
    "superCategory": "Dairy, Bread & Eggs",
    "shortDescription": "Toned milk, homogenised and pasteurised.",
    "imageUrl": "https://instamart-media-assets.swiggy.com/swiggy/image/upload/NI_CATALOG/IMAGES/CIW/2024/abc123",
    "productUrl": "https://www.swiggy.com/instamart/item/GH8XKQ2M1P",
    "city": "Bangalore",
    "area": "Koramangala",
    "sourceQuery": "Amul Milk",
    "sourceCategoryUrl": null,
    "scrapedAt": "2026-07-03T14:30:00Z"
}
```

#### Product & Pricing

| Field | Type | Description |
|-------|------|-------------|
| `recordType` | string | Always `"product"`. |
| `productId` | string | Swiggy Instamart product identifier. |
| `name` | string | Product display name. |
| `brand` | string | Brand name. |
| `quantity` | string | Pack size / quantity label (e.g. "500 ml", "6 x 100 g"). |
| `price` | number | Selling price in rupees (₹). |
| `mrp` | number | Maximum retail price in rupees (₹). |
| `savings` | number | Amount saved (MRP − price) in rupees (₹). |
| `discount` | string | Discount label (e.g. "25% OFF"), when the product is discounted. |
| `pricePerUnit` | string | Per-unit price when available (e.g. "₹5.4/100 ml"). |

#### Ratings & Availability

| Field | Type | Description |
|-------|------|-------------|
| `rating` | number | Average product rating. |
| `ratingCount` | integer | Number of ratings (display counts like "369.9k" normalized to a whole number). |
| `inStock` | boolean | Whether the product is currently available in the chosen location. |
| `isAd` | boolean | Whether the product appeared as a sponsored placement. |
| `adTitle` | string | Sponsored slot title, when the product is an ad. |

#### Category, Media & Provenance

| Field | Type | Description |
|-------|------|-------------|
| `category` | string | Product category. |
| `superCategory` | string | Top-level taxonomy grouping. |
| `shortDescription` | string | Short product description. |
| `imageUrl` | string | Product image URL. |
| `productUrl` | string | Canonical Swiggy Instamart product page URL. |
| `city` | string | City used for this run. |
| `area` | string | Area / neighbourhood used, if provided. |
| `sourceQuery` | string | The search term that produced this row (search results). |
| `sourceCategoryUrl` | string | The category URL that produced this row (category results). |
| `scrapedAt` | string | ISO 8601 timestamp of extraction. |

### Tips for Best Results

- **Start low, then scale** — set `maxResults` to 20 on your first run to confirm the data fits your needs, then raise it to collect hundreds per term.
- **Always set city plus area for accurate local pricing** — Instamart prices, discounts, and stock differ street to street. Pairing `city` with a specific `area` (e.g. "Koramangala") pins results to that exact locality instead of a citywide default.
- **Use category URLs to sweep a whole aisle** — a single collection page link with `maxResults: 0` inventories every SKU in that category, far faster than guessing individual keywords.
- **Batch related keywords in one run** — a multi-term basket ("Amul Milk", "Olive Oil", "Eggs") collects a full shopping list in one pass, and each row's `sourceQuery` tells you which term produced it.
- **Compare the same product across cities** — run identical `searchQueries` with different `city` values to build a city-by-city price and availability matrix.
- **Rank offers with the discount label and per-unit price** — filter on the `discount` field for deals, and use `pricePerUnit` to compare pack sizes on a like-for-like basis.
- **Filter out sponsored placements when you need organic pricing** — the `isAd` flag lets you exclude promoted items so your price benchmarks reflect the true catalog.

### Pricing

**From $4.00 per 1,000 results** — a simple pay-per-result rate with no hidden extras. Bronze, Silver, and Gold subscribers pay progressively less; the table below shows total cost at each discount tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $0.48 | $0.45 | $0.43 | $0.40 |
| 1,000 | $4.80 | $4.50 | $4.30 | $4.00 |
| 10,000 | $48 | $45 | $43 | $40 |
| 100,000 | $480 | $450 | $430 | $400 |

A "result" is any product row in the output dataset. **No compute or time-based charges — you pay per result, plus a small fixed per-run start fee.**

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor is designed for legitimate price monitoring, market research, and product-catalog building. You are responsible for complying with applicable laws and Swiggy's Terms of Service. Use collected data responsibly, respect intellectual property, and do not use it for spam, harassment, or any unlawful purpose.

# Actor input Schema

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

Products to search for, one per line — for example 'Amul Milk', 'Sunscreen', 'Olive Oil', 'Eggs'. Each term is searched separately. Leave empty if you are only pasting category URLs below.

## `categoryUrls` (type: `array`):

Paste full Swiggy Instamart category or collection page URLs to list every product in them. Copy the address straight from your browser. Leave empty if you are only searching by keyword above.

## `city` (type: `string`):

The city that sets availability and pricing. Prices, discounts, and stock on Swiggy Instamart differ by location, so pick where you want to shop.

## `area` (type: `string`):

Optional. A specific area or neighbourhood within the city (for example 'Koramangala', 'Andheri West') to refine availability and pricing for that exact spot. Leave empty to use the city centre.

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

Maximum number of products to collect for each search term and each category URL. Set 0 to collect all available products, up to a safety limit of 5,000 per search term or category. The box starts low so a first test run finishes quickly — raise it to collect hundreds.

## Actor input object example

```json
{
  "searchQueries": [
    "Amul Milk"
  ],
  "categoryUrls": [],
  "city": "Bangalore",
  "maxResults": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

Every product collected in the run, with pricing, brand, quantity, rating, and stock.

# 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 = {
    "searchQueries": [
        "Amul Milk"
    ],
    "categoryUrls": [],
    "city": "Bangalore",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/swiggy-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 = {
    "searchQueries": ["Amul Milk"],
    "categoryUrls": [],
    "city": "Bangalore",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/swiggy-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "Amul Milk"
  ],
  "categoryUrls": [],
  "city": "Bangalore",
  "maxResults": 20
}' |
apify call solidcode/swiggy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=solidcode/swiggy-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/x28XazZKAqrnVEHtP/builds/tgsOKisArBGL834Di/openapi.json
