{"openapi":"3.1.0","info":{"title":"Open Legal Data (BYOK) API","version":"0.1.0","description":"Open Legal Data (BYOK) lets an AI assistant read your own Open Legal Data data through the Open Legal Data API with a key you supply (Open Legal Data API token). Read-only: 9 tools (list_cases, get_case, search_cases, list_laws, get_law, search_laws, list_law_books, list_courts, get_court). The BYOK key travels with each request, is used for that one call only and is never stored, logged or...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-openlegaldata.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-openlegaldata/docs"},"termsOfService":"https://connectorbay.com/byok-openlegaldata/terms"},"servers":[{"url":"https://byok-openlegaldata.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-openlegaldata/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_cases":{"post":{"operationId":"list_cases","summary":"List German court decisions (without their full text), newest first by default, filtered by court, jurisdiction, level o","description":"List German court decisions (without their full text), newest first by default, filtered by court, jurisdiction, level of appeal, file number or ECLI. Use get_case for the full text. Use for \"Which recent decisions are in the database from court id 7\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"court":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Numeric court id (see list_courts).","title":"Court"},"court_slug":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Court slug, for example bgh.","title":"Court Slug"},"court_jurisdiction":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Jurisdiction of the court, for example Ordentliche Gerichtsbarkeit.","title":"Court Jurisdiction"},"court_level_of_appeal":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Level of appeal of the court, for example Bundesgericht.","title":"Court Level Of Appeal"},"file_number":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Exact court file number such as 'I ZR 1/24'.","title":"File Number"},"ecli":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"European Case Law Identifier of one decision.","title":"Ecli"},"ordering":{"anyOf":[{"enum":["date","-date"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort by date: 'date' oldest first, '-date' newest first.","title":"Ordering"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results per page (1 to 100).","title":"Page Size"}},"title":"list_casesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_case":{"post":{"operationId":"get_case","summary":"Get one court decision by numeric id, including its full text as HTML, court, file number, date, type and ECLI. Use for ","description":"Get one court decision by numeric id, including its full text as HTML, court, file number, date, type and ECLI. Use for \"Show me the full text of case 1001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Numeric case id from list_cases or search_cases.","title":"Id","type":"integer"}},"required":["id"],"title":"get_caseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_cases":{"post":{"operationId":"search_cases","summary":"Full-text search over court decisions, returning matching passages. Optional date range, ordering by relevance, date or ","description":"Full-text search over court decisions, returning matching passages. Optional date range, ordering by relevance, date or citation count, and citation filters by law book and section. Use for \"Find decisions about Mietminderung since 2023\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Search words (words to find in the decision text); Lucene-style syntax such as quoted phrases is accepted.","maxLength":300,"title":"Text","type":"string"},"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only results from this date on, YYYY-MM-DD.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only results up to this date, YYYY-MM-DD.","title":"End Date"},"order_by":{"anyOf":[{"enum":["relevance","date","most_cited"],"type":"string"},{"type":"null"}],"default":null,"description":"Result order: relevance, date (newest first) or most_cited.","title":"Order By"},"cited_law_book":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions citing a law from this book (slug such as bgb).","title":"Cited Law Book"},"cited_law_section":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions citing this section slug such as 536; needs cited_law_book.","title":"Cited Law Section"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results per page (1 to 100).","title":"Page Size"}},"required":["text"],"title":"search_casesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_laws":{"post":{"operationId":"list_laws","summary":"List law sections (without their text), optionally of one law book, in book order. Use get_law for the text of a section","description":"List law sections (without their text), optionally of one law book, in book order. Use get_law for the text of a section. Use for \"Which sections does the BGB have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"book_slug":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Slug of the law book, for example bgb.","title":"Book Slug"},"book_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Numeric law book id (see list_law_books).","title":"Book Id"},"book_latest":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to restrict to the latest revision of each book.","title":"Book Latest"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging (the answer's next field holds the next page URL).","title":"Offset"}},"title":"list_lawsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_law":{"post":{"operationId":"get_law","summary":"Get one law section by numeric id, including its text as HTML, law book, title and section label. Use for \"Show me the t","description":"Get one law section by numeric id, including its text as HTML, law book, title and section label. Use for \"Show me the text of law section 5001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Numeric law section id from list_laws or search_laws.","title":"Id","type":"integer"}},"required":["id"],"title":"get_lawArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_laws":{"post":{"operationId":"search_laws","summary":"Full-text search over law sections, returning matching passages with the law book code and section title. Use for \"Which","description":"Full-text search over law sections, returning matching passages with the law book code and section title. Use for \"Which laws mention Gewaehrleistung\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Search words (words to find in the law text); Lucene-style syntax such as quoted phrases is accepted.","maxLength":300,"title":"Text","type":"string"},"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only results from this date on, YYYY-MM-DD.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only results up to this date, YYYY-MM-DD.","title":"End Date"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results per page (1 to 100).","title":"Page Size"}},"required":["text"],"title":"search_lawsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_law_books":{"post":{"operationId":"list_law_books","summary":"List law books (a statute or code and its revisions) with code, title, revision date and whether it is the latest revisi","description":"List law books (a statute or code and its revisions) with code, title, revision date and whether it is the latest revision. Use for \"Which law books are available and which revisions are the latest\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"code":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Short code of the law book, for example BGB.","title":"Code"},"slug":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Slug of the law book, for example bgb.","title":"Slug"},"latest":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only the latest revisions.","title":"Latest"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging (the answer's next field holds the next page URL).","title":"Offset"}},"title":"list_law_booksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_courts":{"post":{"operationId":"list_courts","summary":"List courts with type, code, jurisdiction, level of appeal and homepage, filtered by name, type, state or jurisdiction. ","description":"List courts with type, code, jurisdiction, level of appeal and homepage, filtered by name, type, state or jurisdiction. Use for \"Which administrative courts does the database cover\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the court name (case-insensitive).","title":"Name"},"court_type":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Court type such as AG, LG, OLG or VG.","title":"Court Type"},"state_slug":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Slug of the state the court belongs to.","title":"State Slug"},"jurisdiction":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Jurisdiction of the court.","title":"Jurisdiction"},"level_of_appeal":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Level of appeal of the court.","title":"Level Of Appeal"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging (the answer's next field holds the next page URL).","title":"Offset"}},"title":"list_courtsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_court":{"post":{"operationId":"get_court","summary":"Get one court by numeric id with its type, code, description, jurisdiction, level of appeal and homepage. Use for \"Tell ","description":"Get one court by numeric id with its type, code, description, jurisdiction, level of appeal and homepage. Use for \"Tell me about court 7\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Numeric court id from list_courts.","title":"Id","type":"integer"}},"required":["id"],"title":"get_courtArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}