日付を指定して地域の一覧を取得する
const url = 'https://api.strata.lambdado.com/v1/areas?level=prefecture&limit=500';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.strata.lambdado.com/v1/areas?level=prefecture&limit=500' \ --header 'Authorization: Bearer <token>'コードの昇順で返す。parent を指定すると、その日に parent の地域を直接の親(応答の parent)に持つ地域だけを返す。親の親はたどらないので、parent=14 では神奈川県の市区町村は返るが、政令市の区は返らない。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”日本の暦の日付。省略すると日本時間の今日。時刻を含む値(2026-01-01T09:00+09:00 など)は 400
都道府県、市区町村(東京の特別区を含む)、政令市の区
直接の親の地域のコード。その日にこのコードを持つ地域がなければ 404
前の応答の next_cursor。続きを取得するときは cursor だけを送ればよい(limit は変えてもよい)。 at・level・parent は cursor が保持している。at を省略して取得を始め、途中で日本時間の日付が変わっても、 続きは最初の応答の at のまま返る。at・level・parent を指定し、cursor が保持している値と違えば 400
Responses
Section titled “Responses”その日の地域
object
At が、sources に載ったどれかのデータの known_through より後。今分かっている最新の状態が続くとみなした答えで、新しいデータを取り込むと変わりうる。404 では、同じエンドポイントが 200 で返す sources のデータで決まる
object
都道府県、市区町村(東京の特別区を含む)、政令市の区
全角カタカナ
この日を含む
Valid_since が日本時間の今日より後なら true。at ではなく呼び出した日で決まるので、同じ at でも valid_since を過ぎてから呼び出すと false になる
応答に使ったデータの種類ごとの出典。データ源の利用条件が求める表示は attribution をそのまま出せば満たせる
object
データ源の利用条件
object
出典と、このサービスが加工したことを示す表示用の文
このサービスがこのデータを最後に更新した日。訂正したときも変わる
このデータで分かる最後の日付。at がこの日以前なら、新しいデータを取り込んでも応答は変わらない
Examples
相模原市の区
{ "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" } ]}パラメータが正しくない
object
Examples
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 キーがない・正しくない・失効している、または組織が停止されている
object
Examples
Authorization を付けていない
{ "type": "tag:lambdado.com,2026:strata/problems/unauthorized", "title": "Unauthorized", "status": 401, "detail": "Authorization header with a Bearer API key is required"}失効したキーを使った
{ "type": "tag:lambdado.com,2026:strata/problems/unauthorized", "title": "Unauthorized", "status": 401, "detail": "API key is invalid or revoked"}Headers
Section titled “Headers”Authorization がないか Bearer 以外の方式なら Bearer、Bearer で渡したキーが無効なら Bearer error="invalid_token"(RFC 6750)
Examples
Authorization を付けていない、または Bearer 以外の方式
BearerBearer で渡したキーが無効
Bearer error="invalid_token"その日に parent のコードを持つ地域がない
object
At が、sources に載ったどれかのデータの known_through より後。今分かっている最新の状態が続くとみなした答えで、新しいデータを取り込むと変わりうる。404 では、同じエンドポイントが 200 で返す sources のデータで決まる
その地域から合併・編入・分割・コードの変更をたどった先で、at に存続する地域。at より前に持った地域がなければ空
object
都道府県、市区町村(東京の特別区を含む)、政令市の区
Example
{ "type": "tag:lambdado.com,2026:strata/problems/area-not-found", "successors": [ { "level": "prefecture" } ]}行政区域の履歴の起点より前
object
このデータ(最低賃金の一覧なら、いちばん遅い都道府県)の履歴の起点
Example
{ "type": "tag:lambdado.com,2026:strata/problems/out-of-coverage", "dataset": "administrative_areas"}組織の上限を超えた
object
超えた上限。minute は 1 分あたり、month は日本時間の暦月あたり
超えた上限の回数
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}1 分あたりの上限を超えた
{ "type": "tag:lambdado.com,2026:strata/problems/too-many-requests", "title": "Too many requests", "status": 429, "detail": "per-minute limit of 60 requests reached", "window": "minute", "limit": 60}Headers
Section titled “Headers”次に呼び出せるまでの秒数。月の上限なら日本時間の翌月 1 日 0 時まで、1 分の上限なら次の分まで(1〜60)