# Swiggy Scraper — India Restaurants, Ratings & Delivery Data (`haketa/swiggy-scraper`) Actor

Scrape Swiggy restaurants by city: name, cuisines, rating, total ratings, cost for two, locality, delivery time, open status, chain and image. Keyless, lat/lng-driven. For food-delivery market research, restaurant lead-gen and competitor tracking.

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

## Pricing

from $3.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/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 — India Restaurants, Ratings, Cuisines & Delivery Data

[![Apify Actor](https://img.shields.io/badge/Apify%20Actor-Ready-orange?logo=apify)](https://apify.com/haketa/swiggy-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained-Active-brightgreen.svg)](https://apify.com/haketa/swiggy-scraper)
[![Data Format](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-blue.svg)](https://apify.com/haketa/swiggy-scraper)
[![Pagination](https://img.shields.io/badge/Pagination-1000%2B%20Unlocked-success.svg)](https://apify.com/haketa/swiggy-scraper)
[![Target](https://img.shields.io/badge/Target-Swiggy%20India-red.svg)](https://www.swiggy.com)

**Extract comprehensive restaurant data from Swiggy across all major Indian cities without writing code or solving challenges.** This high-performance **Swiggy Scraper** extracts structured restaurant profiles, ratings, cuisines, pricing, delivery speed, and operational statuses directly into **JSON, CSV, or Excel**.

Whether you are performing quick competitive benchmarking for cloud kitchens or extracting 1,000+ restaurants across an entire metropolitan grid, this actor delivers complete, deduplicated datasets instantly.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Platform** | Swiggy India ([swiggy.com](https://www.swiggy.com)) |
| **Geographic Coverage** | 30+ Indian metropolitan regions (Bangalore, Mumbai, Delhi NCR, Hyderabad, Pune, Chennai, Kolkata, etc.) or custom coordinates |
| **Data Types** | Restaurant metadata, cuisines, ratings, price for two, delivery ETA, last-mile distance, chain IDs, imagery |
| **Pagination Support** | Deep multi-point spiral grid with automatic deduplication (1,000+ results unlocked) |
| **Authentication** | None required (100% public location feeds) |
| **Proxy Requirement** | Apify Proxy datacenter rotation enabled by default |
| **Export Formats** | Dataset (JSON, CSV, XML, Excel), Key-Value Store (`OUTPUT`), Apify REST API |
| **Average Run Time** | ~15–45 seconds for standard prefill runs (~60–100 items) |

***

### 🔎 Why scrape Swiggy?

[Swiggy](https://www.swiggy.com) is one of India's undisputed food-delivery giants, connecting millions of consumers with hundreds of thousands of restaurants, cloud kitchens, bakeries, and cafes daily.

Because Swiggy serves hyper-local feeds tailored to specific delivery radii, raw scraping typically yields repetitive samples of only 20–30 restaurants per coordinate. This actor solves that fundamental challenge by automatically calculating an outward radial coordinate grid across the designated city or pinpoint area, extracting and deduplicating unique restaurants at scale.

#### Core Business Use Cases

- **Food Delivery Market Research**: Analyze cuisine distribution, average ticket size (cost for two), and rating variations across Indian metropolitan corridors.
- **Restaurant Lead Generation & Sales**: Identify independent restaurants, emerging multi-outlet chains, and franchise operators for B2B kitchen tech, packaging supplies, and merchant software.
- **Cloud Kitchen Site Selection**: Evaluate competitive density, delivery ETA averages, and rating gaps in specific pin codes before launching virtual brands.
- **Pricing & Promotion Intelligence**: Monitor baseline menu costs, rating trajectories, and opening availability across competitive quick-service restaurant (QSR) brands.
- **Algorithmic Analytics & AI Training**: Train predictive food-delivery duration models or recommendation systems using real-world operational restaurant metrics.
- **Franchise & Chain Mapping**: Uncover regional penetration of major restaurant conglomerates across urban corridors.
- **Local Merchant Intelligence**: Monitor competitor density and operational hours to optimize supply chain delivery windows.

***

### ✨ Key Features & Capabilities

- **Automated Metropolitan Grid Expansion**: Built-in coordinate mapping for 30+ major Indian cities. Automatically spirals outwards to capture 100 to 1,000+ unique restaurants without overlapping duplicates.
- **Direct Coordinate Targeting**: Pass explicit `lat` and `lng` coordinates to target exact neighborhoods, business parks, or university campuses.
- **Clean Filter Integration**: Filter incoming results in real-time by minimum rating (e.g. 4.0+), open status (`openOnly`), and specific cuisine types (e.g. Biryani, North Indian, Pizza, Chinese).
- **Flexible Result Sorting**: Sort final outputs by highest rating, fastest delivery ETA, or lowest cost for two before exporting.
- **Production-Ready Normalization**: Converts raw text counts (e.g. `1K+`, `500+`) into strict integers, parses numeric price values from descriptive strings, and outputs uniform ISO timestamps.
- **Zero Configuration Complexity**: Fully configured with intelligent defaults—just select a city and click Run.
- **Fast Resilient Execution**: Built-in intelligent retries and request pacing to prevent transient rate limits and deliver consistent datasets.

***

### 📥 Input Parameters

All parameters are optional. Running the actor with an empty configuration defaults to Bangalore with prefilled parameters.

| Field | Type | Default | Description |
|---|---|---|---|
| `city` | String | `"Bangalore"` | Name of Indian city (e.g. Mumbai, Delhi, Gurgaon, Hyderabad, Chennai, Pune, Kolkata, Ahmedabad, Jaipur, Kochi). |
| `lat` | String | `""` | Exact latitude coordinate. Overrides `city` when provided. |
| `lng` | String | `""` | Exact longitude coordinate. Overrides `city` when provided. |
| `cuisine` | String | `""` | Case-insensitive keyword filter (e.g., `"Biryani"`, `"Pizza"`, `"Burger"`, `"South Indian"`). |
| `minRating` | Number | `0` | Minimum customer rating threshold between 0.0 and 5.0 (e.g., `4.0`). |
| `openOnly` | Boolean | `false` | When `true`, filters out currently closed or unserviceable restaurants. |
| `sortBy` | Select | `"default"` | Output ordering: `"default"`, `"rating"`, `"deliveryTime"`, or `"costForTwo"`. |
| `maxItems` | Integer | `0` | Maximum restaurants to collect. Set to `0` for unlimited (deep city traversal). |
| `maxPages` | Integer | `0` | Page budget cap across grid points. Set to `0` for unlimited automated pagination. |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true }` | Apify Proxy configuration. Datacenter proxies provide optimal throughput. |

***

### 📤 Output Data Fields

Every record returned by the scraper represents a unique restaurant listing. The fields are standardized into clear data types.

#### 🏢 Identity & Basic Info

| Field | Type | Coverage | Description |
|---|---|---|---|
| `id` | String | 🟢 High | Unique Swiggy internal restaurant ID |
| `name` | String | 🟢 High | Display name of the restaurant |
| `chainId` | String | 🟡 Conditional | Chain or parent group identifier |
| `url` | String | 🟢 High | Direct canonical web URL to the restaurant's menu |
| `imageUrl` | String | 🟢 High | High-resolution Cloudinary image asset URL |

#### 📍 Location & Delivery

| Field | Type | Coverage | Description |
|---|---|---|---|
| `city` | String | 🟢 High | City name associated with the search query |
| `locality` | String | 🟢 High | Neighborhood or commercial district name |
| `areaName` | String | 🟢 High | Sub-area or postal zone |
| `lat` | Number | 🟢 High | Latitude coordinate of the query point |
| `lng` | Number | 🟢 High | Longitude coordinate of the query point |
| `deliveryTimeMin` | Number | 🟢 High | Estimated delivery duration in minutes |
| `lastMileTravelKm` | Number | 🟢 High | Estimated delivery distance in kilometers |
| `isOpen` | Boolean | 🟢 High | Real-time open/active status flag |
| `serviceability` | String | 🟢 High | Location delivery serviceability status |

#### 🍲 Culinary, Pricing & Ratings

| Field | Type | Coverage | Description |
|---|---|---|---|
| `cuisines` | Array | 🟢 High | List of food categories and culinary specialties |
| `costForTwo` | String | 🟢 High | Raw price indicator (e.g. `"₹350 for two"`) |
| `costForTwoAmount` | Number | 🟢 High | Extracted numeric cost for two in INR |
| `avgRating` | Number | 🟢 High | Average customer rating (0.0 – 5.0) |
| `totalRatings` | Number | 🟢 High | Normalized total review count as integer |
| `vegOnly` | Boolean | 🟡 Conditional | `true` if the restaurant is exclusively vegetarian |
| `externalRating` | Number | 🟡 Conditional | External aggregate rating when available |
| `externalRatingCount` | Number | 🟡 Conditional | Normalized external rating volume count |
| `externalRatingSource` | String | 🟡 Conditional | Origin source of external rating |
| `scrapedAt` | String | 🟢 High | ISO 8601 scrape completion timestamp |

***

### 💻 Sample Output (JSON)

```json
{
  "id": "10575",
  "name": "Pizza Hut",
  "chainId": "893",
  "url": "https://www.swiggy.com/menu/10575",
  "imageUrl": "https://media-assets.swiggy.com/swiggy/image/upload/fl_lossy,f_auto,q_auto,w_660/2b4f5e8830005011f302ad5865a7",
  "city": "Bangalore",
  "locality": "Koramangala",
  "areaName": "5th Block",
  "lat": 12.9716,
  "lng": 77.5946,
  "deliveryTimeMin": 28,
  "lastMileTravelKm": 2.4,
  "isOpen": true,
  "serviceability": "SERVICEABLE",
  "cuisines": [
    "Pizzas",
    "Fast Food",
    "Beverages"
  ],
  "costForTwo": "₹350 for two",
  "costForTwoAmount": 350,
  "avgRating": 4.2,
  "totalRatings": 15000,
  "vegOnly": false,
  "externalRating": 4.1,
  "externalRatingCount": 3200,
  "externalRatingSource": "Google",
  "scrapedAt": "2026-11-10T13:35:00.000Z"
}
```

```json
{
  "id": "25620",
  "name": "Meghana Foods",
  "chainId": "442",
  "url": "https://www.swiggy.com/menu/25620",
  "imageUrl": "https://media-assets.swiggy.com/swiggy/image/upload/fl_lossy,f_auto,q_auto,w_660/xqwpuhgnsaf18n4vvxyf",
  "city": "Bangalore",
  "locality": "Indiranagar",
  "areaName": "100 Feet Road",
  "lat": 12.9784,
  "lng": 77.6408,
  "deliveryTimeMin": 22,
  "lastMileTravelKm": 1.8,
  "isOpen": true,
  "serviceability": "SERVICEABLE",
  "cuisines": [
    "Biryani",
    "Andhra",
    "South Indian",
    "Chinese"
  ],
  "costForTwo": "₹500 for two",
  "costForTwoAmount": 500,
  "avgRating": 4.5,
  "totalRatings": 28000,
  "vegOnly": false,
  "externalRating": 4.4,
  "externalRatingCount": 8900,
  "externalRatingSource": "Google",
  "scrapedAt": "2026-11-10T13:35:02.000Z"
}
```

***

### 🚀 How to Run Swiggy Scraper

#### Option 1: Apify Console

1. Navigate to the **Swiggy Scraper** page on Apify Store.
2. Select an Indian city from the dropdown or provide specific coordinates.
3. (Optional) Define a cuisine filter, minimum rating, or max results limit.
4. Click **Start** and monitor the real-time progress log.
5. Export your results via the **Export** tab in CSV, JSON, or Excel.

#### Option 2: Apify REST API

Trigger runs programmatically from any backend application:

```bash
curl --request POST \
  --url "https://api.apify.com/v2/acts/haketa~swiggy-scraper/runs?token=YOUR_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "city": "Mumbai",
    "cuisine": "Biryani",
    "minRating": 4.0,
    "maxItems": 250
  }'
```

#### Option 3: Python Client

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run_input = {
    "city": "Bangalore",
    "openOnly": True,
    "maxItems": 100,
    "sortBy": "rating"
}

run = client.actor("haketa/swiggy-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['name']} - {item['avgRating']} ⭐ - {item['costForTwo']}")
```

#### Option 4: JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('haketa/swiggy-scraper').call({
    city: 'Hyderabad',
    cuisine: 'Biryani',
    maxItems: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(items, ['name', 'locality', 'avgRating', 'deliveryTimeMin']);
```

***

### 📈 Pagination Architecture & Scale

Swiggy restricts single-coordinate discovery to restaurants within an immediate ~3–4 km delivery perimeter. To overcome this limitation and provide comprehensive citywide datasets:

1. **Spiral Coordinate Generator**: The actor calculates an expansive concentric coordinate grid originating from the city center.
2. **Radial Radius Stepping**: Each coordinate ring expands outward by ~2.5 km increments, capturing new delivery sectors without redundant query overlap.
3. **Multi-Page Cursor Traversal**: Within each coordinate node, the scraper exhausts the available restaurant cards using Swiggy's internal offset pagination.
4. **Global In-Memory Deduplication**: Every restaurant is tracked by unique identifier (`id`). Multi-point overlaps are filtered instantly, guaranteeing 0 duplicate records in your dataset.
5. **High-Volume Pagination**: Set `maxItems: 1000` or higher to run comprehensive scans across large metropolitan zones effortlessly.

```
Coordinate Grid Expansion Model:
         [Ring 2: +5.0 km]
      [Ring 1: +2.5 km]
   [City Center: (lat, lng)]  --> Spiral Outward --> Merge & Deduplicate
      [Ring 1: -2.5 km]
         [Ring 2: -5.0 km]
```

***

### 🛠️ Step-by-Step Integration Guides

#### Connecting with Google Sheets & Zapier

1. Navigate to the **Integrations** tab of your actor on Apify Console.
2. Select **Zapier** or **Make (Integromat)**.
3. Choose the trigger event: **Actor Run Succeeded**.
4. Map the dataset fields: `name`, `locality`, `avgRating`, `costForTwoAmount`, and `url` to your Google Sheet columns.
5. Turn on the Zap to automate lead enrichment every time a scrape finishes.

#### Setting Up Webhook Alerts

You can trigger downstream HTTP endpoints automatically when the actor completes:

1. Go to **Actor Settings** > **Webhooks**.
2. Add a new Webhook with event **Run succeeded**.
3. Point the target URL to your webhook handler or serverless function.
4. Payload includes run details and a direct download link to the fresh dataset.

***

### 💡 Best Practices & Pro Tips

- **Pinpoint University or IT Hubs**: Major tech corridors (e.g. Whitefield in Bangalore, HITEC City in Hyderabad, Cyber City in Gurgaon) have dense restaurant clusters. Use exact `lat` and `lng` for hyper-targeted intelligence.
- **Competitor Tracking**: Group multi-unit brands by `chainId` to measure outlet expansion across different urban sectors.
- **Cost vs. Delivery Optimization**: Combine `sortBy: "deliveryTime"` with `minRating: 4` to extract high-performing, fast-turnaround operators.
- **Automation Workflows**: Schedule daily or weekly runs using Apify Schedules to track new restaurant openings and rating shifts over time.
- **Exporting for CRM**: Export CSV format with `name`, `locality`, `city`, and `url` to immediately import qualified food-service leads into Salesforce or HubSpot.

***

### 📊 Comparison: Swiggy Scraper vs. Manual Scraping

| Dimension | Manual / DOM Scraping | Swiggy Scraper (This Actor) |
|---|---|---|
| **Setup Time** | Days of reverse engineering | 10 seconds |
| **Coordinate Coverage** | Single coordinate only | Spiral multi-point automated grid |
| **Deduplication** | Manual scripting required | Built-in zero duplicate guarantee |
| **Field Normalization** | Raw messy text strings | Clean floats, integers, and ISO timestamps |
| **Proxy Handling** | Manual IP pools & rotation | Auto-managed Apify Proxy rotation |
| **Data Formats** | Custom conversion code | One-click JSON, CSV, Excel, XML |
| **Reliability** | Breaks on UI updates | Robust protocol-level feed extraction |

***

### ❓ Frequently Asked Questions

#### Do I need a Swiggy account or special credentials?

No. This scraper operates on publicly available catalog feeds. No login, session cookies, or API keys are required.

#### Can I scrape menus, dishes, and item add-ons?

This actor focuses on restaurant metadata, ratings, delivery metrics, and operational statuses. For comprehensive itemized dish and menu scraping, see our specialized catalog tools.

#### What happens if I request an unlisted city?

If you specify a city name not currently in our built-in coordinate index, the actor will log an informative warning and use central coordinates. You can always input exact `lat` and `lng` coordinates for any location in India.

#### How are partial ratings handled?

When Swiggy provides external rating summaries (e.g. Google ratings aggregated onto Swiggy listings), they are extracted into `externalRating` and `externalRatingCount`. If unavailable, these fields are cleanly omitted.

#### Are datacenter proxies sufficient?

Yes. Swiggy partitions data based on location parameters rather than caller IP origins. Standard Apify datacenter proxies are automatically utilized to ensure fast throughput and zero IP throttling.

#### How fresh is the data?

All extractions occur in real-time. Delivery times, open/close status flags, and current ratings reflect the live platform status at the exact moment of execution.

#### Can I extract thousands of restaurants in a single run?

Yes. Simply specify `maxItems: 1000` or leave it at `0` for comprehensive city coverage. The actor will automatically traverse multiple coordinate perimeters until the target volume is collected.

***

### 🔗 Related Scrapers & Food Delivery Tools

- [Zomato Scraper](https://apify.com/haketa/zomato-scraper) — Extract Indian restaurants, menus, and reviews from Zomato.
- [DoorDash Scraper](https://apify.com/haketa/doordash-scraper) — Comprehensive North American restaurant and menu intelligence.
- [Grubhub Restaurant Scraper](https://apify.com/haketa/grubhub-scraper) — US food delivery menus, operational times, and ratings.
- [Just Eat Scraper](https://apify.com/haketa/just-eat-scraper) — European takeaway listings and merchant directories.

***

### 📋 Changelog

#### v1.2 (2026-11)

- **Unlocked 1,000+ Deep Pagination**: Removed restrictive page fetch limitations; spiral grid now automatically scales to satisfy deep extraction quotas.
- **Dynamic Spiral Expansion**: Increased coordinate ring depth up to 30 perimeter cycles to support massive metropolitan queries.
- **Schema Optimization**: Standardized `maxPages` and `maxItems` schema definitions with `0` as unlimited auto-pagination.
- **Enhanced Data Parsing**: Hardened numeric cost extraction (`costForTwoAmount`) and normalized external review volume counters.
- **Documentation Overhaul**: Added comprehensive architecture diagrams, integration workflows, and detailed field coverage indicators.

#### v1.1 (2026-08)

- Added coordinate auto-detection for 15 additional tier-2 Indian cities.
- Introduced client-side sorting by rating, delivery speed, and cost.
- Improved proxy retry resilience on HTTP 202 and 429 status codes.

#### v1.0 (2026-05)

- Initial release featuring keyless city & coordinate extraction.
- Automatic deduplication by restaurant ID.
- Integrated Apify dataset and KVS `OUTPUT` sync.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/swiggy-scraper/changelog.md

# Actor input Schema

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

Indian city name, e.g. Bangalore, Mumbai, Delhi, Hyderabad, Chennai, Pune, Kolkata. Ignored if lat & lng are given.

## `lat` (type: `string`):

Exact latitude (optional; overrides city).

## `lng` (type: `string`):

Exact longitude (optional; overrides city).

## `cuisine` (type: `string`):

Keep only restaurants whose cuisines contain this text, e.g. "Pizza", "Biryani", "Chinese" (optional).

## `minRating` (type: `integer`):

Keep only restaurants with at least this average rating (0 = no filter).

## `openOnly` (type: `boolean`):

Keep only restaurants currently open.

## `sortBy` (type: `string`):

Order of the output (applied to the collected set).

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

Maximum restaurants to extract. 0 = unlimited, governed by page cap or city exhaustion.

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

Total request budget across the city grid (~28 restaurants per fetch). Set to 0 for unlimited automatic pagination governed by maxItems.

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

Apify Proxy configuration. Datacenter proxy rotation is sufficient to prevent rate limits.

## Actor input object example

```json
{
  "city": "Bangalore",
  "minRating": 0,
  "openOnly": false,
  "sortBy": "default",
  "maxItems": 60,
  "maxPages": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `name` (type: `string`):

Restaurant name

## `cuisines` (type: `string`):

Cuisines

## `avgRating` (type: `string`):

Average rating

## `totalRatings` (type: `string`):

Total ratings

## `costForTwo` (type: `string`):

Cost for two

## `locality` (type: `string`):

Locality

## `areaName` (type: `string`):

Area

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

City

## `deliveryTimeMin` (type: `string`):

Delivery time minutes

## `isOpen` (type: `string`):

Currently open

## `chainId` (type: `string`):

Parent/chain id

## `externalRating` (type: `string`):

External aggregated rating

## `imageUrl` (type: `string`):

Image URL

## `id` (type: `string`):

Restaurant ID

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

Swiggy URL

## `scrapedAt` (type: `string`):

ISO timestamp

# 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 = {
    "city": "Bangalore",
    "maxItems": 60,
    "maxPages": 0,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "city": "Bangalore",
    "maxItems": 60,
    "maxPages": 0,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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