{"openapi":"3.1.0","info":{"title":"japanlaw.org API","version":"1.0.0","summary":"Japanese statutes, searched and addressed down to the item, with the Ministry of Justice's English.","description":"Read-only, no key, open to any origin. Only the Japanese as published by the government has legal effect; every English rendering is marked as the Ministry of Justice's translation or as machine translation. The same data is served to AI assistants over MCP at https://japanlaw.org/mcp, and every provision as Markdown under https://japanlaw.org/md/. https://japanlaw.org/llms.txt describes the collection.","license":{"name":"Statute text: public (e-Gov). Translations: see each source."}},"servers":[{"url":"https://japanlaw.org"}],"externalDocs":{"description":"How to connect an AI assistant","url":"https://japanlaw.org/en/agents"},"paths":{"/api/search":{"get":{"operationId":"search","summary":"Search the statutes in force, in Japanese or English","description":"A query with any Japanese in it searches the Japanese text; one without searches the English shown for each provision, stemmed. `hits` holds one entry per matching article, best first.","parameters":[{"name":"q","in":"query","required":true,"description":"Words to find. Every word must be at least two characters.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Articles per page; clamped to 1–25.","schema":{"type":"integer","default":8,"minimum":1,"maximum":25}},{"name":"page","in":"query","required":false,"description":"1–1000; anything else is read as 1.","schema":{"type":"integer","default":1,"minimum":1,"maximum":1000}},{"name":"lang","in":"query","required":false,"description":"The language of the pages `url` opens.","schema":{"type":"string","enum":["en","ja"],"default":"en"}}],"responses":{"200":{"description":"The matches.","content":{"application/json":{"schema":{"type":"object","required":["side","total","estimated","page","pages","hits","laws","terms","concepts"],"properties":{"side":{"type":"string","enum":["ja","en"],"description":"Which text was searched."},"total":{"type":"integer","description":"Articles matched — or ranked, when `estimated`."},"estimated":{"type":"boolean","description":"True when more provisions matched than are ranked."},"page":{"type":"integer"},"pages":{"type":"integer"},"hits":{"type":"array","items":{"type":"object","required":["path","articlePath","pathLabelJa","pathLabelEn","articleLabelJa","articleLabelEn","captionJa","captionEn","lawSlug","lawTitleJa","lawTitleEn","label","labelEn","caption","lawTitle","snippet","highlights","snippetSource","matchedParts","lawId","url","permanentUrl"],"properties":{"path":{"type":"string","description":"The best-matching paragraph or item's address, such as art-36/par-1."},"articlePath":{"type":"string","description":"The article that holds it, or the appended table or 附則 for a hit outside an article."},"pathLabelJa":{"type":"string","description":"The full Japanese designation of `path`: 第三十六条第一項."},"pathLabelEn":{"type":"string","description":"The same in English: Article 36, paragraph (1)."},"articleLabelJa":{"type":"string"},"articleLabelEn":{"type":"string"},"captionJa":{"type":["string","null"],"description":"The article's caption (見出し)."},"captionEn":{"type":["string","null"]},"lawSlug":{"type":"string"},"lawTitleJa":{"type":"string"},"lawTitleEn":{"type":["string","null"]},"label":{"type":"string","deprecated":true,"description":"Deprecated: use articleLabelJa."},"labelEn":{"type":"string","deprecated":true,"description":"Deprecated: use articleLabelEn."},"caption":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use captionJa."},"lawTitle":{"type":"string","deprecated":true,"description":"Deprecated: use lawTitleJa."},"snippet":{"type":"string","description":"The words around the match."},"highlights":{"type":"array","description":"Offsets into `snippet` (UTF-16 code units) of what matched.","items":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2}},"snippetSource":{"type":["string","null"],"description":"Whose English the snippet is, when it is English: jlt-official (the Ministry of Justice's), corrected, or machine."},"matchedParts":{"type":"integer","description":"How many paragraphs and items of the article matched."},"lawId":{"type":["string","null"],"description":"e-Gov's law ID."},"url":{"type":["string","null"],"description":"The reader's page at exactly this provision, in the language `lang` names."},"permanentUrl":{"type":["string","null"],"description":"The same page by e-Gov's law ID, `/l/{lawId}/{path}`; survives a slug being renamed."}}}},"laws":{"type":"array","items":{"type":"object","required":["slug","titleJa","titleEn","lawType","lawNum","lawId","url","permanentUrl"],"properties":{"slug":{"type":"string"},"titleJa":{"type":"string"},"titleEn":{"type":["string","null"]},"lawType":{"type":"string","description":"Act, CabinetOrder, MinisterialOrdinance, Constitution…"},"lawNum":{"type":"string","description":"The law number as the government writes it: 昭和二十二年法律第四十九号."},"lawId":{"type":["string","null"]},"url":{"type":["string","null"],"description":"The reader's page at exactly this provision, in the language `lang` names."},"permanentUrl":{"type":["string","null"],"description":"The same page by e-Gov's law ID, `/l/{lawId}/{path}`; survives a slug being renamed."}}}},"terms":{"type":"array","items":{"type":"object","required":["term","reading","english","englishWhose","kind","lawSlug","lawTitleJa","lawTitleEn","path","pathLabelJa","pathLabelEn","lawTitle","label","labelEn","lawId","url","permanentUrl"],"properties":{"term":{"type":"string","description":"A word the law defines (定義語)."},"reading":{"type":["string","null"],"description":"In hiragana."},"english":{"type":["string","null"]},"englishWhose":{"type":["string","null"],"enum":["ministry","corrected","ours",null],"description":"Whose that English is."},"kind":{"type":"string"},"lawSlug":{"type":"string"},"lawTitleJa":{"type":"string"},"lawTitleEn":{"type":["string","null"]},"path":{"type":"string","description":"The provision that defines it."},"pathLabelJa":{"type":"string"},"pathLabelEn":{"type":"string"},"lawTitle":{"type":"string","deprecated":true,"description":"Deprecated: use lawTitleJa."},"label":{"type":"string","deprecated":true,"description":"Deprecated: use pathLabelJa."},"labelEn":{"type":"string","deprecated":true,"description":"Deprecated: use pathLabelEn."},"lawId":{"type":["string","null"]},"url":{"type":["string","null"],"description":"The reader's page at exactly this provision, in the language `lang` names."},"permanentUrl":{"type":["string","null"],"description":"The same page by e-Gov's law ID, `/l/{lawId}/{path}`; survives a slug being renamed."}}}},"concepts":{"type":"array","items":{"type":"object","required":["key","ja","en"],"properties":{"key":{"type":"string"},"ja":{"type":"string"},"en":{"type":"string"}}}}}}}}},"400":{"description":"`q` holds no word, or only one-character words.","content":{"application/json":{"schema":{"type":"object","description":"What went wrong. `code` does not change; the empty collection the route answers is sent beside it.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_law","invalid_path","invalid_query","query_too_short","unknown_law","unknown_address","internal"]},"message":{"type":"string","description":"For the person reading the log; may change."}}}}}}}}}}},"/api/outline":{"get":{"operationId":"outline","summary":"A law's outline: the headings and articles of its main text","parameters":[{"name":"law","in":"query","required":true,"description":"The law's slug, such as labor-standards-act.","schema":{"type":"string","pattern":"^[a-z0-9-]{1,100}$"}},{"name":"lang","in":"query","required":false,"description":"The language of the pages `url` opens.","schema":{"type":"string","enum":["en","ja"],"default":"en"}}],"responses":{"200":{"description":"The outline. `pages` is there only for a law with no chapters, read in runs of articles.","content":{"application/json":{"schema":{"type":"object","required":["lawId","entries"],"properties":{"lawId":{"type":"string"},"entries":{"type":"array","items":{"type":"object","required":["id","path","kind","depth","labelJa","caption","heading","repealed","numbers","nameEn","pathLabelJa","pathLabelEn","captionJa","headingJa","url","permanentUrl"],"properties":{"id":{"type":"integer","deprecated":true,"description":"Deprecated: use path (a database row id, which changes whenever the law is reloaded)."},"path":{"type":"string"},"kind":{"type":"string","description":"part, chapter, section, subsection, division or article."},"depth":{"type":"integer"},"labelJa":{"type":"string","deprecated":true,"description":"Deprecated: use pathLabelJa."},"caption":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use captionJa."},"heading":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use headingJa."},"repealed":{"type":"boolean"},"numbers":{"type":"array","items":{"type":"integer"}},"nameEn":{"type":["string","null"],"description":"The English heading, caption or title, where there is one."},"pathLabelJa":{"type":"string"},"pathLabelEn":{"type":["string","null"]},"captionJa":{"type":["string","null"]},"headingJa":{"type":["string","null"]},"url":{"type":"string"},"permanentUrl":{"type":"string"}}}},"pages":{"type":"array","items":{"type":"object","required":["path","firstArticle","lastArticle","nameJa","nameEn","url","permanentUrl"],"properties":{"path":{"type":"string","description":"from-art-N: a run of articles a law with no chapters is read in."},"firstArticle":{"type":"string"},"lastArticle":{"type":"string"},"nameJa":{"type":"string"},"nameEn":{"type":"string"},"url":{"type":"string"},"permanentUrl":{"type":"string"}}}}}}}}},"400":{"description":"`law` is not a slug.","content":{"application/json":{"schema":{"type":"object","description":"What went wrong. `code` does not change; the empty collection the route answers is sent beside it.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_law","invalid_path","invalid_query","query_too_short","unknown_law","unknown_address","internal"]},"message":{"type":"string","description":"For the person reading the log; may change."}}}}}}}},"404":{"description":"No such law is held.","content":{"application/json":{"schema":{"type":"object","description":"What went wrong. `code` does not change; the empty collection the route answers is sent beside it.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_law","invalid_path","invalid_query","query_too_short","unknown_law","unknown_address","internal"]},"message":{"type":"string","description":"For the person reading the log; may change."}}}}}}}}}}},"/api/inbound":{"get":{"operationId":"inbound","summary":"What cites one provision","description":"Every provision in the collection that cites the one given. No official source publishes this direction.","parameters":[{"name":"law","in":"query","required":true,"description":"e-Gov's law ID, such as 322AC0000000049.","schema":{"type":"string","pattern":"^[0-9A-Z]{10,20}$"}},{"name":"path","in":"query","required":true,"description":"The provision's address, such as art-36/par-2.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"The language of the pages `url` opens.","schema":{"type":"string","enum":["en","ja"],"default":"en"}}],"responses":{"200":{"description":"The citing provisions, at most 300.","content":{"application/json":{"schema":{"type":"object","required":["inbound"],"properties":{"inbound":{"type":"array","items":{"type":"object","required":["sourceTexts","sourceTextsEn","fromPath","fromLabel","fromLabelEn","fromCaption","fromCaptionEn","fromLawSlug","fromLawTitle","fromLawTitleEn","fromLawId","sameLaw","sameArticle","fromPathLabelJa","fromPathLabelEn","fromCaptionJa","fromLawTitleJa","fromUrl","fromPermanentUrl"],"properties":{"sourceTexts":{"type":"array","items":{"type":"string"},"description":"Every way the citing provision refers to this one: 「法第三十六条第一項」."},"sourceTextsEn":{"type":"array","items":{"type":"string"}},"fromPath":{"type":"string"},"fromLabel":{"type":"string","deprecated":true,"description":"Deprecated: use fromPathLabelJa."},"fromLabelEn":{"type":"string","deprecated":true,"description":"Deprecated: use fromPathLabelEn."},"fromCaption":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use fromCaptionJa."},"fromCaptionEn":{"type":["string","null"]},"fromLawSlug":{"type":"string"},"fromLawTitle":{"type":"string","deprecated":true,"description":"Deprecated: use fromLawTitleJa."},"fromLawTitleEn":{"type":["string","null"]},"fromLawId":{"type":"string"},"sameLaw":{"type":"boolean"},"sameArticle":{"type":"boolean"},"fromPathLabelJa":{"type":"string"},"fromPathLabelEn":{"type":"string"},"fromCaptionJa":{"type":["string","null"]},"fromLawTitleJa":{"type":"string"},"fromUrl":{"type":"string"},"fromPermanentUrl":{"type":"string"}}}}}}}}},"400":{"description":"`law` or `path` is malformed.","content":{"application/json":{"schema":{"type":"object","description":"What went wrong. `code` does not change; the empty collection the route answers is sent beside it.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_law","invalid_path","invalid_query","query_too_short","unknown_law","unknown_address","internal"]},"message":{"type":"string","description":"For the person reading the log; may change."}}}}}}}},"404":{"description":"No such law, or no such provision in it.","content":{"application/json":{"schema":{"type":"object","description":"What went wrong. `code` does not change; the empty collection the route answers is sent beside it.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_law","invalid_path","invalid_query","query_too_short","unknown_law","unknown_address","internal"]},"message":{"type":"string","description":"For the person reading the log; may change."}}}}}}}}}}}}}