# Japan National Land Numerical Information (国土数値情報 / MLIT) (`jpopendata/japan-geospatial-mlit`) Actor

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.

- **URL**: https://apify.com/jpopendata/japan-geospatial-mlit.md
- **Developed by:** [JP Open Data](https://apify.com/jpopendata) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Japan National Land Numerical Information (国土数値情報 / MLIT) — index

Unofficial Apify Actor that indexes Japan's **National Land Numerical Information**
(国土数値情報, published by the Ministry of Land, Infrastructure, Transport and
Tourism, MLIT) download site at <https://nlftp.mlit.go.jp/ksj/>.

国土数値情報 is Japan's national GIS master data: administrative boundaries,
railways and roads, public facilities, land use, and disaster / hazard zones —
distributed as ZIP archives (GML / Shapefile). This Actor gives you a clean,
English-labelled, machine-readable **index** of those datasets and the **direct
download URL** of every ZIP, so you can discover and fetch exactly the layers
you need. It does **not** re-host or reprocess the geometry — each record points
you at the official file.

### Quick start — verified input

Copy, paste, run. This exact input is verified on the platform (SUCCEEDED, items > 0):

```json
{
  "mode": "list_datasets",
  "dataType": "N03",
  "prefecture": "Tokyo",
  "maxItems": 50
}
```

Running with **no input at all** also works (it lists the `N03` administrative-boundary downloads). To discover other dataType identifiers run `{"mode": "list_catalog"}` (optionally with `"query": "行政"`).

### What it does

Two modes:

- **`list_catalog`** — parse the site index into the catalogue of dataset types
  ("dataTypes"). One record per dataType: its identifier (e.g. `N03`), Japanese
  title, and the URL of its download page. Optional `query` substring filter.
- **`list_datasets`** — parse one dataType's download page into its individual
  ZIP entries. One record per downloadable file: area (prefecture / nationwide),
  geodetic datum, year, format, file name, size, and the **direct `downloadUrl`**.
  Give it a `dataType` (e.g. `N03`) or a `datalistUrl` from a `list_catalog` run;
  optionally filter by `prefecture` (地域 substring) and `year`.

#### Input reference

| Field | Mode | Description |
| --- | --- | --- |
| `mode` | both | `list_datasets` (default) or `list_catalog`. Case-insensitive; a bare `dataType` selects `list_datasets`, a bare `query` selects `list_catalog`. |
| `dataType` | list\_datasets | KSJ identifier, e.g. `N03` (行政区域), `P34` (市区町村役場), `A31a` (洪水浸水想定区域). Any case (`n03`). **Required in list\_datasets mode** (unless `datalistUrl`). |
| `datalistUrl` | list\_datasets | A `https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-<id>.html` page (from a list\_catalog run). |
| `prefecture` | list\_datasets | Area filter: `Tokyo` / `東京都` / `13` (mapped to the site's 地域 label `東京`), or a raw label such as `全国`. |
| `year` | list\_datasets | 4-digit calendar year, e.g. `2024`. |
| `query` | list\_catalog | Substring filter over identifier / title, e.g. `行政`, `N03`. |
| `maxItems` | both | Max records, 1–100000 (default 1000). |
| `maxApiRequests` | both | Hard per-run upstream request cap, 1–25 (default 10). |
| `proxyConfiguration` | both | Optional Apify proxy; default is a direct connection. |

Values are validated **before** the first request; an invalid value fails the run immediately with a message that lists the valid values.

#### Common input mistakes

| Mistake | Correct |
|---------|---------|
| `"dataType": "行政区域"` (a title) | the identifier `"N03"` — find it with `{"mode": "list_catalog", "query": "行政"}` |
| `{"mode": "list_datasets", "query": "行政"}` | `query` filters the catalogue: use `"mode": "list_catalog"`, or give a `dataType` |
| `"prefecture": "Osaka-shi"` (a city) | `"prefecture": "Osaka"` — downloads are per prefecture or nationwide (`全国`) |
| `"year": "令和6年"` / `"R6"` | the calendar year `"2024"` |
| `"datalistUrl": "https://nlftp.mlit.go.jp/ksj/"` | the datalist page: `https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2026.html` |
| `"maxItems": "all"` | a number, e.g. `1000` |

#### Empty results?

A run that finds nothing completes with 0 items and a warning in the log (not a failure). Typical causes: a `prefecture` filter on a dataType that is only published nationwide (many `A`/`P` series have a single `全国` row — drop `prefecture` or set it to `全国`), a `year` the dataType was not published in (the datalist shows the available years — drop `year`), or a `query` in list\_catalog mode that matches no identifier/title (try a shorter Japanese substring).

#### Example output record

```json
{
  "identifier": "N03",
  "datasetTitle": "行政区域データ",
  "area": "東京",
  "datum": "世界測地系",
  "fiscalYear": "2026年（令和8年）",
  "year": 2026,
  "format": "GML",
  "fileName": "N03-20260101_13_GML.zip",
  "fileSizeLabel": "12.54MB",
  "downloadUrl": "https://nlftp.mlit.go.jp/ksj/gml/data/N03/N03-2026/N03-20260101_13_GML.zip",
  "datalistUrl": "https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2026.html",
  "source": "国土数値情報ダウンロードサイト / National Land Numerical Information download site (MLIT)",
  "sourceUrl": "https://nlftp.mlit.go.jp/ksj/",
  "license": "出典：国土交通省国土数値情報ダウンロードサイト …",
  "retrievedAt": "2026-08-26T…Z"
}
```

Every record carries the four attribution fields (`source`, `sourceUrl`,
`license`, `retrievedAt`) with the required 出典 credit baked into `license`.

### Search terms

japan gis data, japan administrative boundaries, japan geospatial data english,
kokudo suuchi, 国土数値情報, japan shapefile download, japan municipal boundaries,
japan hazard map data, MLIT geospatial, japan prefecture polygons

### Legal / disclaimer

- **Public open data.** This Actor reads the public MLIT 国土数値情報 download
  site (no login, no key). Content is licensed under the **公共データ利用規約
  (第1.0版) / Public Data License 1.0 (PDL1.0)**, which **permits commercial use,
  reproduction, translation and adaptation with attribution**. See the site terms
  (<https://nlftp.mlit.go.jp/ksj/other/agreement.html>) and PDL1.0
  (<https://www.digital.go.jp/resources/open_data/public_data_license_v1.0>).
  The site 利用規約 and PDL1.0 contain **no** clause prohibiting automated
  download, crawling or bulk access, and the site's `robots.txt` returns 404
  (no restriction).
- **Unofficial tool — not affiliated with, endorsed by, or connected to MLIT**
  or the National Land Information Division. "国土数値情報" and related names are
  used only to describe the data source.
- **Per-dataset licences vary.** Some datasets carry their own condition —
  「オープンデータ(CC BY 4.0)一部制限」/「商用可」/「非商用」— or a 測量法 background
  map that requires 国土地理院 approval to reproduce. The authoritative condition
  is each dataset page's 「このデータの使用許諾条件」欄. **You are responsible for
  confirming the licence and content of any dataset you download before use.**
- **Attribution is required.** When you use the data, cite the source, e.g.
  「出典：国土交通省国土数値情報ダウンロードサイト（当該ページのURL）」; if you edit or
  process it, also state that you did so.
- **You are responsible for compliance** with the source site's terms and all
  applicable laws (including data-protection law such as GDPR/APPI) in your use
  of the retrieved data. This Actor indexes GIS-master catalogue metadata and
  contains no personal data.

### Politeness

Single sequential connection, ≥ 1.2 s between requests, exponential backoff on
429/5xx, and a hard per-run request budget (`maxApiRequests`). The Actor never
attempts rate-limit, CAPTCHA or WAF/JS-challenge evasion; a persistent block
fails the run visibly. It uses an honest, self-identifying User-Agent.

# Actor input Schema

## `mode` (type: `string`):

`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".

## `dataType` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `integer`):

Maximum number of records to output, 1-100000. PPE charges per record. Example: 1000.

## `maxApiRequests` (type: `integer`):

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.

## `proxyConfiguration` (type: `object`):

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.

## Actor input object example

```json
{
  "mode": "list_datasets",
  "dataType": "N03",
  "datalistUrl": "https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2026.html",
  "prefecture": "Tokyo",
  "year": "2024",
  "query": "行政",
  "maxItems": 1000,
  "maxApiRequests": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Catalogue rows (list\_catalog: dataType index) or download entries (list\_datasets: one dataType's ZIP files with direct downloadUrl), with source attribution (source, sourceUrl, license, retrievedAt) on every item.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "list_datasets",
    "dataType": "N03",
    "maxItems": 1000,
    "maxApiRequests": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpopendata/japan-geospatial-mlit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "list_datasets",
    "dataType": "N03",
    "maxItems": 1000,
    "maxApiRequests": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jpopendata/japan-geospatial-mlit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "list_datasets",
  "dataType": "N03",
  "maxItems": 1000,
  "maxApiRequests": 10
}' |
apify call jpopendata/japan-geospatial-mlit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jpopendata/japan-geospatial-mlit"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JaTeLOyEzUKWoHdzb/builds/DTQv0JJZrWzueY6fc/openapi.json
