{
  "openapi": "3.0.1",
  "info": {
    "title": "2GIS Places Scraper: Phones, Emails, Websites",
    "description": "Scrape 2GIS businesses by search term and city (Russia, Kazakhstan, UAE and other 2GIS countries) or 2GIS URLs: name, categories, address, coordinates, phones, emails, websites, social links, hours, rating, branch count. Gets past the 60-place limit map area by area. New-places-only mode.",
    "version": "0.1",
    "x-build-id": "sV7MOu9zWIOf0B6jd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amitaviv~2gis-places-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amitaviv-2gis-places-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/amitaviv~2gis-places-scraper/runs": {
      "post": {
        "operationId": "runs-sync-amitaviv-2gis-places-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/amitaviv~2gis-places-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-amitaviv-2gis-places-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": {
          "queries": {
            "title": "Search terms or 2GIS URLs",
            "type": "array",
            "description": "What to search for, as you would type it into 2GIS, e.g. \"стоматология\", \"кофейня\", \"car service\" (searched in each city of \"location\"). You can also paste 2GIS addresses: a search or category page (e.g. https://2gis.ru/moscow/search/Кофейни/rubricId/162, its filters are kept; a search URL with a place card open reads the whole search) or a place page (https://2gis.kz/almaty/firm/70000001047564924) for that one place. Building pages (/geo/…) are not places and are skipped.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "City",
            "type": "string",
            "description": "The 2GIS city to search in, as 2GIS writes it or in English, e.g. \"Москва\", \"Almaty\", \"Dubai\", \"Новосибирск\", or the city code from a 2GIS address (2gis.ru/<code>/…). Several cities: separate them with \";\". Only places 2GIS files under that city are delivered (see the next option). Not needed for pasted URLs."
          },
          "maxItems": {
            "title": "Max places per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of places delivered for each search term in each city (and each pasted search URL), from 1 to 100,000; default 100. Apart from the start fee you pay only per delivered place.",
            "default": 100
          },
          "splitLargeSearches": {
            "title": "Get past 2GIS's 60-place limit",
            "type": "boolean",
            "description": "2GIS shows at most 60 places for one search. On (default): when it has more, the city's map is searched area by area until \"Max places per search\" is reached or the city is covered. Off: only the first 60 places, in 2GIS's own order.",
            "default": true
          },
          "includeWholeArea": {
            "title": "Include nearby towns of the 2GIS area",
            "type": "boolean",
            "description": "Off (default): a search term in a city delivers only places 2GIS files under that city. On: also the other towns 2GIS puts in the same area, which can be large (the Almaty area includes Talgar and Kaskelen; the Bishkek area is all of Kyrgyzstan). Pasted search URLs always get what 2GIS lists for them.",
            "default": false
          },
          "includeIndividuals": {
            "title": "Include listings in a private person's name",
            "type": "boolean",
            "description": "Off (default): listings whose name is a private person's name (sole traders \"ИП …\", names such as \"Иванова Мария Петровна\") are not delivered and not charged; the run summary counts them. Turn on only if you have a lawful basis (e.g. under the GDPR) to process such personal data.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new places (monitoring)",
            "type": "boolean",
            "description": "Off (default): every run delivers the places it finds. On: deliver and charge only places that earlier runs of this actor in your account have not delivered for the same search and city. The first run delivers everything it finds. The memory is a key-value store named \"2gis-places-scraper-monitor\" that the actor creates in your account.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Only with onlyNew. A free name for the monitor memory, e.g. almaty-dentists-weekly. Runs with the same search, city and monitor name share one memory."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default and recommended: no proxy. 2GIS answered Apify's own addresses in our tests. If 2GIS refuses a request anyway, the actor switches to Apify Proxy by itself (datacenter, then residential). Choose a proxy here only to force one."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}