Skip to content

Outline of a law

POST
/v1/outline
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.

format
string
Allowed values: json text

Json (default), or text: the answer written for a model to read, as the MCP tool gives it.

Media typeapplication/json
object
at

The structure as it stood on this day, YYYY-MM-DD.

string
id
required

An id from a result, or an identifier or citation.

string
lang

Two-letter language, for texts that exist in several.

string
max_tokens

Size of the answer in tokens, 200–8000. Default 1500.

integer
under

Only the structure below this element (a part or chapter).

string

Example generated

{
"at": "example",
"id": "example",
"lang": "example",
"max_tokens": 1,
"under": "example"
}

The answer: JSON, or with format=text the text the MCP tool gives a model.

object
id

The document.

string
lang

The language shown.

string
lines

The structure.

Array<object>
object
count

Elements folded into this line.

integer
element

Its id.

string
kind

Part, chapter, article…

string
label

Its number and heading.

string
level

How deep it stands.

integer
note

A word on the answer.

string | null
title

Its title.

string

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.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}

The key is not known or was switched off.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}

The request came from a page in a browser on another site. Call the API from a server.

Media typetext/plain
string

The limit of the key, or of the address without one, is reached. The message says when to ask again.

Media typeapplication/json
object
error
required

What was wrong, and what to pass instead.

string

Example generated

{
"error": "example"
}