{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex Maps Business Scraper",
    "description": "Turn Yandex Maps into a ready-to-work local business list. Search 21 cities by term or category and collect name, phone, website, social profiles, address, coordinates, rating, review count and opening hours. Sweep a whole city with a map grid.",
    "version": "0.0",
    "x-build-id": "w5l7YJhg9Mr7ytqow"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~yandex-maps-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-yandex-maps-business-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/apt_marble~yandex-maps-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-yandex-maps-business-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/apt_marble~yandex-maps-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-yandex-maps-business-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What to look for, one term per line — exactly what you would type into the map's search box. Terms in the local language usually return more places than their English equivalents.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category codes (optional)",
            "type": "array",
            "description": "Search whole categories instead of typing a term. Category codes appear in the \"categoryIds\" column of every result, so one exploratory run gives you the codes for everything you want to sweep next.",
            "items": {
              "type": "string"
            }
          },
          "regionId": {
            "title": "City",
            "enum": [
              "213",
              "2",
              "54",
              "65",
              "43",
              "47",
              "51",
              "66",
              "172",
              "35",
              "62",
              "56",
              "39",
              "193",
              "38",
              "50",
              "239",
              "157",
              "162",
              "163",
              "10335"
            ],
            "type": "string",
            "description": "The city the search runs in. Every city in this list was checked against live results, so the places you get back are the ones that city publishes.",
            "default": "213"
          },
          "language": {
            "title": "Result language",
            "enum": [
              "ru",
              "en"
            ],
            "type": "string",
            "description": "How names, addresses and categories are written. \"Local spelling\" returns them the way they appear on the shop front; \"Latin spelling\" returns a romanised version, which is easier to work with in an English-language CRM.",
            "default": "ru"
          },
          "maxResultsPerQuery": {
            "title": "Maximum businesses per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The largest number of businesses to collect for each search term in each area. The source stops publishing new places for any one search in any one area at around 1,000 positions, and it repeats some of them, so a broad term in a single area usually settles somewhere in the hundreds. Use a search area with a grid to go beyond that.",
            "default": 100
          },
          "boundingBox": {
            "title": "Search area (optional)",
            "type": "string",
            "description": "Restrict the search to a rectangle on the map, written as two opposite corners: longitude,latitude~longitude,latitude. Example for central Moscow: 37.40,55.60~37.62,55.76. Leave empty to search the whole city."
          },
          "centerLatitude": {
            "title": "Centre latitude (optional)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Instead of a rectangle, search around a point. Fill in latitude, longitude and radius together."
          },
          "centerLongitude": {
            "title": "Centre longitude (optional)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "The longitude of the point to search around."
          },
          "radiusKm": {
            "title": "Radius in kilometres (optional)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "How far around the centre point to search."
          },
          "tileGrid": {
            "title": "Split the area into a grid",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Divides the search area into a grid and searches each square separately, which reaches places a single search never shows. 2 gives 4 squares, 3 gives 9, 4 gives 16. Each square is charged as one area scanned.",
            "default": 1
          },
          "onlyWithPhone": {
            "title": "Only businesses with a phone number",
            "type": "boolean",
            "description": "Skip places that publish no phone number.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Skip places that publish no website.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Keep only places rated at least this highly. Ratings on this source run from 1 to 5. Places with no published rating are left out when this is set, because an unrated place is not the same as a badly rated one."
          },
          "includePopularTimes": {
            "title": "Include busy-hours profile",
            "type": "boolean",
            "description": "Adds an hour-by-hour busyness profile for each weekday, where the source publishes one. It makes each result considerably larger, so it is off by default.",
            "default": false
          },
          "parallelSearches": {
            "title": "Searches at a time",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches to run in parallel. Higher finishes sooner; the default is a good balance for most jobs.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}