# 2GIS Places Scraper (`powerai/2gis-places-scraper`) Actor

Scrape 2GIS places: names, addresses, phones, reviews, photos and more

- **URL**: https://apify.com/powerai/2gis-places-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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.

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

## 2GIS Places Scraper

Extract business and place listings from 2GIS for local search, lead generation, market research and area-based POI collection. Search by keyword and city, optionally enrich each place with contacts, reviews and photos.

### Features

- Text search across country-specific 2GIS domains
- Structured place records: name, address, coordinates, categories, hours, ratings
- Optional contacts: phones, emails, websites, social links
- Optional reviews with sort and rating filters
- Optional photos / media gallery
- Direct firm ID or firm URL input

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `query` | array | `["restaurant"]` | Search terms as typed on 2GIS |
| `locationQuery` | string | `Moscow` | City / area text used to open the city map |
| `maxItems` | integer | `50` | Max places per search term |
| `domain` | string | auto → `2gis.ru` | Country domain (`2gis.ru`, `2gis.kz`, …) |
| `language` | string | auto | Result language |
| `includeContacts` | boolean | `false` | Add phones, emails, websites, socials |
| `maxReviewsPerPlace` | integer | `0` | Reviews per place (`0` = off) |
| `reviewSortBy` | string | `trust` | `trust` or `friends` (newest) |
| `reviewRatings` | string | `all` | `all`, `positive`, or `negative` |
| `includeUnratedReviews` | boolean | `true` | Also fetch unrated reviews |
| `maxMediaPerPlace` | integer | `0` | Photos per place (`0` = off) |
| `organizationIds` | array | — | Firm IDs or 2GIS firm URLs |
| `proxyConfiguration` | object | — | Optional proxy |

#### Input example

```json
{
  "query": ["restaurant", "coffee shop"],
  "locationQuery": "Moscow",
  "maxItems": 20,
  "domain": "2gis.ru",
  "includeContacts": true,
  "maxReviewsPerPlace": 10,
  "maxMediaPerPlace": 5
}
```

#### Direct firm IDs

```json
{
  "organizationIds": [
    "70000001029041950",
    "https://2gis.ru/moscow/firm/70000001029041950"
  ],
  "includeContacts": true,
  "maxReviewsPerPlace": 20
}
```

### Output

Each place is one dataset item. Core fields:

| Field | Description |
|-------|-------------|
| `id` / `title` / `shortName` / `url` | Place identity and 2GIS link |
| `address` / `location` | Address and coordinates |
| `rubrics` / `category` / `attributeGroups` | Categories and attributes |
| `working_hours` | Opening hours by weekday |
| `totalScore` / `reviewsCount` | Rating summary |
| `phoneText` / `phoneValue` / `email` / `website` / `socials` | Contacts (when enabled) |
| `reviews` / `reviewsMeta` | Reviews (when enabled) |
| `media` / `mediaMeta` | Photos (when enabled) |
| `searchString` / `searchUrl` | Search that produced the row |

#### Output example

```json
{
  "id": "70000001029041950",
  "title": "Мясо&Рыба, ресторан",
  "shortName": "Мясо&Рыба",
  "url": "https://2gis.ru/moscow/firm/70000001029041950",
  "address": "Автозаводская улица, 18",
  "location": { "lat": 55.705348, "lng": 37.641568 },
  "totalScore": 4.8,
  "reviewsCount": 206,
  "phoneText": "+7 (495) 231‒17‒77",
  "website": "http://meat-and-fish.ru",
  "searchString": "restaurant"
}
```

### Tips

- Put the city in `locationQuery` (or use a known city slug such as `moscow`, `almaty`, `spb`).
- Contacts, reviews and media make the output richer but slower — start with a small `maxItems`.
- Pick the matching `domain` for non-Russia cities (e.g. `2gis.kz` for Almaty).
- Results per search are limited by the map viewport 2GIS loads (often up to ~200 places).

# Actor input Schema

## `query` (type: `array`):

What to search on 2GIS, e.g. restaurant, dentist, coffee shop. Each term is searched separately under the same location.

## `locationQuery` (type: `string`):

City or area as free text (e.g. Moscow, Almaty, Санкт-Петербург). Used to pick the 2GIS city map.

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

Maximum places to collect for each search term. Limited by what 2GIS returns for the current map viewport (often up to ~200).

## `domain` (type: `string`):

2GIS site domain for the target country. Leave empty for automatic (defaults to 2gis.ru).

## `language` (type: `string`):

Interface / result language. Leave empty for the domain default.

## `includeContacts` (type: `boolean`):

Add phone numbers, emails, websites and social links for each place.

## `maxReviewsPerPlace` (type: `integer`):

How many reviews to save per place. 0 disables review collection.

## `reviewSortBy` (type: `string`):

How to sort reviews: trust (default) or friends (newest).

## `reviewRatings` (type: `string`):

Which rated reviews to keep: all, positive (4–5), or negative (1–2).

## `includeUnratedReviews` (type: `boolean`):

Also request reviews without a star rating when collecting reviews.

## `maxMediaPerPlace` (type: `integer`):

How many photos/videos to save per place. 0 disables media collection.

## `organizationIds` (type: `array`):

Scrape specific places by 2GIS firm ID or firm URL. When set, these are collected directly (in addition to search terms).

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

Optional proxy. A residential proxy in the target country can improve reliability.

## Actor input object example

```json
{
  "query": [
    "restaurant"
  ],
  "locationQuery": "Moscow",
  "maxItems": 50,
  "domain": "",
  "language": "",
  "includeContacts": false,
  "maxReviewsPerPlace": 0,
  "reviewSortBy": "trust",
  "reviewRatings": "all",
  "includeUnratedReviews": true,
  "maxMediaPerPlace": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Table view of 2GIS places.

## `rawResults` (type: `string`):

All dataset items without a specific view.

# 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 = {
    "query": [
        "restaurant"
    ],
    "locationQuery": "Moscow",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/2gis-places-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 = {
    "query": ["restaurant"],
    "locationQuery": "Moscow",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("powerai/2gis-places-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 '{
  "query": [
    "restaurant"
  ],
  "locationQuery": "Moscow",
  "maxItems": 50
}' |
apify call powerai/2gis-places-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerai/2gis-places-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/vo20oEJc7pnW67ErY/builds/NyTFwiOlPiZdXR8h6/openapi.json
