Outline of a law
const url = 'https://api.pandex.io/v1/outline?format=json';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"at":"example","id":"example","lang":"example","max_tokens":1,"under":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.pandex.io/v1/outline?format=json' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "at": "example", "id": "example", "lang": "example", "max_tokens": 1, "under": "example" }'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.
The MCP tool get_outline takes the same arguments.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Json (default), or text: the answer written for a model to read, as the MCP tool gives it.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The structure as it stood on this day, YYYY-MM-DD.
An id from a result, or an identifier or citation.
Two-letter language, for texts that exist in several.
Size of the answer in tokens, 200–8000. Default 1500.
Only the structure below this element (a part or chapter).
Example generated
{ "at": "example", "id": "example", "lang": "example", "max_tokens": 1, "under": "example"}Responses
Section titled “Responses”The answer: JSON, or with format=text the text the MCP tool gives a model.
object
The document.
The language shown.
The structure.
object
Elements folded into this line.
Its id.
Part, chapter, article…
Its number and heading.
How deep it stands.
A word on the answer.
Its title.
Example generated
{ "id": "example", "lang": "example", "lines": [ { "count": 1, "element": "example", "kind": "example", "label": "example", "level": 1 } ], "note": "example", "title": "example"}An argument is missing or wrong, or no text was found for an id. The message says what to pass instead.
object
What was wrong, and what to pass instead.
Example generated
{ "error": "example"}The key is not known or was switched off.
object
What was wrong, and what to pass instead.
Example generated
{ "error": "example"}The request came from a page in a browser on another site. Call the API from a server.
The limit of the key, or of the address without one, is reached. The message says when to ask again.
object
What was wrong, and what to pass instead.
Example generated
{ "error": "example"}