コンテンツにスキップ

日付を指定して地域の一覧を取得する

GET
/areas
curl --request GET \
--url 'https://api.strata.lambdado.com/v1/areas?level=prefecture&limit=500' \
--header 'Authorization: Bearer <token>'

コードの昇順で返す。parent を指定すると、その日に parent の地域を直接の親(応答の parent)に持つ地域だけを返す。親の親はたどらないので、parent=14 では神奈川県の市区町村は返るが、政令市の区は返らない。

at
string format: date
/^\d{4}-\d{2}-\d{2}$/

日本の暦の日付。省略すると日本時間の今日。時刻を含む値(2026-01-01T09:00+09:00 など)は 400

level

都道府県、市区町村(東京の特別区を含む)、政令市の区

string
Allowed values: prefecture municipality ward
parent
string
/^(\d{2}|\d{5})$/

直接の親の地域のコード。その日にこのコードを持つ地域がなければ 404

limit
integer
default: 500 >= 1 <= 1000
cursor
string

前の応答の next_cursor。続きを取得するときは cursor だけを送ればよい(limit は変えてもよい)。 at・level・parent は cursor が保持している。at を省略して取得を始め、途中で日本時間の日付が変わっても、 続きは最初の応答の at のまま返る。at・level・parent を指定し、cursor が保持している値と違えば 400

その日の地域

Media typeapplication/json
object
at
required
string format: date
/^\d{4}-\d{2}-\d{2}$/
projected
required

At が、sources に載ったどれかのデータの known_through より後。今分かっている最新の状態が続くとみなした答えで、新しいデータを取り込むと変わりうる。404 では、同じエンドポイントが 200 で返す sources のデータで決まる

boolean
items
required
Array<object>
object
level
required

都道府県、市区町村(東京の特別区を含む)、政令市の区

string
Allowed values: prefecture municipality ward
code
required
string
/^(\d{2}|\d{5})$/
name
required
string
name_kana
required

全角カタカナ

string
parent
required
One of:
object
level
required

都道府県、市区町村(東京の特別区を含む)、政令市の区

string
Allowed values: prefecture municipality ward
code
required
string
/^(\d{2}|\d{5})$/
name
required
string
prefecture
required
One of:
object
level
required

都道府県、市区町村(東京の特別区を含む)、政令市の区

string
Allowed values: prefecture municipality ward
code
required
string
/^(\d{2}|\d{5})$/
name
required
string
valid_since
required

この日を含む

string format: date
/^\d{4}-\d{2}-\d{2}$/
valid_until
required
One of:
string format: date
/^\d{4}-\d{2}-\d{2}$/
scheduled
required

Valid_since が日本時間の今日より後なら true。at ではなく呼び出した日で決まるので、同じ at でも valid_since を過ぎてから呼び出すと false になる

boolean
next_cursor
required
One of:
string
sources
required
Array<object>

応答に使ったデータの種類ごとの出典。データ源の利用条件が求める表示は attribution をそのまま出せば満たせる

object
dataset
required
string
Allowed values: administrative_areas postal_codes minimum_wages
publisher
required
string
title
required
string
url
required
string format: uri
license
required

データ源の利用条件

object
name
required
string
url
required
string format: uri
attribution
required

出典と、このサービスが加工したことを示す表示用の文

string
updated_on
required

このサービスがこのデータを最後に更新した日。訂正したときも変わる

string format: date
/^\d{4}-\d{2}-\d{2}$/
known_through
required

このデータで分かる最後の日付。at がこの日以前なら、新しいデータを取り込んでも応答は変わらない

string format: date
/^\d{4}-\d{2}-\d{2}$/

Examples

Examplewards

相模原市の区

{
"at": "2020-01-01",
"projected": false,
"items": [
{
"level": "ward",
"code": "14151",
"name": "緑区",
"name_kana": "ミドリク",
"parent": {
"level": "municipality",
"code": "14150",
"name": "相模原市"
},
"prefecture": {
"level": "prefecture",
"code": "14",
"name": "神奈川県"
},
"valid_since": "2010-04-01",
"valid_until": null,
"scheduled": false
},
{
"level": "ward",
"code": "14152",
"name": "中央区",
"name_kana": "チュウオウク",
"parent": {
"level": "municipality",
"code": "14150",
"name": "相模原市"
},
"prefecture": {
"level": "prefecture",
"code": "14",
"name": "神奈川県"
},
"valid_since": "2010-04-01",
"valid_until": null,
"scheduled": false
},
{
"level": "ward",
"code": "14153",
"name": "南区",
"name_kana": "ミナミク",
"parent": {
"level": "municipality",
"code": "14150",
"name": "相模原市"
},
"prefecture": {
"level": "prefecture",
"code": "14",
"name": "神奈川県"
},
"valid_since": "2010-04-01",
"valid_until": null,
"scheduled": false
}
],
"next_cursor": null,
"sources": [
{
"dataset": "administrative_areas",
"publisher": "独立行政法人統計センター",
"title": "統計LOD 標準地域コード",
"url": "https://data.e-stat.go.jp/lodw/provdata/lodRegion",
"license": {
"name": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/legalcode.ja"
},
"attribution": "「統計LOD 標準地域コード」(独立行政法人統計センター)(https://data.e-stat.go.jp/lodw/provdata/lodRegion)を加工して strata が作成(CC BY 4.0、https://creativecommons.org/licenses/by/4.0/legalcode.ja)",
"updated_on": "2026-10-01",
"known_through": "2026-10-01"
},
{
"dataset": "administrative_areas",
"publisher": "総務省統計局・独立行政法人統計センター",
"title": "e-Stat 廃置分合等情報",
"url": "https://www.e-stat.go.jp/municipalities/cities/absorption-separation-of-municipalities",
"license": {
"name": "政府統計の総合窓口(e-Stat) 利用規約",
"url": "https://www.e-stat.go.jp/terms-of-use"
},
"attribution": "出典:政府統計の総合窓口(e-Stat)(https://www.e-stat.go.jp/)。「廃置分合等情報」を加工して strata が作成",
"updated_on": "2026-10-01",
"known_through": "2026-10-01"
}
]
}

パラメータが正しくない

Media typeapplication/problem+json
object
type
required
Allowed value: tag:lambdado.com,2026:strata/problems/invalid-parameter
title
required
string
status
required
integer
detail
string
parameter
required
string

Examples

ExamplecursorMismatch

cursor が保持している値と違う at・level・parent を指定した

{
"type": "tag:lambdado.com,2026:strata/problems/invalid-parameter",
"title": "Invalid parameter",
"status": 400,
"detail": "cursor was issued for a different at, level or parent",
"parameter": "cursor"
}

API キーがない・正しくない・失効している、または組織が停止されている

Media typeapplication/problem+json
object
type
required
Allowed value: tag:lambdado.com,2026:strata/problems/unauthorized
title
required
string
status
required
integer
detail
string

Examples

Authorization を付けていない

{
"type": "tag:lambdado.com,2026:strata/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authorization header with a Bearer API key is required"
}
WWW-Authenticate
required
string

Authorization がないか Bearer 以外の方式なら Bearer、Bearer で渡したキーが無効なら Bearer error="invalid_token"(RFC 6750)

Examples

Authorization を付けていない、または Bearer 以外の方式

Bearer

その日に parent のコードを持つ地域がない

Media typeapplication/problem+json
object
type
required
Allowed value: tag:lambdado.com,2026:strata/problems/area-not-found
title
required
string
status
required
integer
detail
string
code
required
string
/^(\d{2}|\d{5})$/
at
required
string format: date
/^\d{4}-\d{2}-\d{2}$/
projected
required

At が、sources に載ったどれかのデータの known_through より後。今分かっている最新の状態が続くとみなした答えで、新しいデータを取り込むと変わりうる。404 では、同じエンドポイントが 200 で返す sources のデータで決まる

boolean
last_valid_until
required
One of:
string format: date
/^\d{4}-\d{2}-\d{2}$/
successors
required

その地域から合併・編入・分割・コードの変更をたどった先で、at に存続する地域。at より前に持った地域がなければ空

Array<object>
object
level
required

都道府県、市区町村(東京の特別区を含む)、政令市の区

string
Allowed values: prefecture municipality ward
code
required
string
/^(\d{2}|\d{5})$/
name
required
string

Example

{
"type": "tag:lambdado.com,2026:strata/problems/area-not-found",
"successors": [
{
"level": "prefecture"
}
]
}

行政区域の履歴の起点より前

Media typeapplication/problem+json
object
type
required
Allowed value: tag:lambdado.com,2026:strata/problems/out-of-coverage
title
required
string
status
required
integer
detail
string
dataset
required
string
Allowed values: administrative_areas postal_codes minimum_wages
coverage_since
required

このデータ(最低賃金の一覧なら、いちばん遅い都道府県)の履歴の起点

string format: date
/^\d{4}-\d{2}-\d{2}$/

Example

{
"type": "tag:lambdado.com,2026:strata/problems/out-of-coverage",
"dataset": "administrative_areas"
}

組織の上限を超えた

Media typeapplication/problem+json
object
type
required
Allowed value: tag:lambdado.com,2026:strata/problems/too-many-requests
title
required
string
status
required
integer
detail
string
window
required

超えた上限。minute は 1 分あたり、month は日本時間の暦月あたり

Allowed values: minute month
limit
required

超えた上限の回数

integer

Examples

月の上限を超えた

{
"type": "tag:lambdado.com,2026:strata/problems/too-many-requests",
"title": "Too many requests",
"status": 429,
"detail": "monthly limit of 10000 requests reached",
"window": "month",
"limit": 10000
}
Retry-After
required
integer

次に呼び出せるまでの秒数。月の上限なら日本時間の翌月 1 日 0 時まで、1 分の上限なら次の分まで(1〜60)