# Swiggy Restaurant Scraper (`shahidirfan/swiggy-restaurant-scraper`) Actor

Extract restaurant data from Swiggy including menus, ratings, delivery fees, cuisines, and reviews. Ideal for competitive analysis, market research, and restaurant intelligence across Indian cities.

- **URL**: https://apify.com/shahidirfan/swiggy-restaurant-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Developer tools, E-commerce, Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Restaurant Scraper

Extract restaurant listings from Swiggy city pages and keyword searches in a structured, repeatable format. Collect restaurant names, cuisines, ratings, delivery estimates, areas, discounts, and restaurant links for research, local market analysis, and competitive tracking.

### Features

- **City URL support** — Collect restaurants from Swiggy city and city collection URLs.
- **Keyword discovery** — Search for restaurant matches around a resolved city using dish or cuisine keywords.
- **Rich restaurant fields** — Gather ratings, cuisines, delivery estimates, pricing hints, badges, and image links.
- **Clean datasets** — Empty and null fields are removed before data is saved.
- **Proxy-ready runs** — Supports Apify proxy configuration for stable production runs.

### Use Cases

#### Local Market Research
Track which restaurants appear for a city and compare their ratings, cuisine mix, and delivery promises. Use the output to understand how crowded a local category is.

#### Cuisine Trend Monitoring
Search for keywords such as biryani, pizza, burgers, or desserts and build datasets of restaurants associated with those demand clusters. This is useful for food startups, cloud kitchens, and neighborhood analysis.

#### Competitive Benchmarking
Capture restaurant visibility, pricing hints, and delivery expectations across cities or neighborhoods. The data helps benchmark how brands position themselves in different zones.

#### Lead Generation
Build restaurant lists for outreach, partnerships, or account mapping. The dataset includes location and restaurant URLs, making it easier to review each listing.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | String | No | `"https://www.swiggy.com/city/bangalore"` | A Swiggy city or city collection URL. This is the best option for city browsing runs. |
| `keyword` | String | No | `"biryani"` | Restaurant or dish keyword to search around the resolved city. |
| `location` | String | No | `"Bangalore"` | Fallback location when you are not using a Swiggy URL. |
| `resultsWanted` | Integer | No | `20` | Maximum number of restaurants to save. |
| `maxPages` | Integer | No | `3` | Maximum number of page expansions in URL mode when more city results are available. |
| `proxyConfiguration` | Object | No | `{"useApifyProxy": true}` | Apify proxy configuration. |

### Output Data

Each dataset item can contain:

| Field | Type | Description |
|-------|------|-------------|
| `restaurantId` | String | Swiggy restaurant identifier |
| `name` | String | Restaurant name |
| `url` | String | Restaurant page URL |
| `sourceType` | String | `city_listing` or `keyword_search` |
| `city` | String | Resolved city name |
| `citySlug` | String | Swiggy city slug |
| `locality` | String | Restaurant locality |
| `areaName` | String | Restaurant area |
| `address` | String | Address when available |
| `cuisines` | Array | Cuisine labels |
| `costForTwo` | String | Cost-for-two text |
| `avgRating` | Number | Average rating |
| `avgRatingString` | String | Rating as shown by Swiggy |
| `totalRatingsString` | String | Rating count text |
| `deliveryTime` | Integer | Estimated delivery time in minutes |
| `minDeliveryTime` | Integer | Minimum estimated delivery time |
| `maxDeliveryTime` | Integer | Maximum estimated delivery time |
| `lastMileTravelKm` | Number | Last-mile travel distance |
| `slaString` | String | Delivery estimate text |
| `isOpen` | Boolean | Whether the restaurant is open |
| `nextCloseTime` | String | Next closing time when available |
| `parentId` | String | Parent brand identifier |
| `cloudinaryImageId` | String | Swiggy image identifier |
| `imageUrl` | String | Restaurant image URL |
| `discountSummary` | String | Discount summary text |
| `badges` | Array | Badge descriptions |
| `externalRating` | String | External rating when available |
| `externalRatingCount` | String | External rating count when available |
| `matchedDishes` | Array | Up to five matching dishes for keyword runs |

### Usage Examples

#### Basic City Run

```json
{
	"url": "https://www.swiggy.com/city/bangalore",
	"resultsWanted": 20,
	"maxPages": 2
}
````

#### Keyword Search Around a City URL

```json
{
	"url": "https://www.swiggy.com/city/bangalore/best-restaurants",
	"keyword": "pizza",
	"resultsWanted": 25
}
```

#### Location-Based Search Without URL

```json
{
	"location": "Koramangala Bangalore",
	"keyword": "desserts",
	"resultsWanted": 15
}
```

### Sample Output

```json
{
	"sourceType": "keyword_search",
	"restaurantId": "18972",
	"name": "Nandhana Palace",
	"url": "https://www.swiggy.com/city/bangalore/nandhana-palace-indiranagar-indiranagar-rest18972",
	"city": "Bangalore",
	"citySlug": "bangalore",
	"locality": "Indiranagar",
	"areaName": "Indiranagar",
	"cuisines": [
		"Biryani",
		"Andhra",
		"South Indian",
		"North Indian"
	],
	"costForTwo": "₹500 FOR TWO",
	"avgRating": 4.4,
	"avgRatingString": "4.4",
	"totalRatingsString": "32K+",
	"deliveryTime": 53,
	"slaString": "50-60 MINS",
	"isOpen": true,
	"imageUrl": "https://media-assets.swiggy.com/swiggy/image/upload/RX_THUMBNAIL/IMAGES/VENDOR/2024/11/21/9ea12882-e49f-49d2-92e9-0b2f7cdb79b3_18972.jpg",
	"matchedDishes": [
		{
			"name": "Bowl Hyderabadi Paneer Biryani",
			"category": "Bowl Biryani",
			"price": "INR 245.00",
			"rating": "4.6"
		}
	]
}
```

### Tips for Best Results

#### Use Real Swiggy City URLs

- Prefer `https://www.swiggy.com/city/<city>` style URLs for browsing runs.
- City URLs provide the strongest result expansion support.

#### Keep Result Limits Reasonable

- Start with `20` to validate the dataset shape.
- Increase `resultsWanted` after confirming the target city or keyword works as expected.

#### Use Proxies for Stability

- Residential proxies are recommended when you want the most reliable browser-assisted expansions.
- Proxy support is especially helpful when collecting larger city runs.

### Proxy Configuration

```json
{
	"proxyConfiguration": {
		"useApifyProxy": true,
		"apifyProxyGroups": ["RESIDENTIAL"]
	}
}
```

### Integrations

- **Google Sheets** — Export restaurant datasets for analysis and reporting.
- **Airtable** — Build searchable restaurant databases.
- **Make** — Send restaurant data into automated workflows.
- **Zapier** — Trigger downstream enrichment and notifications.
- **Webhooks** — Deliver fresh datasets to your own systems.

#### Export Formats

- **JSON** — For APIs and application workflows.
- **CSV** — For spreadsheets and tabular analysis.
- **Excel** — For business reporting.
- **XML** — For integration pipelines.

### Frequently Asked Questions

#### Can I run the actor with only a keyword?

Use a keyword together with a Swiggy URL or a location. The actor needs a city context to resolve the correct search area.

#### Which URLs work best?

Swiggy city URLs and city collection URLs work best, such as the main city page and best-restaurants pages.

#### Why are some fields missing from certain restaurants?

Swiggy does not expose every field for every listing. The actor removes empty values instead of saving null placeholders.

#### Does the actor collect dish data too?

The main output is restaurant-focused. For keyword runs, the actor also includes a short list of matching dishes that helped surface each restaurant.

#### Can I collect every restaurant in a city?

You can collect a substantial number of restaurants, but actual coverage depends on the target city, keyword, and how many additional page expansions Swiggy exposes during the run.

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [Apify API Reference](https://docs.apify.com/api/v2)
- [Apify Scheduling](https://docs.apify.com/platform/schedules)

### Legal Notice

This actor is intended for legitimate data collection and analysis. Users are responsible for complying with applicable laws, platform terms, and internal data-governance requirements.

# Actor input Schema

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

A Swiggy city or city collection URL such as https://www.swiggy.com/city/bangalore or https://www.swiggy.com/city/bangalore/best-restaurants.

## `keyword` (type: `string`):

Restaurant or dish keyword to search around the resolved city, such as biryani or pizza.

## `location` (type: `string`):

Location to geocode when you are not using a Swiggy URL, such as Bangalore or Koramangala Bangalore.

## `resultsWanted` (type: `integer`):

Maximum number of restaurants to collect.

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

Maximum number of Swiggy pages to advance in URL mode when Show More is available.

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

Apify proxy configuration. Residential proxies are recommended for the most stable browser-assisted pagination.

## Actor input object example

```json
{
  "url": "https://www.swiggy.com/city/bangalore",
  "keyword": "biryani",
  "location": "Bangalore",
  "resultsWanted": 20,
  "maxPages": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "url": "https://www.swiggy.com/city/bangalore",
    "keyword": "biryani",
    "location": "Bangalore",
    "resultsWanted": 20,
    "maxPages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/swiggy-restaurant-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 = {
    "url": "https://www.swiggy.com/city/bangalore",
    "keyword": "biryani",
    "location": "Bangalore",
    "resultsWanted": 20,
    "maxPages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/swiggy-restaurant-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 '{
  "url": "https://www.swiggy.com/city/bangalore",
  "keyword": "biryani",
  "location": "Bangalore",
  "resultsWanted": 20,
  "maxPages": 3
}' |
apify call shahidirfan/swiggy-restaurant-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Swiggy Restaurant Scraper",
        "description": "Extract restaurant data from Swiggy including menus, ratings, delivery fees, cuisines, and reviews. Ideal for competitive analysis, market research, and restaurant intelligence across Indian cities.",
        "version": "0.0",
        "x-build-id": "CxucOzRpdiDi99VyE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~swiggy-restaurant-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-swiggy-restaurant-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~swiggy-restaurant-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-swiggy-restaurant-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~swiggy-restaurant-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-swiggy-restaurant-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "url": {
                        "title": "Swiggy URL",
                        "type": "string",
                        "description": "A Swiggy city or city collection URL such as https://www.swiggy.com/city/bangalore or https://www.swiggy.com/city/bangalore/best-restaurants."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Restaurant or dish keyword to search around the resolved city, such as biryani or pizza."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Location to geocode when you are not using a Swiggy URL, such as Bangalore or Koramangala Bangalore."
                    },
                    "resultsWanted": {
                        "title": "Results Wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of restaurants to collect.",
                        "default": 20
                    },
                    "maxPages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of Swiggy pages to advance in URL mode when Show More is available.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify proxy configuration. Residential proxies are recommended for the most stable browser-assisted pagination.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
