{
  "openapi": "3.0.1",
  "info": {
    "title": "2GIS Scraper — Business Leads: Phones, Emails, Reviews & Hours",
    "description": "Scrape 2GIS business listings by keyword or category across any city. Extract names, phones, emails, websites, social links, addresses, ratings, reviews and opening hours for B2B lead generation. No API key, no login.",
    "version": "1.0",
    "x-build-id": "gfFT1iQQRQlwmbXG6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~2gis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-2gis-scraper",
        "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/logiover~2gis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-2gis-scraper",
        "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/logiover~2gis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-2gis-scraper",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "byId"
            ],
            "type": "string",
            "description": "How to pull businesses from 2GIS.\n\n• **search** — free-text business search by keyword (e.g. \"restaurant\", \"dentist\", \"кафе\"), optionally scoped to one or more cities; paginates through thousands of matches (highest volume)\n• **category** — browse an entire category (rubric) across one or more cities via rubric_id + region_id; sweeps whole verticals of a city\n• **byId** — full details for one or more 2GIS firm/branch IDs (batch)",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text business keyword for **search** mode — a business type or brand (e.g. `restaurant`, `dentist`, `coffee`, `аптека`, `hotel`). Empty input defaults to \"кафе\" (cafe)."
          },
          "regionId": {
            "title": "Region / city ID",
            "type": "string",
            "description": "2GIS region (city) ID to scope results, e.g. `32` = Moscow, `1` = Novosibirsk, `2` = Saint Petersburg. Used by **search** (optional) and **category** (recommended). Find a city's ID in its 2gis.ru URL. For many cities at once, use the list below."
          },
          "regionIds": {
            "title": "Region / city IDs (multi-city batch)",
            "type": "array",
            "description": "Sweep MANY cities in one run — array of 2GIS region IDs. The Actor loops every region (× every rubric in category mode). Example: `[\"32\",\"2\",\"1\"]` = Moscow + St Petersburg + Novosibirsk.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "rubricId": {
            "title": "Category (rubric) ID",
            "type": "string",
            "description": "2GIS rubric (category) ID for **category** mode, e.g. `164` = Restaurants, `161` = Cafes, `327` = Beauty salons, `271` = Pharmacies, `165` = Bars. Empty input defaults to `164` (Restaurants). Discover IDs by running a **search** first and reading the categories, or from a 2gis.ru category URL."
          },
          "rubricIds": {
            "title": "Category (rubric) IDs (multi-category batch)",
            "type": "array",
            "description": "Array of 2GIS rubric IDs to sweep several categories in one run (looped × every region). Example: `[\"164\",\"161\",\"165\"]` = restaurants + cafes + bars.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "id": {
            "title": "2GIS ID",
            "type": "string",
            "description": "A single 2GIS firm/branch ID for **byId** mode, e.g. `70000001031659781`. The digits in a 2gis.ru/firm/<id> URL."
          },
          "ids": {
            "title": "2GIS IDs (batch)",
            "type": "array",
            "description": "Array of 2GIS firm/branch IDs for batch **byId** lookups. The Actor fetches them in efficient batches.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on rows returned across all regions/categories in the run. Drives pagination. Keep it modest to stay fast & cheap; raise it to pull whole cities (a single Moscow category can hold thousands).",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. 2GIS's catalog API blocks datacenter IPs, so this Actor uses **Residential** proxies by default (a fresh IP per retry) — leave the default for reliable results. You can override the groups if you have your own residential proxy setup.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}