{
  "openapi": "3.0.1",
  "info": {
    "title": "Qatar MOCI Business Map Scraper: منشأة اقتصادية Records, Stats",
    "description": "Collect public Qatar MOCI منشأة اقتصادية records from the Business Map: names, map coordinates, license data, statistics, new or void activity, and changes. Export clean JSON/CSV through Apify Dataset for Make, n8n, and Google Sheets. Skip generic directories. From $0.44 per 1,000 records.",
    "version": "0.1",
    "x-build-id": "TBz6KZdOGLuNzUNDz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~qatar-moci-business-map-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-qatar-moci-business-map-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/getascraper~qatar-moci-business-map-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-qatar-moci-business-map-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/getascraper~qatar-moci-business-map-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-qatar-moci-business-map-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": {
          "operation": {
            "title": "Collection type",
            "enum": [
              "businesses",
              "licenseStatistics",
              "summary",
              "newLicenses",
              "voidLicenses"
            ],
            "type": "string",
            "description": "Choose public establishment records, license statistics, portal summary metrics, or new and void license activity.",
            "default": "businesses"
          },
          "municipalities": {
            "title": "Municipalities",
            "maxItems": 8,
            "type": "array",
            "description": "Public MOCI municipality names or IDs. The default is deliberately narrow so the first run stays fast. Leave empty for all municipalities when using establishment or statistics mode.",
            "items": {
              "type": "string"
            },
            "default": [
              "Doha Municipality"
            ]
          },
          "businessTypes": {
            "title": "Business types",
            "maxItems": 10,
            "type": "array",
            "description": "Public MOCI business type names or IDs, such as Commercial or Services. Leave empty for all types.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "businessSubtypes": {
            "title": "Business subtypes",
            "maxItems": 10,
            "type": "array",
            "description": "Public MOCI subtype names or IDs, such as Studio. Leave empty for all subtypes. This filter is used for establishment records.",
            "items": {
              "type": "string"
            },
            "default": [
              "Studio"
            ]
          },
          "licenseStatuses": {
            "title": "License statuses",
            "type": "array",
            "description": "Keep only public records with the selected MOCI license statuses. Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Active",
                "Expired"
              ],
              "enumTitles": [
                "Active",
                "Expired"
              ]
            },
            "default": [
              "Active"
            ]
          },
          "nationalityGroup": {
            "title": "Nationality group",
            "enum": [
              "",
              "Qatari",
              "GCC",
              "International"
            ],
            "type": "string",
            "description": "Optional public nationality grouping used by the MOCI map filters. Leave set to All for no nationality filter.",
            "default": ""
          },
          "registrationFrom": {
            "title": "Registration issue date from",
            "type": "string",
            "description": "Optional YYYY-MM-DD lower bound for registration issue dates in establishment and new-license filters.",
            "default": ""
          },
          "registrationTo": {
            "title": "Registration issue date to",
            "type": "string",
            "description": "Optional YYYY-MM-DD upper bound for registration issue dates.",
            "default": ""
          },
          "expiryFrom": {
            "title": "License expiry date from",
            "type": "string",
            "description": "Optional YYYY-MM-DD lower bound for license expiry dates in establishment and void-license filters.",
            "default": ""
          },
          "expiryTo": {
            "title": "License expiry date to",
            "type": "string",
            "description": "Optional YYYY-MM-DD upper bound for license expiry dates.",
            "default": ""
          },
          "includeTaxIdentifiers": {
            "title": "Include public tax identifiers",
            "type": "boolean",
            "description": "Include a tax registration number only when the MOCI public response exposes it. Off by default because it is more sensitive than ordinary map and license fields.",
            "default": false
          },
          "runMode": {
            "title": "Run mode",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "Snapshot emits every matching row in the bounded result set. Changes emits only new or source-backed updated rows for the same monitor scope.",
            "default": "snapshot"
          },
          "monitorScope": {
            "title": "Monitor scope name",
            "type": "string",
            "description": "Use a different name to maintain separate change histories for different watchlists. Used only in changes mode.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum number of dataset rows emitted per run. The default is intentionally small for safe scheduled tests.",
            "default": 10
          },
          "maxResponseSizeMb": {
            "title": "Maximum source response size",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Stop if a public API response exceeds this size. Broad map filters can return very large non-paginated responses.",
            "default": 25
          },
          "requestDelayMs": {
            "title": "Delay between requests",
            "minimum": 250,
            "maximum": 5000,
            "type": "integer",
            "description": "Pause between serialized portal and API requests to reduce load on the public service.",
            "default": 750
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}