{
  "openapi": "3.0.1",
  "info": {
    "title": "MENA Places Scraper: Egypt, UAE & Saudi Businesses",
    "description": "Extract restaurants, pharmacies, banks, hotels, clinics and 30+ other business types in Egypt, the UAE, Saudi Arabia and the wider MENA region, with Arabic names, addresses, phones and opening hours, from OpenStreetMap.",
    "version": "0.1",
    "x-build-id": "mPyrYIBOtrVltOjAv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alfhar~mena-places-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alfhar-mena-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/alfhar~mena-places-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alfhar-mena-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/alfhar~mena-places-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alfhar-mena-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": {
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities of the region. Each city is searched inside an approximate urban bounding box. If you choose nothing, Dubai is used.",
            "items": {
              "type": "string",
              "enum": [
                "Cairo",
                "Alexandria",
                "Dubai",
                "Abu Dhabi",
                "Sharjah",
                "Al Ain",
                "Ras Al Khaimah",
                "Riyadh",
                "Jeddah",
                "Dammam",
                "Mecca",
                "Medina",
                "Doha",
                "Kuwait City",
                "Manama",
                "Muscat",
                "Amman",
                "Beirut",
                "Casablanca",
                "Rabat",
                "Marrakech",
                "Tunis",
                "Algiers",
                "Baghdad",
                "Erbil"
              ]
            }
          },
          "countries": {
            "title": "Whole countries",
            "type": "array",
            "description": "Search a whole country (ISO code). Slower than a city; keep 'Max places per query' small.",
            "items": {
              "type": "string",
              "enum": [
                "EG",
                "AE",
                "SA",
                "QA",
                "KW",
                "BH",
                "OM",
                "JO",
                "LB",
                "MA",
                "TN",
                "DZ",
                "IQ"
              ],
              "enumTitles": [
                "Egypt",
                "United Arab Emirates",
                "Saudi Arabia",
                "Qatar",
                "Kuwait",
                "Bahrain",
                "Oman",
                "Jordan",
                "Lebanon",
                "Morocco",
                "Tunisia",
                "Algeria",
                "Iraq"
              ]
            }
          },
          "bbox": {
            "title": "Custom bounding box",
            "type": "string",
            "description": "Optional area as 'south,west,north,east' in degrees, for example 30.00,31.20,30.10,31.30. Maximum 4 square degrees."
          },
          "categories": {
            "title": "Business categories",
            "type": "array",
            "description": "What to find. Names are the usual business types of Google Maps style searches. If you choose nothing, restaurants and pharmacies are used.",
            "items": {
              "type": "string",
              "enum": [
                "restaurant",
                "cafe",
                "fast_food",
                "bakery",
                "supermarket",
                "convenience_store",
                "mall",
                "clothes",
                "electronics",
                "mobile_phone",
                "jewelry",
                "furniture",
                "pharmacy",
                "hospital",
                "clinic",
                "dentist",
                "bank",
                "atm",
                "hotel",
                "school",
                "university",
                "gym",
                "mosque",
                "fuel_station",
                "car_repair",
                "car_dealer",
                "hairdresser",
                "beauty_salon",
                "real_estate_agency",
                "lawyer",
                "travel_agency",
                "cinema",
                "park",
                "tourist_attraction"
              ]
            }
          },
          "customTags": {
            "title": "Custom OpenStreetMap tags",
            "type": "array",
            "description": "Advanced: extra tag filters such as shop=bakery or amenity=place_of_worship+religion=muslim (join conditions with +).",
            "items": {
              "type": "string"
            }
          },
          "onlyNamed": {
            "title": "Only places with a name",
            "type": "boolean",
            "description": "Skip unnamed map objects.",
            "default": true
          },
          "maxPlacesPerQuery": {
            "title": "Max places per city and category",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit for each city/category search.",
            "default": 50
          },
          "maxPlaces": {
            "title": "Max places in total",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many places.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}