{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan National Land Numerical Information (国土数値情報 / MLIT)",
    "description": "Unofficial index of Japan's National Land Numerical Information (国土数値情報, MLIT). List GIS dataset types or one type's direct ZIP download URLs — administrative boundaries, facilities, disaster zones. Public data, PDL1.0, commercial use OK.",
    "version": "0.1",
    "x-build-id": "DTQv0JJZrWzueY6fc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-geospatial-mlit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-geospatial-mlit",
        "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/jpopendata~japan-geospatial-mlit/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-geospatial-mlit",
        "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/jpopendata~japan-geospatial-mlit/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-geospatial-mlit",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "list_catalog",
              "list_datasets"
            ],
            "type": "string",
            "description": "`list_datasets` (default) lists ONE dataType's downloadable ZIP entries (area / datum / year / format / file name / size + the direct download URL) — set dataType (e.g. \"N03\"). `list_catalog` lists every KSJ dataType (identifier + title + datalist URL) — optionally filtered by query. Case-insensitive; if you pass only a dataType the Actor switches to list_datasets for you. Example: \"list_datasets\".",
            "default": "list_datasets"
          },
          "dataType": {
            "title": "Data type (list_datasets)",
            "type": "string",
            "description": "list_datasets mode (REQUIRED there unless datalistUrl is given): the KSJ dataType identifier, e.g. \"N03\" (行政区域 / administrative boundaries), \"P34\" (市区町村役場 / municipal offices), \"A31a\" (洪水浸水想定区域 / flood zones), \"N02\" (鉄道 / railways). Any case is accepted (\"n03\"). Run list_catalog to discover identifiers."
          },
          "datalistUrl": {
            "title": "Datalist page URL (list_datasets)",
            "type": "string",
            "description": "list_datasets mode (alternative to dataType): parse this exact datalist page directly (from a list_catalog run's `datalistUrl`). Must be a https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-<id>.html URL, e.g. https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2026.html."
          },
          "prefecture": {
            "title": "Prefecture / area filter (list_datasets)",
            "type": "string",
            "description": "list_datasets mode (optional): keep only rows whose 地域 (area) cell contains this text. A prefecture name in English (\"Tokyo\"), Japanese (\"東京都\" / \"東京\") or JIS code (\"13\") is mapped to the site's area label (\"東京\"); other labels such as \"全国\" (nationwide) are matched as a raw substring. Leave empty for all areas."
          },
          "year": {
            "title": "Year filter (list_datasets)",
            "type": "string",
            "description": "list_datasets mode (optional): keep only rows for this 4-digit calendar year, e.g. \"2024\" (\"2024年\" is tolerated). Leave empty for all years."
          },
          "query": {
            "title": "Catalogue filter (list_catalog)",
            "type": "string",
            "description": "list_catalog mode (optional): case-insensitive substring filter over the dataType identifier or Japanese title, e.g. \"行政\" or \"N03\". Leave empty to list all dataTypes. Ignored in list_datasets mode."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of records to output, 1-100000. PPE charges per record. Example: 1000.",
            "default": 1000
          },
          "maxApiRequests": {
            "title": "Max upstream requests per run",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Hard safety cap on upstream requests per run, 1-25 (list_datasets needs 1-2: index + datalist page). Politeness (1 connection, >= 1.2 s spacing, exponential backoff on 429/5xx) is enforced in code; the Actor never attempts rate-limit or WAF evasion. Example: 10.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Default is NO proxy (direct connection) — a public site rarely needs one. The Actor backs off exponentially on 429/5xx and fails visibly on a persistent block; it never attempts rate-limit evasion.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}