# Swiggy Scraper (`tortuga/swiggy-scraper`) Actor

Swiggy restaurants in Indian cities or at any coordinates: name, cuisines, rating and rating count, delivery time, distance, cost for two, area, address, opening status, offers and badges. Search by keyword or browse the home listing and cuisine tiles. JSON or CSV, no login.

- **URL**: https://apify.com/tortuga/swiggy-scraper.md
- **Developed by:** [Trevor Ortega](https://apify.com/tortuga) (community)
- **Categories:** E-commerce, Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.56 / 1,000 restaurants

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/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 Scraper: Restaurants, Ratings and Delivery Data in India

Scrape restaurants from [Swiggy](https://www.swiggy.com) by Indian city or any coordinates. For every restaurant you get the name, cuisines, rating and rating count, delivery time, distance, cost for two, area, address (from searches), opening status, offers and badges. Search by keyword (a dish, cuisine or brand) or read the home listing and cuisine tiles. It reads the public JSON that swiggy.com loads, so no login is needed.

### What data do you get?

| Field | Example |
| --- | --- |
| `id`, `url`, `name`, `brandId` | `903490`, `Cremeux` |
| `cuisineTags` | `["Bakery", "Pastas", "Italian"]` |
| `rating`, `ratingCount`, `ratingCountText` | `4.1`, `1700`, `1.7K+` |
| `deliveryTime`, `deliveryTimeMinutes`, `distanceKm` | `45-55 min`, `50`, `8.8` |
| `costForTwo`, `costForTwoAmount`, `currency` | `₹600 for two`, `600`, `INR` |
| `area`, `locality`, `address`, `city` | `BTM Layout` (`address` appears for search results) |
| `isOpen`, `serviceability`, `nextCloseTime`, `isVeg` | opening status |
| `promotions`, `badges`, `isPromoted`, `image`, `source` | `search:pizza` or `home` |
| Not shown by Swiggy's public JSON | `latitude`, `longitude`, `deliveryFee`, `minimumOrder`, `priceRange` are `null` |

### Input example

```json
{
  "location": [
    "Bangalore",
    "12.9716,77.5946"
  ],
  "keywords": [
    "pizza",
    "biryani"
  ],
  "minRating": 4,
  "maxItems": 100
}
```

`location` takes Indian city names (Bangalore, Delhi, Mumbai, Hyderabad, Chennai, Kolkata, Pune and about 30 more) or `lat,lon` coordinates for any neighbourhood; Swiggy returns the restaurants that deliver to that point. Each keyword is one search of about 70 restaurants. Without keywords the Actor reads the home listing plus one search per cuisine tile of the home page.

### Output example

```json
{
  "id": "903490",
  "url": "https://www.swiggy.com/city/bangalore/cremeux-btm-btm-rest903490",
  "name": "Cremeux",
  "cuisineTags": [
    "Cakes",
    "Cake",
    "pizza",
    "Bakery",
    "Pastas",
    "sandwich",
    "Desserts",
    "Italian",
    "Beverages",
    "Cakes & Pastries"
  ],
  "rating": 4.1,
  "ratingCount": 1700,
  "ratingCountText": "1.7K+",
  "deliveryTime": "45-55 min",
  "deliveryTimeMinutes": 50,
  "distanceKm": 8.8,
  "deliveryFee": null,
  "minimumOrder": null,
  "costForTwo": "₹600 for two",
  "costForTwoAmount": 600.0,
  "currency": "INR",
  "priceRange": null,
  "address": "No.242, \"Citi Square\", Ground Floor, MICO Employees Griha Nirmana Sangha Rashtrakavi Kuvempu Nagara, 7th Cross Rd, NS Palya, BTM Layout, Bengaluru, Karnataka...",
  "area": "BTM Layout",
  "locality": "7th Cross Rd, NS Palya",
  "city": "bangalore",
  "latitude": null,
  "longitude": null,
  "isOpen": true,
  "serviceability": "SERVICEABLE",
  "nextCloseTime": null,
  "isVeg": null,
  "promotions": [],
  "badges": [
    "Top-rated for Cakes & Desserts, based on user votes."
  ],
  "brandId": "7256",
  "isPromoted": null,
  "image": "https://media-assets.swiggy.com/swiggy/image/upload/fl_lossy,f_auto,q_auto,w_660/FOOD_CATALOG/IMAGES/CMS/2024/3/14/023647ec-e1ab-48da-a12c-ac8563cf68db_2d0a5...",
  "source": "search:pizza"
}
```

### Monitor changes on a schedule

Turn on `onlyNewOrChanged` and put the run on a Schedule. Each run remembers the restaurants it returned before and outputs only new restaurants or restaurants whose rating, opening status or fees changed. Unchanged restaurants are not charged. Each item gets `changeType` (`new` or `changed`) and `previousValues`. Use `monitoringKey` to keep several schedules on similar searches apart. A ready-made input is in `monitor-task.json`.

### Pricing

| Event | Price |
| --- | --- |
| Restaurant (one result) | $3.20 per 1,000 |
| Run start | $0.00005 per run |

Volume tiers (Silver, Gold and above) get 10 to 20 percent off. Platform usage is included.

### Proxy note

Swiggy's public JSON works through the default datacenter proxy; no residential proxy is needed. A search response is about 0.2 MB.

### FAQ

#### Can I get menus?

No. Swiggy's menu endpoint answers with an AWS WAF challenge page to datacenter and residential IPs, which this Actor does not try to get around. Restaurant lists are complete as described above.

#### How many restaurants can I get?

A search returns about 70 restaurants, the home listing about 28, so a city with a few keywords gives a few hundred restaurants. Use several keywords or several coordinates (different neighbourhoods) for more. Swiggy's deeper pagination needs a signed-in style request that the Actor does not use.

#### Why do some restaurants have no address?

Only search results carry the full address and slug; the home listing carries the area and locality.

#### Does it need a login or API key?

No. It reads the public JSON that swiggy.com loads for logged-out visitors.

#### Is scraping Swiggy legal?

The Actor collects public restaurant data that the site shows to any visitor. You are responsible for using it in line with applicable law and the site's terms.

# Actor input Schema

## `location` (type: `array`):

Indian cities such as Bangalore, Delhi, Mumbai, Hyderabad, Chennai, Kolkata, Pune, Ahmedabad or Jaipur, or coordinates written as 'lat,lon' (for example 12.9716,77.5946) for any neighbourhood. A plain text value is accepted too.

## `keywords` (type: `array`):

Search Swiggy for these words (a dish, cuisine or restaurant name such as pizza, biryani or Starbucks); each keyword is one search of about 70 restaurants. Without keywords the Actor reads the home listing and the cuisine tiles of the home page.

## `minRating` (type: `number`):

Keep only restaurants rated at least this high on Swiggy's 5-star scale (for example 4).

## `vegOnly` (type: `boolean`):

Keep only restaurants Swiggy marks as pure vegetarian.

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

Stop after this many restaurants. Keeps cost predictable.

## `onlyOpen` (type: `boolean`):

Keep only restaurants that currently accept orders.

## `onlyNewOrChanged` (type: `boolean`):

Remember what earlier runs of this search returned and output only new restaurants or restaurants whose watched values changed. Use with a Schedule; unchanged items are not charged.

## `monitoringKey` (type: `string`):

Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input.

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

Datacenter proxies work for Swiggy's public JSON (default).

## Actor input object example

```json
{
  "location": [
    "Bangalore"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "location": [
        "Bangalore"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tortuga/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 = {
    "location": ["Bangalore"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tortuga/swiggy-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 '{
  "location": [
    "Bangalore"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tortuga/swiggy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tortuga/swiggy-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/dBSKImxZmMsaXZEaX/builds/OcnkYuFO3YCNRZSdg/openapi.json
