{"openapi": "3.1.0", "info": {"title": "シルギア 日本標準産業分類API", "version": "1.0.0", "description": "登録不要・無料の日本標準産業分類のAPI。総務省「日本標準産業分類（令和5年7月告示）」（第14回改定・2024年4月1日施行）の大分類20・中分類99・小分類536・細分類1,473のコードと項目名、説明・事例・不適合事例・上下の階層を返します。e-Stat の分類検索と総務省の分類項目表を加工して作成。説明: https://api.shirugear.com/sangyo/ 。v1 の中では項目を足すことはあっても、名前や意味は変えません（知らない項目は無視してください）。", "termsOfService": "https://api.shirugear.com/terms/", "contact": {"name": "アナライズギア株式会社（シルギア）", "url": "https://shirugear.com/contact"}}, "servers": [{"url": "https://api.shirugear.com"}], "paths": {"/sangyo/v1/{code}.json": {"get": {"summary": "1項目（説明・事例・不適合事例・上の階層・下の一覧）", "operationId": "getItem", "parameters": [{"name": "code", "in": "path", "required": true, "description": "大分類 A〜T（大文字）・中分類2桁・小分類3桁・細分類4桁", "schema": {"type": "string", "pattern": "^(?:[A-T]|[0-9]{2,4})$"}, "example": "3911"}], "responses": {"200": {"description": "1項目", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Item"}}}}, "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"}}}}}}}, "/sangyo/v1/all.json": {"get": {"summary": "全階層のコードと項目名の木", "operationId": "getAll", "responses": {"200": {"description": "全階層", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/All"}}}}, "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"}}}}}}}, "/sangyo/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": {"Level": {"type": "string", "enum": ["division", "major_group", "group", "industry"], "description": "division＝大分類・major_group＝中分類・group＝小分類・industry＝細分類"}, "ItemRef": {"type": "object", "properties": {"code": {"type": "string"}, "level": {"$ref": "#/components/schemas/Level"}, "name": {"type": "string"}}, "required": ["code", "level", "name"]}, "Item": {"type": "object", "properties": {"code": {"type": "string"}, "level": {"$ref": "#/components/schemas/Level"}, "level_name": {"type": "string", "enum": ["大分類", "中分類", "小分類", "細分類"]}, "name": {"type": "string"}, "description": {"type": ["string", "null"], "description": "項目の説明（大分類・中分類は総説）"}, "examples": {"type": "array", "items": {"type": "string"}, "description": "事例"}, "not_included": {"type": "array", "description": "不適合事例", "items": {"type": "object", "properties": {"text": {"type": "string"}, "codes": {"type": "array", "items": {"type": "string"}}, "org": {"type": "string"}, "note": {"type": "string"}}, "required": ["text", "codes"]}}, "management": {"type": "boolean", "description": "管理、補助的経済活動を行う事業所なら true"}, "parent": {"type": ["string", "null"]}, "path": {"type": "array", "items": {"$ref": "#/components/schemas/ItemRef"}}, "children": {"type": "array", "items": {"$ref": "#/components/schemas/ItemRef"}}, "data_version": {"type": "string"}}, "required": ["code", "level", "level_name", "name", "description", "examples", "not_included", "management", "parent", "path", "children", "data_version"]}, "All": {"type": "object", "properties": {"classification": {"type": "string"}, "counts": {"type": "object", "properties": {"division": {"type": "integer"}, "major_group": {"type": "integer"}, "group": {"type": "integer"}, "industry": {"type": "integer"}}, "required": ["division", "major_group", "group", "industry"]}, "divisions": {"type": "array", "items": {"type": "object", "properties": {"code": {"type": "string"}, "name": {"type": "string"}, "major_groups": {"type": "array", "items": {"type": "object", "properties": {"code": {"type": "string"}, "name": {"type": "string"}, "groups": {"type": "array", "items": {"type": "object", "properties": {"code": {"type": "string"}, "name": {"type": "string"}, "industries": {"type": "array", "items": {"type": "object", "properties": {"code": {"type": "string"}, "name": {"type": "string"}}, "required": ["code", "name"]}}}, "required": ["code", "name", "industries"]}}}, "required": ["code", "name", "groups"]}}}, "required": ["code", "name", "major_groups"]}}, "data_version": {"type": "string"}}, "required": ["classification", "counts", "divisions", "data_version"]}, "Meta": {"type": "object", "properties": {"data_version": {"type": "string"}, "classification": {"type": "object"}, "source": {"type": "string"}, "sources": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": "string"}, "url": {"type": "string"}}, "required": ["label", "url"]}}, "license": {"type": "string"}, "counts": {"type": "object"}, "name_fixes": {"type": "array", "items": {"type": "object"}}, "notes": {"type": "array", "items": {"type": "string"}}}, "required": ["data_version", "classification", "source", "sources", "license", "counts"]}, "Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"status": {"type": "integer"}, "code": {"type": "string", "enum": ["invalid_request", "not_found", "region_not_allowed", "method_not_allowed"]}, "message": {"type": "string"}}, "required": ["status", "code", "message"]}}, "required": ["error"]}}}}
