{"openapi": "3.1.0", "info": {"title": "シルギア 役所の管轄API", "version": "1.0.0", "description": "登録不要・無料の役所の管轄のAPI。市区町村コード（6桁の地方公共団体コード。政令市は区）から、管轄の税務署・年金事務所・ハローワーク・法務局（不動産登記）の名前・所在地・電話を返し、役所からは管轄の市区町村の一覧を返します。国税庁・日本年金機構・各都道府県労働局・法務局が公表している管轄区域から作り、町字などで分かれる所は一部（coverage: part）と分け方の文章を返します。説明: https://api.shirugear.com/kankatsu/ 。v1 の中では項目を足すことはあっても、名前や意味は変えません（知らない項目は無視してください）。", "termsOfService": "https://api.shirugear.com/terms/", "contact": {"name": "アナライズギア株式会社（シルギア）", "url": "https://shirugear.com/contact"}}, "servers": [{"url": "https://api.shirugear.com"}], "paths": {"/kankatsu/v1/{code}.json": {"get": {"summary": "市区町村の管轄の役所", "operationId": "getMunicipality", "responses": {"200": {"description": "管轄の役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Municipality"}, "example": {"code": "111023", "code5": "11102", "name": "さいたま市北区", "kind": "ward", "prefecture": "埼玉県", "offices": {"zeimusho": [{"id": "zei-02105", "name": "大宮税務署", "postal": "330-0801", "address": "埼玉県さいたま市大宮区土手町3丁目184番地", "tel": "048-641-4945", "coverage": "all"}], "nenkin": [{"id": "nenkin-saitama-omiya", "name": "大宮年金事務所", "postal": "331-9577", "address": "埼玉県さいたま市北区宮原町4-19-9", "tel": "048-652-3399", "coverage": "all"}], "nenkin_jigyosho": [{"id": "nenkin-saitama-omiya", "name": "大宮年金事務所", "postal": "331-9577", "address": "埼玉県さいたま市北区宮原町4-19-9", "tel": "048-652-3399", "coverage": "all"}], "hellowork": [{"id": "hw-11-874557", "name": "ハローワーク大宮", "kind": "本所", "postal": "330-0852", "address": "埼玉県さいたま市大宮区大成町1-525", "tel": "048-667-8609", "coverage": "all"}], "houmu": [{"id": "houmu-saitama-honkyoku", "name": "さいたま地方法務局", "postal": "338-8513", "address": "埼玉県さいたま市中央区下落合5丁目12番1号(さいたま第2法務総合庁舎)", "tel": "048-851-1000", "coverage": "all"}]}, "data_version": "2026-12-02"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いコード・役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "parameters": [{"name": "code", "in": "path", "required": true, "description": "6桁の地方公共団体コード（政令市は区のコード）", "schema": {"type": "string", "pattern": "^\\d{6}$"}, "example": "111023"}]}}, "/kankatsu/v1/office/{id}.json": {"get": {"summary": "役所と管轄の市区町村", "operationId": "getOffice", "responses": {"200": {"description": "役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Office"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いコード・役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "parameters": [{"name": "id", "in": "path", "required": true, "description": "役所のid（offices.json や市区町村のファイルの id）", "schema": {"type": "string", "pattern": "^[a-z0-9-]{3,40}$"}, "example": "zei-02105"}]}}, "/kankatsu/v1/offices.json": {"get": {"summary": "すべての役所の一覧", "operationId": "getOffices", "responses": {"200": {"description": "一覧", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OfficeList"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いコード・役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/kankatsu/v1/meta.json": {"get": {"summary": "データの版・件数と検査の結果・例外・出典", "operationId": "getMeta", "responses": {"200": {"description": "データの版", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Meta"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いコード・役所", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}}, "components": {"schemas": {"OfficeRef": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "kind": {"type": "string", "description": "ハローワークだけ: 本所・出張所・分室"}, "postal": {"type": ["string", "null"]}, "address": {"type": ["string", "null"]}, "tel": {"type": ["string", "null"]}, "coverage": {"type": "string", "enum": ["all", "part"]}, "detail": {"type": "string", "description": "一部のときの分け方（原文の字のまま）"}, "towns": {"type": "array", "items": {"type": "string"}}, "main_office": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}}}}, "required": ["id", "name", "postal", "address", "tel", "coverage"]}, "Municipality": {"type": "object", "properties": {"code": {"type": "string"}, "code5": {"type": "string"}, "name": {"type": "string"}, "kind": {"type": "string"}, "prefecture": {"type": "string"}, "offices": {"type": "object", "properties": {"zeimusho": {"type": "array", "items": {"$ref": "#/components/schemas/OfficeRef"}}, "nenkin": {"type": "array", "items": {"$ref": "#/components/schemas/OfficeRef"}}, "nenkin_jigyosho": {"type": "array", "items": {"$ref": "#/components/schemas/OfficeRef"}}, "hellowork": {"type": "array", "items": {"$ref": "#/components/schemas/OfficeRef"}}, "houmu": {"type": "array", "items": {"$ref": "#/components/schemas/OfficeRef"}}}, "required": ["zeimusho", "nenkin", "nenkin_jigyosho", "hellowork", "houmu"]}, "not_available": {"type": "object", "additionalProperties": {"type": "string"}}, "data_version": {"type": "string"}}, "required": ["code", "code5", "name", "kind", "prefecture", "offices", "data_version"]}, "CoveredMunicipality": {"type": "object", "properties": {"code": {"type": "string"}, "name": {"type": "string"}, "coverage": {"type": "string", "enum": ["all", "part"]}, "detail": {"type": "string"}}, "required": ["code", "name", "coverage"]}, "Office": {"type": "object", "properties": {"id": {"type": "string"}, "type": {"type": "string", "enum": ["zeimusho", "nenkin", "hellowork", "houmu"]}, "type_label": {"type": "string"}, "name": {"type": "string"}, "kana": {"type": "string"}, "office_number": {"type": "string"}, "kind": {"type": "string"}, "official_name": {"type": "string"}, "bureau": {"type": "string"}, "branch": {"type": "string"}, "prefecture": {"type": "string"}, "postal": {"type": ["string", "null"]}, "address": {"type": ["string", "null"]}, "tel": {"type": ["string", "null"]}, "jurisdiction_text": {"type": "string"}, "municipalities": {"type": "array", "items": {"$ref": "#/components/schemas/CoveredMunicipality"}}, "jurisdiction_text_jigyosho": {"type": "string"}, "municipalities_jigyosho": {"type": "array", "items": {"$ref": "#/components/schemas/CoveredMunicipality"}}, "branch_municipalities": {"type": "array", "items": {"type": "string"}}, "commercial_registration_text": {"type": "string"}, "notes": {"type": "array", "items": {"type": "string"}}, "towns": {"type": "array", "items": {"type": "string"}}, "source_url": {"type": "string"}, "kankatsu_url": {"type": "string"}, "address_source_url": {"type": "string"}, "data_version": {"type": "string"}}, "required": ["id", "type", "name", "prefecture", "jurisdiction_text", "municipalities", "source_url", "data_version"]}, "OfficeList": {"type": "object", "properties": {"count": {"type": "integer"}, "items": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string"}, "type": {"type": "string"}, "name": {"type": "string"}, "prefcode": {"type": "string"}, "kind": {"type": "string"}, "postal": {"type": ["string", "null"]}, "address": {"type": ["string", "null"]}, "tel": {"type": ["string", "null"]}, "municipalities": {"type": "integer"}}}}, "data_version": {"type": "string"}}, "required": ["count", "items", "data_version"]}, "Meta": {"type": "object", "properties": {"data_version": {"type": "string"}, "checked_at": {"type": "string"}, "types": {"type": "object"}, "lgcode_version": {"type": "string"}, "scope": {"type": "string"}, "coverage": {"type": "object"}, "not_available": {"type": "object"}, "corrections": {"type": "array"}, "sources": {"type": "object"}, "notes": {"type": "array", "items": {"type": "string"}}}, "required": ["data_version", "coverage", "sources"]}, "Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"status": {"type": "integer"}, "code": {"type": "string"}, "message": {"type": "string"}}, "required": ["status", "code", "message"]}}, "required": ["error"]}}}}
