# 2GIS Business Scraper — Phones, Sites & Emails (`thenetaji/2gis-place-scraper`) Actor

Read a 2GIS organisation in full from its id: the phone numbers, websites and email addresses a search row never carries, plus the street address with its city, coordinates, every category, opening hours, the chain it belongs to and 2GIS's own structured attributes.

- **URL**: https://apify.com/thenetaji/2gis-place-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.50 / 1,000 business records

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## 2GIS Business Scraper

One 2GIS organisation read in full from its id — including the three fields a search row can
never carry: the phone numbers, the websites and the email addresses. Alongside them the row
holds the street address with its city, map coordinates, every category, opening hours, the
chain the branch belongs to with its branch count, the branch's own rating beside the chain's,
and 2GIS's full structured attribute groups.

This Actor exists because of one measured fact: **2GIS's own search request omits contact
fields entirely.** The same organisation returns no contacts at all from a search and four
phone numbers, a website and two email addresses from here. It is a property of which lookup
you make, not of the business, so no amount of paging a search will ever produce a phone
number.

### Accepted input

`placeIds` is required and takes one 2GIS branch id per line — exactly the `id` every [2GIS
Search Scraper](https://apify.com/thenetaji/2gis-search-scraper) row publishes, which is how
the two compose.

Three forms all reduce to the same value and can be mixed in one list: the bare id
(`70000001007179642`), a 2GIS place link
(`https://2gis.ru/moscow/firm/70000001007179642`), and the decorated id from a raw 2GIS
search response (`70000001007179642_ku4dsp…`). That last one is worth knowing about: 2GIS's
own search keys a row as the branch id plus a 130-character per-request context blob, and the
blob works nowhere else on the site — not here, not on reviews, not on the public place URL.

`locale` is optional and takes one of the city's own locales, written as `ru_RU` or `en_AE`.
Leave it empty for the city's default. A locale a city does not offer is refused by 2GIS
outright rather than falling back.

`maxItems` defaults to `100` and caps how many businesses the run reads. One business is one
request and one row here, so it is a cap on the list rather than on a page of results.

```json
{
  "placeIds": [
    "70000001007179642",
    "https://2gis.ru/moscow/firm/70000001006123456"
  ],
  "locale": "ru_RU",
  "maxItems": 100
}
```

### Response fields

```json
{
  "requested_id": "70000001007179642",
  "id": "70000001007179642",
  "name": "Му-Му, кафе",
  "type": "branch",
  "url": "https://2gis.ru/moscow/firm/70000001007179642",
  "phones": ["+74957818781", "+74959999999"],
  "websites": ["https://mu-mu.ru"],
  "emails": ["info@mu-mu.ru"],
  "contacts": {
    "phones": [
      {
        "value": "+74957818781",
        "text": "+7 (495) 781‒87‒81",
        "comment": "служба доставки",
        "tracking_url": null
      }
    ],
    "websites": [
      {
        "value": "https://mu-mu.ru",
        "text": "mu-mu.ru",
        "tracking_url": "http://link.2gis.ru/1.2/97BA0CE6/…"
      }
    ],
    "emails": []
  },
  "street_address": "Манежная площадь, 1 ст2",
  "address_comment": "-2 этаж; Средний уровень",
  "building_name": "Охотный ряд",
  "postcode": "125009",
  "country": "Россия",
  "region": "Москва",
  "address_city": "Москва",
  "district": "Тверской",
  "latitude": 55.755301,
  "longitude": 37.614586,
  "region_id": "32",
  "city_alias": "moscow",
  "primary_rubric": "Кафе",
  "rubrics": [{ "id": "161", "name": "Кафе", "kind": "primary" }],
  "schedule": { "Mon": { "working_hours": [{ "from": "09:00", "to": "22:00" }] } },
  "attribute_groups": [{ "name": "Средний счёт" }],
  "chain_id": "4504136498368318",
  "chain_name": "Му-Му, кафе",
  "chain_branch_count": 18,
  "rating": 4.8,
  "review_count": 1090,
  "org_rating": 4.3,
  "org_review_count": 7817,
  "is_reviewable": true
}
```

Fields absent from a record are returned as null rather than omitted, so every row has the
same shape.

Contacts are published **twice, on purpose**. `phones`, `websites` and `emails` are plain
lists of the real values — the dialable number, the actual website, the mailbox — which is
what a spreadsheet wants. `contacts` keeps everything beside them: 2GIS's own formatting of
each number, the comment naming which department it belongs to, and its click-tracking
redirector.

That redirector is why the two exist. **2GIS itself puts its `link.2gis.ru` tracking link
where the website should be**, and the real address in a separate field — the inverse of what
it does for phones and emails. Republishing that verbatim would hand you a tracking link as a
business's website. So the two are swapped back, `websites` always carries the real site, and
the redirector is kept under `tracking_url` inside `contacts` rather than thrown away.

`street_address` is the **street line only** — the city is not in it. That is 2GIS's own
shape, and the city is lifted out of its administrative division list into `address_city`.

`rating` and `org_rating` are both published because a branch of a chain frequently disagrees
with its parent. `review_count` is the branch's rating count, and it is larger than the number
of written reviews [2GIS Reviews
Scraper](https://apify.com/thenetaji/2gis-reviews-scraper) will return, because 2GIS counts
star-only ratings here and returns written reviews there.

`attribute_groups` is 2GIS's own structured attribute list — average cheque, cuisine,
amenities — grouped as it groups them. It is republished whole rather than renamed, because
there is no measured field list to rename it into, and renaming fields nobody has seen
populated publishes a permanently-null column and calls it a schema.

### Behaviour on partial results

A branch that no longer resolves is skipped with a line in the run log and the rest of the
list still runs — twenty ids taken from a search last week will not all still be listed, and
losing nineteen good rows to one closed restaurant is the wrong trade.

An entry that is not a branch id is skipped before any request is made, with a message naming
the shape.

A business that publishes no contacts returns a successful row with empty lists rather than
nulls, so the column can be counted without special-casing. The run log states how many phone
numbers, websites and email addresses arrived for each one, because that is the reason the
request was spent.

### Frequently asked questions

**Why is this a separate Actor rather than an option on the search?**
Because it is a separate cost, by a factor of fifty. A search request returns fifty
organisations and this one returns one, so folding it into the search as a checkbox would
hide a fifty-fold price difference behind a tick box. It is priced on its own cost driver
instead.

**Where do I get branch ids?**
From [2GIS Search Scraper](https://apify.com/thenetaji/2gis-search-scraper) — every row
publishes exactly the value this takes, as `id`. A 2GIS place link works too if you have one
in a browser.

**I pasted the id from a 2GIS API response and it was rejected.**
That is the decorated search id: the branch id plus a 130-character per-request context blob.
It is accepted here and reduced automatically, so if it was rejected the value was something
else — check for a truncated paste.

**Why does the website column not match what I see in 2GIS's own JSON?**
Because 2GIS puts its click-tracking redirector in the value position for websites and the
real address elsewhere, the inverse of what it does for phones. The two are swapped back
here; the redirector is still available under `contacts.websites[].tracking_url`.

**Can I look a business up by name instead of by id?**
Not here. [2GIS Search Scraper](https://apify.com/thenetaji/2gis-search-scraper) is the
lookup by name, and its rows carry the ids this takes.

**Is a 2GIS account or API key required?**
No. No account, session cookie or key of any kind is supplied to the Actor or needed by it.
Open the `url` on any row and you see the same record.

### Related Actors

[2GIS Search Scraper](https://apify.com/thenetaji/2gis-search-scraper) is where the ids come
from: business search across 206 cities, with a flag on every row saying whether 2GIS matched
the query at all.

[2GIS Reviews Scraper](https://apify.com/thenetaji/2gis-reviews-scraper) takes the same ids
and returns the written reviews, each naming which source it came from — 2GIS aggregates
Flamp, Booking and others under one listing.

[2GIS Covered Cities](https://apify.com/thenetaji/2gis-cities-scraper) lists the city slugs
and the locales each city accepts, which is what the `locale` input here needs.

# Actor input Schema

## `placeIds` (type: `array`):

2GIS branch ids, one per line — exactly the `id` every search row publishes, which is how these Actors compose. A full 2GIS place link and the decorated id from a raw 2GIS search response are both accepted and reduce to the same value.

## `locale` (type: `string`):

One of the city's own locales, written as `ru_RU` or `en_AE`. Leave it empty for the city's default. This is not a translation layer: a locale a city does not offer is refused by 2GIS outright — Dubai serves `en_AE` and refuses `en_US` — and the Covered Cities Actor lists each city's set.

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

Maximum number of businesses to read. Set 0 for no limit. One business is one request and one row here, so this is a cap on the list rather than on a page of results.

## Actor input object example

```json
{
  "placeIds": [
    "70000001007179642"
  ],
  "locale": "ru_RU",
  "maxItems": 10
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "placeIds": [
        "70000001007179642"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/2gis-place-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 = {
    "placeIds": ["70000001007179642"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/2gis-place-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 '{
  "placeIds": [
    "70000001007179642"
  ],
  "maxItems": 10
}' |
apify call thenetaji/2gis-place-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/2gis-place-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/6xYypFBYXztYGNT9b/builds/22ovAmFfvkVdbcYth/openapi.json
