{
  "openapi": "3.0.1",
  "info": {
    "title": "Mongolia MRPAM Mining Cadastre Scraper: Licenses & Boundaries",
    "description": "Export Mongolia's public mining and exploration license register: holder in English and Mongolian, commodity, dates, area, and the full concession boundary, not a center point. Self-serve pay-per-event pricing, no sales call or contract. Optional monitoring returns only new or changed licenses.",
    "version": "0.1",
    "x-build-id": "rPOpmGlEsKggotg06"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~mongolia-mrpam-mining-cadastre-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-mongolia-mrpam-mining-cadastre-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~mongolia-mrpam-mining-cadastre-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-mongolia-mrpam-mining-cadastre-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~mongolia-mrpam-mining-cadastre-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-mongolia-mrpam-mining-cadastre-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": {
          "licenseTypes": {
            "title": "License types",
            "type": "array",
            "description": "Restrict results to one or both official license types. Leave empty to include both Mining and Exploration licenses.",
            "items": {
              "type": "string",
              "enum": [
                "Mining License",
                "Exploration License"
              ],
              "enumTitles": [
                "Mining License",
                "Exploration License"
              ]
            },
            "default": []
          },
          "mineralContains": {
            "title": "Commodity contains",
            "type": "string",
            "description": "Case-insensitive substring match against the source's commodity field, for example gold, copper, coal, fluorite, tungsten, tin, graphite, or REE. The source data itself leaves this field blank on about 1,261 of 3,178 licenses (mostly unclassified exploration licenses); those records are correctly excluded whenever this filter is set, and left as null (never a placeholder) when it is not.",
            "default": ""
          },
          "holderNameContains": {
            "title": "License holder name contains",
            "type": "string",
            "description": "Case-insensitive substring match against the license holder's English or Mongolian registered name, for due-diligence lookups on one company or individual.",
            "default": ""
          },
          "grantDateFrom": {
            "title": "Granted on or after",
            "type": "string",
            "description": "Only include licenses with a grant date on or after this date.",
            "default": ""
          },
          "grantDateTo": {
            "title": "Granted on or before",
            "type": "string",
            "description": "Only include licenses with a grant date on or before this date.",
            "default": ""
          },
          "includeGeometry": {
            "title": "Include concession boundary polygon",
            "type": "boolean",
            "description": "Add the full polygon boundary (ring coordinates, Web Mercator) for each license instead of just its identifying fields. The source publishes the complete boundary, not only a centroid point, so this is useful for land-use, protected-area, or watershed overlap analysis. Off by default because it roughly doubles the size of each record.",
            "default": false
          },
          "incrementalMode": {
            "title": "Only new or changed licenses",
            "type": "boolean",
            "description": "Compare this run against a saved monitoring state from the last run under the same state name, and emit only licenses that are new or have a changed grant date, expiry date, holder, or commodity. Turn this on for scheduled runs that track the cadastre over time instead of re-exporting the whole register every time.",
            "default": false
          },
          "stateName": {
            "title": "Monitoring state name",
            "type": "string",
            "description": "A label for this watchlist's saved state. Use a distinct name for each independent scheduled monitor so their change histories do not overwrite each other.",
            "default": "default"
          },
          "includeUnchanged": {
            "title": "Include unchanged licenses",
            "type": "boolean",
            "description": "When monitoring is on, also emit licenses that have not changed since the last run, tagged accordingly. Off by default so scheduled runs only surface real changes.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum licenses",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of license records to save in this run. The full public register is 3,178 records and a full pull is cheap, but the default stays small so a first run finishes quickly; raise it deliberately once you know what you need.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional override. The source is a public, unauthenticated Esri ArcGIS REST API with no anti-bot protection, so no proxy is required and the default direct connection is the recommended, lowest-cost setting.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}