# 2gis Scraper (`codingfrontend/2gis-scraper`) Actor

Scrape public 2GIS search pages for business names, addresses, categories, ratings, working hours, and geographic coordinates.

- **URL**: https://apify.com/codingfrontend/2gis-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 78.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does 2GIS Scraper do?

2GIS Scraper finds public business listings on [2GIS](https://2gis.com/) and collects details that are available on those pages, such as names, structured addresses, organization branches, grouped amenities, ratings, contacts, opening schedules, photo-album metadata, and visible reviews. It uses public pages and does not sign in or request private account data.

Use the results to build a local business directory, compare public business information, research locations, or prepare a contact list from publicly listed details.

### How to run the Actor

1. Open the Actor and select **Input**.
2. Enter one or more business searches, or add public 2GIS URLs. Review the limits below and adjust them if needed.
3. Select **Start** to run the Actor.
4. Open **Output** to browse the business dataset. Use the separate **Output summary** link to see the run count and status.

#### Input fields

No field is individually required. The default query is `restaurant`. If you clear the query list, provide at least one URL or the Actor will reject the input. Query searches and supplied URLs are combined when both are present.

##### Search settings

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `queries` | Array of strings | Optional | `["restaurant"]` | Business names or categories to search. Up to 50 entries; each must contain 1–200 characters. Set it to `[]` to use only `startUrls`. |
| `city` | String | Optional | None | Selects the city route for generated searches using its public 2GIS URL alias, such as `dubai` or `moscow`. Case is normalized and spaces become hyphens. Maximum 200 characters. It does not change supplied URLs. |
| `startUrls` | Array of objects with a `url` string | Optional | `[]` | Public 2GIS search or listing pages to read. Up to 50 URLs, each at most 1,000 characters. Use HTTPS on a supported 2GIS domain. |

##### Result limits

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `maxItems` | Integer | Optional | `200` | Maximum number of unique business listings across all queries and URLs. Range: 1–5,000. |

##### Request settings

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `requestTimeoutSecs` | Integer | Optional | `30` | Timeout for each page request, in seconds. Range: 5–120. |
| `detailLimit` | Integer | Optional | `5` | Number of the first listings selected for additional detail-page and linked organization-branch enrichment. Range: 0–20. Set to `0` to skip additional detail-page requests. |
| `includeReviewDetails` | Boolean | Optional | `true` | When enabled, also checks the public review tab for each listing selected by `detailLimit` and saves visible review snippets from that fetched page, with published ratings, reviewer information, and useful-vote counts. It does not fetch the complete review history. Set to `false` to skip those review-tab requests. |

Queries create public 2GIS search pages. When `city` is supplied, it selects the URL's city route rather than becoming part of the business search text. Use the city alias shown in a public 2GIS URL; arbitrary place names may not have a supported route. For precise local searches, you can also copy a search URL directly from 2GIS into `startUrls`. Supplied URLs are processed alongside query searches; URL input does not override a non-empty query list. Exact duplicate URLs are removed, and duplicate businesses are collapsed by business ID or listing URL. A supplied business URL reads that business's profile directly, even when `detailLimit` is `0`; this setting controls additional enrichment requests. Already fetched pages are reused. `maxItems` is one overall limit across all sources. The Actor makes a bounded search pass and does not offer pagination, filters, or sorting controls. It may return fewer listings than requested if pages are empty, unavailable, or restrict access.

Supported URL hosts are HTTPS 2GIS domains ending in `.2gis.com`, `.2gis.ru`, `.2gis.kz`, `.2gis.ae`, `.2gis.uz`, `.2gis.kg`, `.2gis.ge`, or `.2gis.by`, including their subdomains. URLs with credentials or a custom port are rejected.

#### Copyable input examples

Search for businesses in a city with a small result limit:

```json
{
  "queries": ["cafes"],
  "city": "Dubai",
  "maxItems": 10
}
```

Use a 2GIS URL without also running the default `restaurant` search:

```json
{
  "queries": [],
  "startUrls": [
    { "url": "https://2gis.ae/dubai/search/Cafes" }
  ],
  "maxItems": 10
}
```

Combine several query searches and URLs. The repeated URL is deduplicated automatically, and results share the same overall limit:

```json
{
  "queries": ["cafes", "bookstores"],
  "city": "Dubai",
  "startUrls": [
    { "url": "https://2gis.ae/dubai/search/Restaurants" },
    { "url": "https://2gis.ae/dubai/search/Bakeries" },
    { "url": "https://2gis.ae/dubai/search/Restaurants" }
  ],
  "maxItems": 30
}
```

Skip detail and review-page requests:

```json
{
  "queries": ["pharmacies"],
  "city": "Dubai",
  "maxItems": 20,
  "detailLimit": 0,
  "includeReviewDetails": false
}
```

### Output

Each dataset item is one validated business listing. Only fields available from the public listing or the bounded detail-page sample are included; missing values are left out. Detail pages can add source name components, timezone offset, coordinates, address components and administrative divisions, contact roles and their schedules, grouped services and attributes, organization identity, listing dates, nearby facilities, and photo-album metadata. Listings selected by `detailLimit` also follow their published organization branch link; matching branches remain nested under the organization and do not create extra dataset rows. Optional review-tab requests retain visible review snippets from the fetched public review page, with published ratings, reviewer display names, and useful-vote counts. The Actor does not promise the complete review history or additional review pages. An unavailable optional detail or review page leaves the base business listing intact. Completed business rows are saved as they are collected; if a later search or detail request fails, the saved rows remain available and the Output summary marks the run as limited. A listing needs a business name and a canonical 2GIS listing URL. The following complete example is **illustrative** and is not a verified live result:

```json
{
  "businessId": "700000000000001",
  "name": "Sun Cafe",
  "nameDetails": {
    "primary": "Sun Cafe",
    "extension": "Cafe",
    "shortName": "Sun"
  },
  "timezoneOffsetMinutes": 240,
  "address": "1 Example Street, Dubai, Level 1",
  "addressComment": "Level 1",
  "city": "dubai",
  "categories": [
    "Cafe",
    "Restaurant"
  ],
  "services": [
    "Outdoor seating",
    "Delivery"
  ],
  "businessType": "branch",
  "rating": 4.8,
  "reviewCount": 120,
  "reviewCountWithStars": 118,
  "organizationRating": 4.8,
  "organizationReviewCount": 240,
  "latitude": 25.2048,
  "longitude": 55.2708,
  "workingHours": {
    "Mon": "09:00-22:00",
    "Tue": "09:00-22:00",
    "Wed": "09:00-22:00",
    "Thu": "09:00-22:00",
    "Fri": "09:00-23:00",
    "Sat": "09:00-23:00",
    "Sun": "09:00-22:00"
  },
  "phoneNumbers": [
    "+971 50 000 0000"
  ],
  "websiteUrl": "https://sun-cafe.example/",
  "socialLinks": [
    {
      "type": "instagram",
      "url": "https://instagram.com/sun-cafe"
    }
  ],
  "imageUrl": "https://images.example/sun-cafe-cover.jpg",
  "imageUrls": [
    "https://images.example/sun-cafe-interior.jpg",
    "https://images.example/sun-cafe-food.jpg"
  ],
  "photoCount": 18,
  "price": "AED 80 average bill",
  "averagePrice": 80,
  "priceCurrency": "AED",
  "listingUrl": "https://2gis.ae/firm/700000000000001",
  "description": "A neighborhood cafe serving coffee and light meals.",
  "reviewSnippets": [
    {
      "text": "Friendly service and a comfortable place to meet.",
      "rating": 5,
      "author": {
        "name": "Example Reviewer",
        "reviewCount": 14
      },
      "helpfulCount": 2
    },
    {
      "text": "Good coffee and fresh pastries."
    }
  ],
  "addressDetails": {
    "buildingId": "13933647000000001",
    "buildingName": "Example Building",
    "floorId": "13934000000000001",
    "makani": "12345 67890",
    "components": [
      {
        "type": "street_number",
        "number": "1",
        "street": "Example Street",
        "streetId": "13933750000000001"
      }
    ],
    "administrativeDivisions": [
      {
        "id": "14",
        "name": "UAE",
        "type": "country"
      },
      {
        "id": "13933634100000001",
        "name": "Dubai",
        "type": "city",
        "cityAlias": "dubai"
      }
    ],
    "entrances": [
      {
        "id": "13934055000000001",
        "isPrimary": true,
        "points": [
          {
            "latitude": 25.2048,
            "longitude": 55.2708
          }
        ]
      }
    ]
  },
  "categoryDetails": [
    {
      "id": "161",
      "name": "Cafe",
      "alias": "cafe_restaurants",
      "kind": "primary",
      "parentId": "2"
    },
    {
      "id": "159",
      "name": "Restaurant",
      "alias": "restaurants",
      "kind": "additional",
      "parentId": "2"
    }
  ],
  "attributeGroups": [
    {
      "name": "Amenities",
      "attributes": [
        {
          "id": "70000201000000001",
          "name": "Outdoor seating",
          "tag": "outdoor_seating"
        },
        {
          "id": "70000201000000002",
          "name": "Delivery",
          "tag": "delivery"
        }
      ]
    }
  ],
  "contactGroups": [
    {
      "contacts": [
        {
          "type": "phone",
          "value": "+971 50 000 0000",
          "comment": "delivery service"
        },
        {
          "type": "website",
          "url": "https://sun-cafe.example/"
        },
        {
          "type": "instagram",
          "url": "https://instagram.com/sun-cafe"
        }
      ],
      "schedule": {
        "is24x7": false,
        "days": {
          "Mon": [
            {
              "from": "09:00",
              "to": "22:00"
            }
          ],
          "Tue": [
            {
              "from": "09:00",
              "to": "22:00"
            }
          ],
          "Wed": [
            {
              "from": "09:00",
              "to": "22:00"
            }
          ],
          "Thu": [
            {
              "from": "09:00",
              "to": "22:00"
            }
          ],
          "Fri": [
            {
              "from": "09:00",
              "to": "23:00"
            }
          ],
          "Sat": [
            {
              "from": "09:00",
              "to": "23:00"
            }
          ],
          "Sun": [
            {
              "from": "09:00",
              "to": "22:00"
            }
          ]
        }
      }
    }
  ],
  "schedule": {
    "is24x7": false,
    "days": {
      "Mon": [
        {
          "from": "09:00",
          "to": "22:00"
        }
      ],
      "Tue": [
        {
          "from": "09:00",
          "to": "22:00"
        }
      ],
      "Wed": [
        {
          "from": "09:00",
          "to": "22:00"
        }
      ],
      "Thu": [
        {
          "from": "09:00",
          "to": "22:00"
        }
      ],
      "Fri": [
        {
          "from": "09:00",
          "to": "23:00"
        }
      ],
      "Sat": [
        {
          "from": "09:00",
          "to": "23:00"
        }
      ],
      "Sun": [
        {
          "from": "09:00",
          "to": "22:00"
        }
      ]
    }
  },
  "businessDates": {
    "createdAt": "2021-01-08T03:00:00Z",
    "updatedAt": "2026-09-26T00:58:19Z"
  },
  "photoAlbums": [
    {
      "type": "photo_album",
      "subtype": "common",
      "count": 18,
      "coverUrl": "https://images.example/sun-cafe-cover.jpg"
    }
  ],
  "organization": {
    "id": "700000000000100",
    "name": "Sun Cafe Group",
    "branchCount": 2,
    "branchesUrl": "https://2gis.ae/dubai/branches/700000000000100",
    "reviewCountWithStars": 236,
    "branches": [
      {
        "businessId": "700000000000001",
        "name": "Sun Cafe",
        "listingUrl": "https://2gis.ae/firm/700000000000001",
        "address": "1 Example Street, Dubai",
        "addressComment": "Level 1",
        "city": "dubai",
        "businessType": "branch",
        "latitude": 25.2048,
        "longitude": 55.2708,
        "categories": [
          "Cafe",
          "Restaurant"
        ],
        "rating": 4.8,
        "reviewCount": 120,
        "reviewCountWithStars": 118,
        "nameDetails": {
          "primary": "Sun Cafe",
          "extension": "Cafe",
          "shortName": "Sun"
        },
        "timezoneOffsetMinutes": 240,
        "addressDetails": {
          "buildingId": "13933647000000001",
          "buildingName": "Example Building",
          "floorId": "13934000000000001",
          "makani": "12345 67890",
          "components": [
            {
              "type": "street_number",
              "number": "1",
              "street": "Example Street",
              "streetId": "13933750000000001"
            }
          ],
          "administrativeDivisions": [
            {
              "id": "14",
              "name": "UAE",
              "type": "country"
            },
            {
              "id": "13933634100000001",
              "name": "Dubai",
              "type": "city",
              "cityAlias": "dubai"
            }
          ],
          "entrances": [
            {
              "id": "13934055000000001",
              "isPrimary": true,
              "points": [
                {
                  "latitude": 25.2048,
                  "longitude": 55.2708
                }
              ]
            }
          ]
        },
        "categoryDetails": [
          {
            "id": "161",
            "name": "Cafe",
            "alias": "cafe_restaurants",
            "kind": "primary",
            "parentId": "2"
          },
          {
            "id": "159",
            "name": "Restaurant",
            "alias": "restaurants",
            "kind": "additional",
            "parentId": "2"
          }
        ],
        "attributeGroups": [
          {
            "name": "Amenities",
            "attributes": [
              {
                "id": "70000201000000001",
                "name": "Outdoor seating",
                "tag": "outdoor_seating"
              },
              {
                "id": "70000201000000002",
                "name": "Delivery",
                "tag": "delivery"
              }
            ]
          }
        ],
        "schedule": {
          "is24x7": false,
          "days": {
            "Mon": [
              {
                "from": "09:00",
                "to": "22:00"
              }
            ],
            "Tue": [
              {
                "from": "09:00",
                "to": "22:00"
              }
            ],
            "Wed": [
              {
                "from": "09:00",
                "to": "22:00"
              }
            ],
            "Thu": [
              {
                "from": "09:00",
                "to": "22:00"
              }
            ],
            "Fri": [
              {
                "from": "09:00",
                "to": "23:00"
              }
            ],
            "Sat": [
              {
                "from": "09:00",
                "to": "23:00"
              }
            ],
            "Sun": [
              {
                "from": "09:00",
                "to": "22:00"
              }
            ]
          }
        },
        "businessDates": {
          "createdAt": "2021-01-08T03:00:00Z",
          "updatedAt": "2026-09-26T00:58:19Z"
        },
        "photoAlbums": [
          {
            "type": "photo_album",
            "subtype": "common",
            "count": 18,
            "coverUrl": "https://images.example/sun-cafe-cover.jpg"
          }
        ]
      },
      {
        "businessId": "700000000000002",
        "name": "Sun Cafe Marina",
        "listingUrl": "https://2gis.ae/dubai/firm/700000000000002",
        "city": "dubai",
        "rating": 4.8,
        "reviewCount": 120,
        "reviewCountWithStars": 118
      }
    ]
  },
  "nearby": {
    "landmarks": [
      {
        "id": "700000000000200",
        "name": "Example Square",
        "type": "adm_div",
        "subtype": "place",
        "distanceMeters": 100,
        "azimuthDegrees": 270
      }
    ],
    "stations": [
      {
        "id": "13933797300000001",
        "name": "Example Metro",
        "distanceMeters": 160,
        "comment": "Red Line 1",
        "routeTypes": [
          "metro"
        ]
      }
    ],
    "parking": [
      {
        "id": "13934067900000002"
      },
      {
        "id": "13934067900000001",
        "name": "Example Parking",
        "capacity": 20,
        "isPaid": true,
        "forElectricCars": true,
        "vehicleType": "car"
      }
    ]
  }
}
```

#### Output fields

Only `name` and `listingUrl` are required in each business item. Other fields are optional and may be absent when 2GIS does not provide them or the bounded detail request does not return them.

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `businessId` | String | Optional | Public 2GIS business identifier. |
| `name` | String | Required | Public business name. |
| `nameDetails` | Object | Optional | Source name components: `primary`, `extension`, and `shortName`. |
| `timezoneOffsetMinutes` | Integer, −840 to 840 | Optional | Source UTC offset in minutes for interpreting local opening hours. |
| `address` | String | Optional | Street or locality address. |
| `addressComment` | String | Optional | Floor, unit, or address note. |
| `city` | String | Optional | City label or alias supplied by the listing, such as `dubai`. |
| `categories` | Array of strings | Optional | Business categories. |
| `services` | Array of strings | Optional | Public services, amenities, cuisine, or assortment attributes. Price information is described separately in `price` and `averagePrice`. |
| `businessType` | String | Optional | Source entity kind, such as `branch`; it does not describe an industry category. |
| `rating` | Number, 0–5 | Optional | Listing rating. |
| `reviewCount` | Integer, 0 or more | Optional | Public review count. |
| `reviewCountWithStars` | Integer, 0 or more | Optional | Count of reviews with star ratings. |
| `organizationRating` | Number, 0–5 | Optional | Organization-level rating when available. |
| `organizationReviewCount` | Integer, 0 or more | Optional | Organization-level review count. |
| `latitude` | Number, −90 to 90 | Optional | Public latitude. |
| `longitude` | Number, −180 to 180 | Optional | Public longitude. |
| `workingHours` | Object of strings | Optional | Hours keyed by day or another source label. |
| `phoneNumbers` | Array of strings | Optional | Public phone numbers, with alternate formats of the same contact deduplicated. |
| `websiteUrl` | URL string | Optional | Public business website. |
| `socialLinks` | Array of objects | Optional | Each object contains `type` and `url` for a public profile. |
| `imageUrl` | URL string | Optional | A public business image URL. |
| `imageUrls` | Array of URL strings | Optional | Public business image URLs. |
| `photoCount` | Integer, 0 or more | Optional | Public profile photo count. |
| `price` | String | Optional | Price text published on the business page, such as an average-bill label. |
| `averagePrice` | Number, 0 or more | Optional | Numeric value only when the source explicitly labels an average bill; price ranges are not converted to an average. |
| `priceCurrency` | String | Optional | Currency associated with a price. |
| `listingUrl` | URL string | Required | Canonical public 2GIS listing URL. |
| `description` | String | Optional | Public business description. |
| `reviewSnippets` | Array of objects | Optional | Visible review snippets from the fetched public review page. Required `text`; optional 0–5 `rating`, `author`, and nonnegative `helpfulCount`. This is not the complete review history. |
| `addressDetails` | Object | Optional | Building and floor identifiers, street details, source administrative hierarchy, Makani codes, and entrance coordinates. |
| `organization` | Object | Optional | Source organization identity, name, total branch count, star-rating count, branch-list link, and matching branch details. |
| `categoryDetails` | Array of objects | Optional | Category names with native identifiers, source aliases, roles, and parent identifiers. |
| `attributeGroups` | Array of objects | Optional | Original section headings and their complete attribute texts, IDs, and classification tags. |
| `contactGroups` | Array of objects | Optional | Contacts grouped with published roles and group-specific schedules. A contact `value` may hold a phone number or a valid email address when 2GIS publishes one; email values are kept only when the source contains an actual address. Redirect links and internal routing email are excluded. |
| `schedule` | Object | Optional | Source 24/7 designation and all available opening intervals by day. Missing days are not assumed closed. |
| `businessDates` | Object | Optional | Source listing creation/update timestamps, preserved as published; these are not business founding dates or scrape timestamps. |
| `nearby` | Object | Optional | Nearby landmarks and transit stations, plus parking data combined from detailed parking links and nearest-parking IDs, deduplicated by ID. Some parking records contain only an ID. |
| `photoAlbums` | Array of objects | Optional | Published album categories, photo counts, and cover URLs. Individual gallery photos are not collected. |

#### Nested business details

All nested fields are optional unless identified below. An unavailable value is omitted; a source-published zero or false value is retained. Geographic names come from the source hierarchy, not from guesses about the address.

| Field or group | Nested structure and meaning |
| --- | --- |
| `nameDetails` | Optional source name strings `primary`, `extension`, and `shortName`. |
| `timezoneOffsetMinutes` | Optional integer source UTC offset in minutes, from −840 to 840. |
| `addressDetails` | `buildingId`, `buildingName`, `floorId`, `makani` (text); `components[]` has `type`, `number`, `street`, `streetId`. |
| `addressDetails.administrativeDivisions[]` | Required `id`, `name`, `type`; optional `cityAlias`. Preserves country, region, city, district, and other divisions exactly as supplied. |
| `addressDetails.entrances[]` | Required `id`; optional `isPrimary` and `points[]`, each requiring numeric `latitude` and `longitude`. |
| `organization` | Required `id`; optional `name`, nonnegative `branchCount`, `branchesUrl`, `reviewCountWithStars`, and `branches[]`. The source organization name may differ from the business name. |
| `organization.branches[]` | Required `businessId`, `name`, `listingUrl`. Optional `address`, `addressComment`, `city`, `businessType`, `latitude`, `longitude`, `categories`, `rating`, `reviewCount`, `reviewCountWithStars`, `nameDetails`, `timezoneOffsetMinutes`, `addressDetails`, `categoryDetails`, `attributeGroups`, `schedule`, `businessDates`, and `photoAlbums`. Nested structures have the same meanings as the top-level fields. Only the fetched branch page is read; each related branch is not separately crawled. |
| `categoryDetails[]` | Required `id` and `name`; optional `alias`, `kind`, `parentId`. |
| `attributeGroups[]` | Optional `name`; required nonempty `attributes[]`, each requiring `name` and optionally retaining `id` and `tag`. |
| `contactGroups[]` | Required nonempty `contacts[]`; optional `schedule`. Each contact requires `type` and may have `value` (phone or a valid source-published email), `url` (direct public link), and `comment` (role). An email value is included only when the source provides a real email address. |
| `schedule` | Optional `is24x7` boolean and `days` object. Each available `Mon`–`Sun` value is an array of intervals with required `from` and `to` strings. Source times such as `24:00` and overnight intervals are preserved. |
| `businessDates` | Optional ISO date-time strings `createdAt` and `updatedAt` for the listing. |
| `nearby.landmarks[]` | Required `id`; optional `name`, `type`, `subtype`, nonnegative `distanceMeters`, and 0–360 `azimuthDegrees`. |
| `nearby.stations[]` | Required `id`; optional `name`, `distanceMeters`, `comment` (line label), and string array `routeTypes`. |
| `nearby.parking[]` | Required `id`; optional `name`, integer `capacity`, booleans `isPaid` and `forElectricCars`, and `vehicleType`. A nearby parking record may contain only its ID when the public page has no other parking details. |
| `photoAlbums[]` | Optional `type`, `subtype`, nonnegative integer `count`, and `coverUrl`. An album count does not mean every photo was downloaded. |
| `reviewSnippets[].author` | Optional public display `name` and nonnegative integer `reviewCount` shown beside that reviewer. Review `helpfulCount` is the displayed useful-vote count. Dates and reviewer IDs are omitted when unavailable. |

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Run status and output summary

A run is **SUCCEEDED** when at least one validated business listing has been written successfully. Completed business rows are saved as they are collected. If a later search or detail request fails after rows have been saved, the run remains **SUCCEEDED** and the summary marks `isPartial` as `true`. Reaching `maxItems` is a normal completion. If no real business listing is saved, the run is **FAILED**.

The **Output summary** link opens the `OUTPUT_SUMMARY` record in the run's default **Key-value store**. It contains exactly these fields:

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `status` | String | Required | `SUCCEEDED` when at least one business item was saved; otherwise `FAILED`. |
| `itemsStored` | Nonnegative integer | Required | Number of business dataset writes acknowledged during the run. |
| `isPartial` | Boolean | Required | `true` when a later failure limited a run that had already saved business items. |

Illustrative completed-run summary:

```json
{
  "status": "SUCCEEDED",
  "itemsStored": 25,
  "isPartial": false
}
```

### Tips and access limitations

- Start with a small `maxItems` value. Set `detailLimit` to `0` for fewer requests, or set `includeReviewDetails` to `false` to skip review tabs.
- Gallery and menu/price sections may need browser rendering and can present access challenges. This Actor collects the published album metadata and cover images, not a full gallery, restaurant menu, or exhaustive review history.
- Related organization branches are limited to the fetched public branch page. Its returned list can be shorter than the published total branch count.
- Search results and public profile details can vary by country, language, and the pages available to your run. The Actor makes a bounded pass over public pages and does not promise a complete catalog or pagination.
- A login wall, unavailable page, rate limit, access verification page, or 2GIS page change can limit results. The Actor stops when it encounters an access boundary; it does not rotate identities or bypass access controls.
- Use only public business information for a lawful purpose. Results can contain personal information that a business has chosen to publish; follow applicable privacy rules and 2GIS terms.

### Cost and support

Apify platform compute and storage usage depends on the number of searches, requested results, and detail pages. Check the pricing and usage shown in your Apify account; this README does not set a separate fixed price for the Actor.

For programmatic access, use the Actor's API tab. For help or to report a problem, use the Actor's Issues tab and include the run link and a short description of what you expected.

# Actor input Schema

## `queries` (type: `array`):

Business names or categories to search. The default query is restaurant. Set this to an empty list to use only start URLs; if both are provided, both search modes run.

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

Optional public 2GIS city URL alias, such as dubai or moscow, used in generated search URLs. Case is normalized and spaces become hyphens. This does not change supplied start URLs.

## `startUrls` (type: `array`):

Optional public 2GIS search or listing URLs.

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

Maximum unique business listings to emit.

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

Maximum time to wait for each public 2GIS page.

## `detailLimit` (type: `integer`):

Bounded number of listing detail pages to fetch for coordinates, contacts, services, photos, prices, and review metadata.

## `includeReviewDetails` (type: `boolean`):

Fetch the public review tab for each enriched detail page and retain visible review snippets when available.

## Actor input object example

```json
{
  "queries": [
    "restaurant"
  ],
  "startUrls": [],
  "maxItems": 200,
  "requestTimeoutSecs": 30,
  "detailLimit": 5,
  "includeReviewDetails": true
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/2gis-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/2gis-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 '{}' |
apify call codingfrontend/2gis-scraper --silent --output-dataset

```

## MCP server setup

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