{
  "openapi": "3.0.1",
  "info": {
    "title": "2GIS Business Directory Extractor for CIS & Middle East",
    "description": "Search 2GIS for businesses by category and city across Russia, the UAE, Kazakhstan and the wider CIS, and get name, address, rating, hours, contacts and social links for each place.",
    "version": "1.0",
    "x-build-id": "VmwSyA6i1GQqfVvgJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~2gis-business-directory-extractor-for-cis/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-2gis-business-directory-extractor-for-cis",
        "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/vexaloom-labs~2gis-business-directory-extractor-for-cis/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-2gis-business-directory-extractor-for-cis",
        "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/vexaloom-labs~2gis-business-directory-extractor-for-cis/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-2gis-business-directory-extractor-for-cis",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "urls",
              "ids"
            ],
            "type": "string",
            "description": "What to read: search the directory, expand 2GIS links, or look up place IDs.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "What to look for, one term per line (mode=search). Example: coffee, restaurant, стоматология. Use the local language for better coverage.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "City",
            "type": "string",
            "description": "City or area to search in (mode=search), for example Moscow, Алматы or Dubai. Can be a local or English name."
          },
          "cities": {
            "title": "More cities",
            "type": "array",
            "description": "Optional additional cities. Every search term runs in every city (mode=search).",
            "items": {
              "type": "string"
            }
          },
          "cityIds": {
            "title": "City IDs",
            "type": "array",
            "description": "Optional exact 2GIS city IDs. Use instead of city names when you already know the ID.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "2GIS links",
            "type": "array",
            "description": "Search, place (/firm/), organization (/branches/) or building (/inside/) links, go.2gis.com short links, or bare place IDs (mode=urls).",
            "items": {
              "type": "string"
            }
          },
          "placeIds": {
            "title": "Place IDs",
            "type": "array",
            "description": "2GIS branch IDs to read directly (mode=ids).",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for an area search (mode=search). Set together with longitude; overrides the city center."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for an area search (mode=search). Set together with latitude."
          },
          "radiusMeters": {
            "title": "Radius (meters)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Search radius around latitude/longitude, in meters (1–50000).",
            "default": 20000
          },
          "bbox": {
            "title": "Map area",
            "type": "string",
            "description": "Optional rectangle as lon1,lat1,lon2,lat2. Overrides city and point search."
          },
          "country": {
            "title": "Country site",
            "enum": [
              "auto",
              "ru",
              "kz",
              "ae",
              "kg",
              "uz",
              "by",
              "az",
              "am",
              "ge",
              "tj",
              "cy",
              "cz",
              "it",
              "cl"
            ],
            "type": "string",
            "description": "2GIS country site. Leave on Auto-detect to derive it from the city or link.",
            "default": "auto"
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "ru_RU",
              "ru_KZ",
              "en_RU",
              "en_AE",
              "ar_AE",
              "kk_KZ",
              "ky_KG",
              "uz_UZ",
              "az_AZ",
              "hy_AM",
              "ka_GE",
              "tg_TJ",
              "cs_CZ",
              "it_IT",
              "es_CL",
              "en_CY"
            ],
            "type": "string",
            "description": "Language of names and content returned by 2GIS. Auto uses the country site's default.",
            "default": "auto"
          },
          "maxItems": {
            "title": "Max places",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of places per search term + city/area combination.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "rating",
              "distance",
              "flamp_rating",
              "creation_time",
              "opened_time",
              "name"
            ],
            "type": "string",
            "description": "Order of search results. Distance needs a latitude/longitude or map area.",
            "default": "relevance"
          },
          "rubricIds": {
            "title": "Category IDs",
            "type": "array",
            "description": "Only places in these 2GIS categories (rubric IDs), for example 162 for coffee shops.",
            "items": {
              "type": "string"
            }
          },
          "districtIds": {
            "title": "District IDs",
            "type": "array",
            "description": "Optional district IDs. Useful for splitting a large city into smaller searches.",
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only places rated at least this value (0–5)."
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only places with at least this many reviews."
          },
          "websiteFilter": {
            "title": "Website",
            "enum": [
              "all",
              "with",
              "without"
            ],
            "type": "string",
            "description": "Return all places, only places with a website, or only places without one.",
            "default": "all"
          },
          "filterHasPhotos": {
            "title": "Has photos only",
            "type": "boolean",
            "description": "Only return places that have photos on 2GIS.",
            "default": false
          },
          "filterOpenNow": {
            "title": "Open now only",
            "type": "boolean",
            "description": "Only return places open at the time of the run.",
            "default": false
          },
          "filter24x7": {
            "title": "Open 24/7 only",
            "type": "boolean",
            "description": "Only return places open around the clock.",
            "default": false
          },
          "filterHasGoods": {
            "title": "Has goods/menu only",
            "type": "boolean",
            "description": "Only return places that published goods or a menu.",
            "default": false
          },
          "filterHasRating": {
            "title": "Has rating only",
            "type": "boolean",
            "description": "Only return places with a rating.",
            "default": false
          },
          "filterHasReviews": {
            "title": "Has reviews only",
            "type": "boolean",
            "description": "Only return places with reviews.",
            "default": false
          },
          "filterDelivery": {
            "title": "Delivery only",
            "type": "boolean",
            "description": "Only return places whose published attributes mention delivery.",
            "default": false
          },
          "filterTakeaway": {
            "title": "Takeaway only",
            "type": "boolean",
            "description": "Only return places whose attributes mention takeaway or pickup.",
            "default": false
          },
          "filterCardPayment": {
            "title": "Card payment only",
            "type": "boolean",
            "description": "Only return places whose attributes mention card payment.",
            "default": false
          },
          "filterWifi": {
            "title": "Wi-Fi only",
            "type": "boolean",
            "description": "Only return places whose attributes mention Wi-Fi.",
            "default": false
          },
          "minAverageCheck": {
            "title": "Minimum average check",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only places whose published average check is at least this value, in local currency."
          },
          "maxAverageCheck": {
            "title": "Maximum average check",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only places whose published average check is at most this value, in local currency."
          },
          "skipAds": {
            "title": "Skip promoted places",
            "type": "boolean",
            "description": "Drop paid/promoted search results.",
            "default": false
          },
          "includeContacts": {
            "title": "Include contacts",
            "type": "boolean",
            "description": "Add phones, websites, emails, social links and messengers.",
            "default": true
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Add review texts to each place when 2GIS exposes them. Rating and review counts are always included.",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum review texts per place when reviews are enabled (1–1000).",
            "default": 10
          },
          "reviewsSort": {
            "title": "Review order",
            "enum": [
              "date_created",
              "date_edited",
              "rating"
            ],
            "type": "string",
            "description": "Order of review texts.",
            "default": "date_created"
          },
          "reviewsMinRating": {
            "title": "Minimum review rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only reviews with at least this star rating (1–5)."
          },
          "reviewsWithAnswer": {
            "title": "Reviews with a business reply",
            "type": "boolean",
            "description": "Keep only reviews that have an official business reply.",
            "default": false
          },
          "reviewsSince": {
            "title": "Reviews since",
            "type": "string",
            "description": "Keep only reviews created on or after this date (YYYY-MM-DD)."
          },
          "reviewsKeyword": {
            "title": "Review keyword",
            "type": "string",
            "description": "Keep only reviews whose text contains this word or phrase."
          },
          "includePhotos": {
            "title": "Include photo URLs",
            "type": "boolean",
            "description": "Add photo URLs when 2GIS exposes them. A main photo URL and photo count are included whenever available.",
            "default": false
          },
          "maxPhotosPerPlace": {
            "title": "Max photos per place",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum photo URLs per place when photos are enabled (1–100).",
            "default": 5
          },
          "scrapeOrgBranches": {
            "title": "Expand organization branches",
            "type": "boolean",
            "description": "When a place link is given, also return the other branches of the same organization.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}