{
  "openapi": "3.0.1",
  "info": {
    "title": "2GIS Places Scraper",
    "description": "Search 2GIS business directory across 11 country domains (RU, KZ, UAE, UZ, BY, AM, AZ, GE, TJ, KG, .com). Extract place name, address, postcode, structured address, rating, category, reviews, photos, contacts, working hours, and social links via the Catalog API.",
    "version": "0.0",
    "x-build-id": "vJz9ybDu8oB7IFZgX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~2gis-places-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~2gis-places-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~2gis-places-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more 2GIS search URLs. Go to 2gis.ae (or 2gis.ru, 2gis.kz) and search for a category in a city, then copy the URL and paste it here.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search Queries",
            "type": "array",
            "description": "Search terms to run against each URL's city, or against locationQuery. Example: [\"restaurant\", \"hotel\", \"coffee\"]. If empty, uses the query embedded in each Start URL.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location",
            "type": "string",
            "description": "City or area name when not using Start URLs. Example: \"Dubai\", \"Moscow\", \"Almaty\"."
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of places to scrape per query+location combination.",
            "default": 50
          },
          "apiKey": {
            "title": "2GIS API Key",
            "type": "string",
            "description": "2GIS Catalog API key. The built-in \"demo\" key works up to ~50 results per search with no signup. For more results, register a free key at platform.2gis.ru."
          },
          "includeContacts": {
            "title": "Include Contacts",
            "type": "boolean",
            "description": "Fetch phone numbers, website, emails, and social media links. No extra API call — included in the main search request.",
            "default": true
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Fetch reviews for each place. Requires a registered API key (demo key does not support the reviews endpoint). Adds one API call per place.",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max Reviews per Place",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of reviews to fetch per place when Include Reviews is enabled.",
            "default": 10
          },
          "includePhotos": {
            "title": "Include Photos",
            "type": "boolean",
            "description": "Include photo URLs for each place. Note: photo URLs are not available with the demo API key.",
            "default": false
          },
          "maxPhotosPerPlace": {
            "title": "Max Photos per Place",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of photo URLs to include per place.",
            "default": 5
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "rating",
              "distance"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "relevance"
          },
          "filterHasWebsite": {
            "title": "Has Website Only",
            "type": "boolean",
            "description": "Only return places that have a website listed.",
            "default": false
          },
          "filterHasPhotos": {
            "title": "Has Photos Only",
            "type": "boolean",
            "description": "Only return places that have photos.",
            "default": false
          },
          "filterOpenNow": {
            "title": "Open Now Only",
            "type": "boolean",
            "description": "Only return places currently open.",
            "default": false
          },
          "rubricIds": {
            "title": "Category IDs (Rubric IDs)",
            "type": "array",
            "description": "Filter by 2GIS category IDs. Example: [\"281\"] for restaurants. Find IDs at 2gis.com/catalog.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}