# Zomato Restaurant Extractor (`kawsar/zomato-restaurant-extractor`) Actor

Zomato restaurant extractor that pulls ratings, cuisines, hours, and contact details from any restaurant page, so market researchers and analysts get structured data without manual work.

- **URL**: https://apify.com/kawsar/zomato-restaurant-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Zomato Restaurant Extractor: scrape restaurant data from any Zomato city or listing page

Pull restaurant data from Zomato at scale. Give it a city page, a cuisine sub-page, or individual restaurant URLs and the actor returns names, ratings, review counts, cuisines, addresses, localities, images, and more as structured JSON. It follows pagination automatically to fill your dataset without extra configuration.

### What URLs does this actor accept?

You can pass three types of Zomato URLs:

| URL type | Example | What you get |
|----------|---------|--------------|
| City page | `https://www.zomato.com/mumbai` | All restaurants in Mumbai across pages |
| Cuisine sub-page | `https://www.zomato.com/mumbai/restaurants/chinese` | All Chinese restaurants in Mumbai |
| Individual restaurant | `https://www.zomato.com/mumbai/bademiya-colaba/info` | That single restaurant's data |

Mix all three types freely in one run.

### Use cases

- **Market research**: collect ratings, review volumes, and cuisine spread across a city to spot gaps and benchmark competitors
- **Local business directories**: build or refresh restaurant listings for any Zomato city in one run
- **Food delivery analysis**: gather cuisine data, addresses, and listing images for delivery zone planning
- **Hospitality benchmarking**: pull all restaurants in a locality or cuisine category and compare ratings on a schedule
- **Lead generation**: build contact lists of restaurants in a city with addresses and localities
- **Content and SEO**: populate travel guides and local pages with accurate, current restaurant details
- **Academic research**: collect structured restaurant datasets for food-tech, urban planning, or consumer behavior studies

### How it works

1. Fetches each URL through built-in bypass infrastructure that handles anti-bot protection
2. Reads restaurant data from the page's embedded Schema.org structured data
3. For city and cuisine pages, automatically paginates through `?page=2`, `?page=3`, and so on until `maxItems` is reached
4. If page pagination is exhausted (common for smaller cities), discovers and scrapes cuisine sub-pages to find more restaurants
5. Deduplicates all results by restaurant URL across pages and sub-pages
6. Returns every restaurant as a JSON record in the dataset

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `urls` | array of strings | | One or more Zomato URLs to scrape. Accepts city pages, cuisine sub-pages, and individual restaurant pages. |
| `maxItems` | integer | 15 | Maximum restaurant records to collect per URL. Each URL gets its own independent limit. |
| `requestTimeoutSecs` | integer | 60 | Per-request timeout in seconds. Increase for slow connections. |

#### Example input — city page

```json
{
    "urls": ["https://www.zomato.com/mumbai"],
    "maxItems": 50
}
````

#### Example input — multiple cities

```json
{
    "urls": [
        "https://www.zomato.com/delhi",
        "https://www.zomato.com/bangalore",
        "https://www.zomato.com/hyderabad"
    ],
    "maxItems": 100
}
```

#### Example input — cuisine filter

```json
{
    "urls": ["https://www.zomato.com/mumbai/restaurants/chinese"],
    "maxItems": 30
}
```

#### Example input — individual restaurants

```json
{
    "urls": [
        "https://www.zomato.com/mumbai/bademiya-colaba/info",
        "https://www.zomato.com/delhi/indian-accent-new-delhi/info"
    ],
    "maxItems": 10
}
```

### What data does this actor extract?

Each result in the dataset looks like this:

```json
{
    "restaurantId": "18746496",
    "restaurantName": "Sher e Punjab",
    "restaurantUrl": "https://www.zomato.com/gangtok/sher-e-punjab-arithang/info",
    "imageUrl": "https://b.zmtcdn.com/data/pictures/6/18746496/58a260cf4d9ee9e33d3464afa03a8738_featured_v2.jpg",
    "rating": 4.2,
    "ratingCount": 3755,
    "cuisines": "Chinese, North Indian",
    "city": "Gangtok",
    "locality": "Arithang",
    "address": "Ward 10, Upper Arithang, Arithang, Gangtok",
    "scrapedAt": "2025-05-21T12:13:43.181000+00:00",
    "error": null
}
```

| Field | Type | Description |
|-------|------|-------------|
| `restaurantId` | string | Numeric Zomato restaurant ID extracted from the listing image URL |
| `restaurantName` | string | Full restaurant name |
| `restaurantUrl` | string | Canonical Zomato page URL |
| `imageUrl` | string | Featured image URL from the restaurant listing |
| `rating` | number | Aggregate rating on a 0.0 to 5.0 scale |
| `ratingCount` | integer | Total number of ratings and reviews |
| `cuisines` | string | Comma-separated cuisine types |
| `city` | string | City where the restaurant is located |
| `locality` | string | Neighbourhood or locality, parsed from the address |
| `address` | string | Full street address |
| `scrapedAt` | string | ISO 8601 timestamp of when the data was collected |
| `error` | string | Error message if extraction failed, otherwise null |

### Pagination explained

Zomato serves about 9 restaurants per listing page. The actor handles this automatically:

1. Fetches the first page of the given URL
2. If `maxItems` is not yet reached, fetches `?page=2`, `?page=3`, and so on
3. If page pagination stops yielding new restaurants (happens in smaller cities where all restaurants fit on one page), the actor switches to cuisine sub-pages discovered from the first page
4. Cuisine sub-pages (e.g. `/mumbai/restaurants/chinese`) each contain a separate set of restaurants and also support pagination

`maxItems` is applied per URL. If you pass three city URLs with `maxItems: 50`, the actor collects up to 50 restaurants from each city (up to 150 total).

For a city like Mumbai, you can collect hundreds of restaurants by setting a higher `maxItems`. For smaller cities like Gangtok that have fewer restaurants total, the actor collects what is available and stops.

### FAQ

**Which countries and cities does this work for?**
Any city where Zomato operates. Just go to Zomato, navigate to a city page, and copy the URL. Zomato covers India, UAE, Australia, New Zealand, and others.

**How do I find a Zomato city URL?**
Open `https://www.zomato.com` in your browser, search for or click on a city, and copy the URL from the address bar. It looks like `https://www.zomato.com/{city}`.

**How do I target a specific cuisine?**
From any Zomato city page, click a cuisine filter (e.g. Chinese) and copy the resulting URL. It looks like `https://www.zomato.com/{city}/restaurants/{cuisine}`.

**How many restaurants can I scrape per run?**
Up to 1000 per URL. Set `maxItems` to control the cap. For large cities with many restaurants, the actor will paginate and use cuisine sub-pages to reach the limit.

**What happens if a URL fails?**
The actor records the error under the `error` field for that URL and continues with the rest of the list. One failure does not stop the run.

**Can I scrape multiple cities in one run?**
Yes. Add all city URLs to the `urls` list. `maxItems` is applied independently per URL, so each city gets its own limit.

### Integrations

Connect Zomato Restaurant Extractor with other apps and services using [Apify integrations](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions whenever results are available.

# Actor input Schema

## `urls` (type: `array`):

List of Zomato URLs to process in one run. Mix city pages and individual restaurant pages freely.

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

Maximum total number of restaurant records to push to the dataset.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "urls": [
    "https://www.zomato.com/gangtok",
    "https://www.zomato.com/mumbai"
  ],
  "maxItems": 15,
  "requestTimeoutSecs": 60
}
```

# 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 = {
    "urls": [
        "https://www.zomato.com/gangtok"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/zomato-restaurant-extractor").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 = { "urls": ["https://www.zomato.com/gangtok"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/zomato-restaurant-extractor").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 '{
  "urls": [
    "https://www.zomato.com/gangtok"
  ]
}' |
apify call kawsar/zomato-restaurant-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Zomato Restaurant Extractor",
        "description": "Zomato restaurant extractor that pulls ratings, cuisines, hours, and contact details from any restaurant page, so market researchers and analysts get structured data without manual work.",
        "version": "0.0",
        "x-build-id": "dNuhMxKQMHJurUUBl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~zomato-restaurant-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-zomato-restaurant-extractor",
                "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/kawsar~zomato-restaurant-extractor/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-zomato-restaurant-extractor",
                "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/kawsar~zomato-restaurant-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-zomato-restaurant-extractor",
                "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": {
                    "urls": {
                        "title": "Zomato URLs (batch)",
                        "type": "array",
                        "description": "List of Zomato URLs to process in one run. Mix city pages and individual restaurant pages freely.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum total number of restaurant records to push to the dataset.",
                        "default": 15
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 10,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Per-request timeout in seconds.",
                        "default": 60
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
