{"components":{"parameters":{"format":{"description":"json (default), or text: the answer written for a model to read, as the MCP tool gives it.","in":"query","name":"format","required":false,"schema":{"enum":["json","text"],"type":"string"}}},"responses":{"FromPage":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"The request came from a page in a browser on another site. Call the API from a server."},"Limit":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The limit of the key, or of the address without one, is reached. The message says when to ask again."},"Refused":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An argument is missing or wrong, or no text was found for an id. The message says what to pass instead."},"Unknown":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The key is not known or was switched off."}},"schemas":{"Change":{"properties":{"change":{"description":"amended, inserted or repealed.","type":"string"},"coming":{"description":"from is after today.","type":"boolean"},"element":{"description":"The article.","type":"string"},"from":{"description":"The day this wording took effect; for repealed the day the last one ended.","type":"string"},"id":{"description":"The law.","type":"string"},"label":{"description":"Its number.","type":"string"},"lang":{"description":"The language.","type":"string"},"path":{"description":"Where it stands.","type":["string","null"]},"previous_from":{"description":"The day the wording before took effect.","type":["string","null"]},"short_title":{"description":"Its short name.","type":["string","null"]},"title":{"description":"Its title.","type":"string"},"to":{"description":"The day it ended.","type":["string","null"]}},"type":"object"},"ChangesAnswer":{"properties":{"as_of":{"description":"The day the source was last read.","type":["string","null"]},"changes":{"description":"Newest first.","items":{"$ref":"#/components/schemas/Change"},"type":"array"},"held_from":{"description":"The day the lines of a source or a country go back to.","type":["string","null"]},"note":{"description":"A word on the answer.","type":["string","null"]},"offset":{"description":"Lines skipped.","type":"integer"},"since":{"description":"From.","type":["string","null"]},"total":{"description":"Lines in the window, before limit and offset.","type":"integer"},"until":{"description":"Until.","type":["string","null"]}},"type":"object"},"CiteAnswer":{"properties":{"direction":{"description":"in or out.","type":"string"},"element":{"description":"The element asked for.","type":["string","null"]},"held":{"description":"Those whose other side is held.","items":{"$ref":"#/components/schemas/CiteLine"},"type":"array"},"id":{"description":"The document.","type":"string"},"not_held":{"description":"Those whose other side is not held, as written.","items":{"$ref":"#/components/schemas/CiteLine"},"type":"array"},"note":{"description":"A word on the answer.","type":["string","null"]},"title":{"description":"Its title.","type":"string"},"total":{"description":"Citations in all.","type":"integer"}},"type":"object"},"CiteLine":{"properties":{"among":{"description":"How many of the documents that cite the same text cite this one too.","type":["integer","null"]},"at":{"description":"Elements of the citing side.","items":{"type":"string"},"type":"array"},"cited_by":{"description":"How many documents cite the citing document itself.","type":"integer"},"date":{"description":"Its date.","type":["string","null"]},"id":{"description":"The other document, when it is held.","type":["string","null"]},"issuer":{"description":"Its legislator or court.","type":["string","null"]},"n":{"description":"How many times.","type":"integer"},"quote":{"description":"The passage the citation stands in.","type":["string","null"]},"relation":{"description":"cites, amends, repeals, implements, consolidates, appeals, joins.","type":"string"},"target":{"description":"What it points to as written, for a target not held.","type":["string","null"]},"title":{"description":"Its title.","type":["string","null"]},"to":{"description":"Elements of the cited side.","items":{"type":"string"},"type":"array"}},"type":"object"},"DocAnswer":{"properties":{"cited_by":{"description":"Documents that cite it.","type":"integer"},"date":{"description":"Its date.","type":["string","null"]},"doc_type":{"description":"Its type.","type":"string"},"elements":{"description":"The text, element by element.","items":{"$ref":"#/components/schemas/Element"},"type":"array"},"held_from":{"description":"The start of the oldest wording held, when the text is older.","type":["string","null"]},"history":{"description":"With history: the periods of every version of the element, oldest first.","items":{"prefixItems":[{"type":["string","null"]},{"type":["string","null"]}],"type":"array"},"type":"array"},"id":{"description":"The document.","type":"string"},"identifiers":{"description":"ECLI, CELEX, ELI and the other names it goes by.","items":{"type":"string"},"type":"array"},"in_force_from":{"description":"In force from.","type":["string","null"]},"in_force_to":{"description":"In force until.","type":["string","null"]},"issuer":{"description":"The legislator or court.","type":["string","null"]},"kind":{"description":"legislation, decision or treaty.","type":"string"},"lang":{"description":"The language shown.","type":"string"},"languages":{"description":"The languages it is held in.","items":{"type":"string"},"type":"array"},"leading":{"description":"One article asked: the decisions on it that are cited most.","items":{"$ref":"#/components/schemas/CiteLine"},"type":"array"},"leading_total":{"description":"How many decisions cite the article.","type":"integer"},"next":{"description":"Pass as from to read on.","type":["string","null"]},"note":{"description":"A word on the answer.","type":["string","null"]},"title":{"description":"Its title.","type":"string"},"url":{"description":"At its publisher.","type":["string","null"]},"versions":{"description":"Versions held.","type":"integer"}},"type":"object"},"Element":{"properties":{"element":{"description":"Its id (art_823, chp_2).","type":"string"},"label":{"description":"Its number as written.","type":"string"},"path":{"description":"Where it stands.","type":"string"},"since_at_least":{"description":"valid_from is only the start of the oldest wording held.","type":"boolean"},"text":{"description":"The official wording.","type":"string"},"valid_from":{"description":"The day this wording took effect.","type":["string","null"]},"valid_to":{"description":"The day it ended.","type":["string","null"]}},"type":"object"},"Error":{"properties":{"error":{"description":"What was wrong, and what to pass instead.","type":"string"}},"required":["error"],"type":"object"},"Hit":{"description":"A passage: an article of a law, a paragraph of a decision.","properties":{"by":{"description":"How it was found: name, text, meaning, text+meaning, filter.","type":"string"},"cited_by":{"description":"How many documents cite it: the provision for a law, the decision for a decision.","type":"integer"},"cited_whole":{"description":"How many documents cite the law as a whole.","type":["integer","null"]},"cut":{"description":"text is a part of the passage.","type":"boolean"},"date":{"description":"The date of the document, YYYY-MM-DD.","type":["string","null"]},"doc_type":{"description":"act, regulation, directive, judgment, opinion…","type":"string"},"element":{"description":"The passage within it: an article (art_17), a paragraph (p_8).","type":"string"},"element_last":{"description":"A passage of a decision found by meaning runs from element to this one.","type":"string"},"id":{"description":"The document: {source}:{its own id}. Pass it to the other operations.","type":"string"},"issuer":{"description":"The legislator or court.","type":["string","null"]},"kind":{"description":"legislation, decision or treaty.","type":"string"},"lang":{"description":"The language of the text shown.","type":"string"},"path":{"description":"Where the passage stands: its part, chapter and article.","type":"string"},"quoted":{"description":"Most of the text shown is what the decision quotes, not its own words.","type":"boolean"},"score":{"type":"number"},"sim":{"description":"Found by meaning: how alike the passage and the question are.","type":"number"},"since_at_least":{"description":"valid_from is only the start of the oldest wording held: the wording is that old or older.","type":"boolean"},"text":{"description":"The passage in its official wording.","type":"string"},"title":{"description":"The title, or the short name the text goes by.","type":"string"},"title_full":{"description":"The full title, where title is the short name.","type":"string"},"url":{"description":"The document at its publisher.","type":["string","null"]},"valid_from":{"description":"The day the wording shown came into force, where the source says so.","type":["string","null"]}},"type":"object"},"OutlineAnswer":{"properties":{"id":{"description":"The document.","type":"string"},"lang":{"description":"The language shown.","type":"string"},"lines":{"description":"The structure.","items":{"$ref":"#/components/schemas/OutlineLine"},"type":"array"},"note":{"description":"A word on the answer.","type":["string","null"]},"title":{"description":"Its title.","type":"string"}},"type":"object"},"OutlineLine":{"properties":{"count":{"description":"Elements folded into this line.","type":"integer"},"element":{"description":"Its id.","type":"string"},"kind":{"description":"part, chapter, article…","type":"string"},"label":{"description":"Its number and heading.","type":"string"},"level":{"description":"How deep it stands.","type":"integer"}},"type":"object"},"SearchAnswer":{"properties":{"facets":{"description":"With facets: passages holding every word, by jurisdiction, source and year.","properties":{"jurisdiction":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array"},"type":"array"},"source":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array"},"type":"array"},"year":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array"},"type":"array"}},"type":["object","null"]},"hits":{"description":"The passages, best first.","items":{"$ref":"#/components/schemas/Hit"},"type":"array"},"ms":{"description":"Milliseconds taken.","type":"integer"},"next_offset":{"description":"Pass as offset for the next page.","type":["integer","null"]},"note":{"description":"A word on the answer: what was understood, what is missing.","type":["string","null"]},"offset":{"description":"Results skipped.","type":"integer"},"total":{"description":"Passages that match the words and filters.","type":["integer","null"]},"total_documents":{"description":"Documents those passages are in.","type":["integer","null"]},"total_of":{"description":"What the totals count: every_word, or some_words when no passage holds every word.","type":["string","null"]}},"type":"object"},"Source":{"properties":{"documents":{"description":"Documents held.","type":"integer"},"id":{"description":"The source: pass it as source.","type":"string"},"jurisdiction":{"description":"eu, de, ch-zh…","type":"string"},"kind":{"description":"legislation, decision or treaty.","type":"string"},"languages":{"items":{"type":"string"},"type":"array"},"linked":{"description":"Of its citations of other documents: the share whose target is held.","type":["number","null"]},"name":{"description":"What it is.","type":"string"},"parsed_at":{"description":"When it was last read.","type":["string","null"]},"passages":{"description":"Passages held.","type":"integer"},"reuse":{"description":"The publisher's terms of reuse.","properties":{"licence":{"description":"The licence.","type":"string"},"note":{"description":"A word on them.","type":"string"},"url":{"description":"Where the terms are.","type":"string"}},"type":["object","null"]},"scope":{"description":"What it covers.","type":"string"},"vectors":{"description":"Passages searchable by meaning.","type":"integer"}},"type":"object"},"Sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"}},"securitySchemes":{"bearer":{"description":"A key from https://www.pandex.io/key. Without one an address may ask a few times a day.","scheme":"bearer","type":"http"},"header":{"in":"header","name":"X-API-Key","type":"apiKey"},"query":{"in":"query","name":"key","type":"apiKey"}}},"info":{"contact":{"url":"https://www.pandex.io"},"description":"Official legal texts from the institutions that publish them: legislation with its past versions, and court decisions. The same six operations are the tools of the MCP server at /mcp.","title":"Pandex API","version":"1"},"openapi":"3.1.0","paths":{"/v1/changes":{"post":{"description":"What changed in a law, or in the laws of a source or country: the articles whose wording changed, was inserted or repealed, newest first, with the day. A wording not yet in force is listed too. One law by its id gives all the changes held; a source or a jurisdiction goes five years back.\n\nThe MCP tool `get_changes` takes the same arguments.","operationId":"get_changes","parameters":[{"$ref":"#/components/parameters/format"}],"requestBody":{"content":{"application/json":{"example":{"id":"Awb","limit":5},"schema":{"properties":{"id":{"description":"One law: an id from a result, or an identifier or citation.","type":"string"},"jurisdiction":{"description":"Or the laws of one jurisdiction (\"ch\").","type":"string"},"lang":{"description":"Two-letter language, for texts that exist in several.","type":"string"},"limit":{"description":"Lines to return, 1–500. Default 50.","type":"integer"},"offset":{"description":"Lines to skip, for the next page.","type":"integer"},"since":{"description":"Only changes from this day on, YYYY-MM-DD.","type":"string"},"source":{"description":"Or the laws of one source id from list_sources.","type":"string"},"until":{"description":"Only changes up to this day, YYYY-MM-DD.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangesAnswer"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"What changed in the law","tags":["Law"]}},"/v1/citations":{"post":{"description":"What cites a document or one of its articles (direction \"in\": the leading ones first, those the other citing documents cite most, each with the passage that cites it), or what it cites (direction \"out\"), with the places where. Targets we do not hold are listed as written. To search inside the citing passages, use search with cites.\n\nThe MCP tool `get_citations` takes the same arguments.","operationId":"get_citations","parameters":[{"$ref":"#/components/parameters/format"}],"requestBody":{"content":{"application/json":{"example":{"element":"art_17","id":"32016R0679","limit":3},"schema":{"properties":{"direction":{"description":"in (default): documents that cite it. out: what it cites.","enum":["in","out"],"type":"string"},"element":{"description":"Only citations of, or from, this element.","type":"string"},"id":{"description":"An id from a result, or an identifier or citation.","type":"string"},"limit":{"description":"Lines to return, 1–60. Default 15.","type":"integer"},"max_tokens":{"description":"Size of the answer in tokens, 200–8000. Default 1500.","type":"integer"},"order":{"description":"For direction in. leading (default): those the other citing documents cite most. newest: by date.","enum":["leading","newest"],"type":"string"},"relation":{"description":"Only one relation: cites, amends, repeals, implements, consolidates, appeals, joins.","type":"string"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CiteAnswer"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"Citations of an article or a decision","tags":["Law"]}},"/v1/document":{"post":{"description":"Read a document or one part of it in its official wording: a whole short text, one article (element), everything under a chapter, or the text as it stood on a date. One article of a law comes with the leading decisions on it: those cited most by the decisions that cite the article. Long documents come in pieces; the answer says how to continue.\n\nThe MCP tool `get_document` takes the same arguments.","operationId":"get_document","parameters":[{"$ref":"#/components/parameters/format"}],"requestBody":{"content":{"application/json":{"example":{"element":"823","id":"BGB"},"schema":{"properties":{"at":{"description":"Read the text in force on this day, YYYY-MM-DD. Default: the current text.","type":"string"},"cases":{"description":"With one article of a law: the leading decisions on it. Default true.","type":"boolean"},"element":{"description":"The part to read: an element id from a result or outline (art_6:162, art_823, chp_2) or its number as written (\"6:162\", \"823\", \"Annex III\", \"recital 26\").","type":"string"},"from":{"description":"Continue reading from this element id (given by a previous answer).","type":"string"},"history":{"description":"With element: also list the periods of every version of it.","type":"boolean"},"id":{"description":"An id from a result, or an identifier or citation: an ECLI, a CELEX number, \"BGB\", \"art. 6:162 BW\".","type":"string"},"lang":{"description":"Two-letter language, for texts that exist in several.","type":"string"},"max_tokens":{"description":"Size of the answer in tokens, 200–8000. Default 1500.","type":"integer"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocAnswer"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"Read a law, an article or a decision","tags":["Law"]}},"/v1/outline":{"post":{"description":"The structure of a document: its parts, chapters and articles with their headings and element ids. Use it to find the right article of a long law before reading it.\n\nThe MCP tool `get_outline` takes the same arguments.","operationId":"get_outline","parameters":[{"$ref":"#/components/parameters/format"}],"requestBody":{"content":{"application/json":{"example":{"id":"32016R0679","lang":"en","under":"chp_iii"},"schema":{"properties":{"at":{"description":"The structure as it stood on this day, YYYY-MM-DD.","type":"string"},"id":{"description":"An id from a result, or an identifier or citation.","type":"string"},"lang":{"description":"Two-letter language, for texts that exist in several.","type":"string"},"max_tokens":{"description":"Size of the answer in tokens, 200–8000. Default 1500.","type":"integer"},"under":{"description":"Only the structure below this element (a part or chapter).","type":"string"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutlineAnswer"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"Outline of a law","tags":["Law"]}},"/v1/search":{"post":{"description":"Find passages of legislation and court decisions. Answers with the passages themselves (an article, a paragraph of a judgment), each with its document, date, id and url. A query that names a text (\"art. 6:162 BW\", \"§ 823 BGB\", \"ECLI:NL:HR:2019:2006\", \"32016R0679 art 17\") is answered with that text first. Write the query in the language of the documents; set jurisdiction when you know it.\n\nThe MCP tool `search` takes the same arguments. GET with the arguments as a query string works too.","operationId":"search","parameters":[{"$ref":"#/components/parameters/format"}],"requestBody":{"content":{"application/json":{"example":{"jurisdiction":"eu","limit":3,"query":"right to erasure personal data"},"schema":{"properties":{"cites":{"description":"Only passages that cite this document or article: an id, id#element, or a citation.","type":"string"},"court":{"description":"Words from the court's name, e.g. \"Hoge Raad\", \"Bundesgerichtshof\", \"Grand Chamber\".","type":"string"},"date_from":{"description":"Earliest document date, YYYY-MM-DD.","type":"string"},"date_to":{"description":"Latest document date, YYYY-MM-DD.","type":"string"},"doc_type":{"description":"A document type as shown in results, e.g. regulation, directive, act, judgment, opinion.","type":"string"},"facets":{"description":"Also count the passages that hold every word by jurisdiction, source and year.","type":"boolean"},"jurisdiction":{"description":"One or more of: at, be, br, ca (with its parts, each also asked alone: ca-bc, ca-on), ch (with its parts, each also asked alone: ch-ag, ch-ar, ch-bl, ch-bs, ch-ge, ch-gl, ch-gr, ch-ju, ch-lu, ch-ne, ch-nw, ch-sg, ch-sh, ch-so, ch-sz, ch-tg, ch-ti, ch-ur, ch-vd, ch-zg, ch-zh), coe, cw, cz, de, dj, dk, es, eu, fi, fr, gb, it, lu, mt, mx, ng, nl, pl, pt, se, tn, us (with its parts, each also asked alone: us-co). Comma-separated.","type":"string"},"kind":{"description":"Only laws, only court decisions, or only treaties.","enum":["legislation","decision","treaty"],"type":"string"},"lang":{"description":"Two-letter language to match and answer in (texts that exist in several languages). Default: the query's language.","type":"string"},"limit":{"description":"Passages to return, 1–20. Default 5.","type":"integer"},"max_tokens":{"description":"Size of the answer in tokens, 200–8000. Default 1500.","type":"integer"},"mode":{"description":"hybrid (default): words and meaning (decisions: both together; laws: meaning when no passage holds every word); text: only words; meaning: only meaning.","enum":["hybrid","text","meaning"],"type":"string"},"offset":{"description":"Results to skip, for the next page: the answer says the offset of the next one.","type":"integer"},"query":{"description":"Words, a question, or a citation. Put a phrase in double quotes to require it literally.","type":"string"},"sort":{"description":"relevance (default); date: newest first; date_asc: oldest first; cited: most cited first. The last three order the passages that hold every word.","enum":["relevance","date","date_asc","cited"],"type":"string"},"source":{"description":"Source ids from list_sources, comma-separated.","type":"string"},"within":{"description":"Only passages of this document: an id or a citation.","type":"string"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAnswer"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"Search legislation and court decisions","tags":["Law"]}},"/v1/sources":{"get":{"description":"The sources that are loaded, per jurisdiction: what each one holds, its languages, how many documents and as of which day. With a jurisdiction: also its institutions (courts, legislators), what is held of each and what is not.\n\nThe MCP tool `list_sources` takes the same arguments.","operationId":"list_sources","parameters":[{"$ref":"#/components/parameters/format"},{"description":"Only these jurisdictions, comma-separated.","example":"lu","in":"query","name":"jurisdiction","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sources"}},"text/plain":{"schema":{"type":"string"}}},"description":"The answer: JSON, or with `format=text` the text the MCP tool gives a model."},"400":{"$ref":"#/components/responses/Refused"},"401":{"$ref":"#/components/responses/Unknown"},"403":{"$ref":"#/components/responses/FromPage"},"429":{"$ref":"#/components/responses/Limit"}},"summary":"Sources and coverage","tags":["Sources"]}}},"security":[{"bearer":[]},{"header":[]},{"query":[]},{}],"servers":[{"url":"https://api.pandex.io"}],"tags":[{"description":"Search, read and follow the law.","name":"Law"},{"description":"What is held.","name":"Sources"}]}