市区町村の暮らしの数字 · データ · API · フィード · 世界の土地

公開 API(読むだけ・鍵なし)

日本の市区町村 1,741 の数字と、世界の土地 917 の頁のデータを JSON で返します。登録も鍵も要りません。CORS は開いています(どのサイトの JavaScript からでも読めます)。1 分に 60 回まで。

どの値にも出典と利用条件がついています(応答の sources)。使う時は元の出典を書いてください。

試す

/api/v1/towns/13101千代田区のすべての数字
/api/v1/towns/01100/yubin札幌市の郵便番号
/api/v1/compare?a=13101&b=27100千代田区と大阪市
/api/v1/world/places/Q64Berlin
/api/v1/search?q=さっぽろ名前で探す
/api/v1/world/places?cc=DEドイツの土地

道の一覧

GET /api/v1/townsAll 1,741 municipalities (code, name, kana, prefecture, facets available)
GET /api/v1/towns/{code}One municipality: 33 indicators + 18 derived values (SSDSE-A) and every facet record (postal codes, hazard maps, furusato tax, care insurance, vacant houses, schools, climate normals, tourism, stations)
GET /api/v1/towns/{code}/{facet}One facet of one municipality
GET /api/v1/compareTwo municipalities side by side (indicators and derived values)
GET /api/v1/facetsFacets with their sources and licences
GET /api/v1/indicatorsIndicator and derived-value definitions (label, unit, year, formula)
GET /api/v1/world/countriesCountries with world place pages
GET /api/v1/world/placesWorld places (cities and first-level regions) with pages
GET /api/v1/world/places/{qid}One place: names in many languages, population (Wikidata), coordinates, time zone, monthly climate 2001-2020 (NASA POWER), nearby places
GET /api/v1/searchSearch municipalities and world places by name (Japanese, kana, English, local name)
GET /api/v1/suggestOpenSearch suggestions (application/x-suggestions+json)

機械向けの説明

OpenAPI 3.1(/api/openapi.json) · DCAT の目録 · llms.txt

AI のエージェントから(MCP)

MCP のサーバー https://local.yohaku.city/mcp(Streamable HTTP・読むだけ・鍵なし)。道具: town_profile・compare_towns・world_place・search_places。Server Card: /mcp/server-card。

{
  "mcpServers": {
    "local-yohaku": { "type": "http", "url": "https://local.yohaku.city/mcp" }
  }
}

まとめて落とす

CSV と JSON は /data/ に。