Citations of an article or a decision
const url = 'https://api.pandex.io/v1/citations?format=json';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"direction":"in","element":"example","id":"example","limit":1,"max_tokens":1,"order":"leading","relation":"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/citations?format=json' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "direction": "in", "element": "example", "id": "example", "limit": 1, "max_tokens": 1, "order": "leading", "relation": "example" }'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.
The MCP tool get_citations 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
In (default): documents that cite it. out: what it cites.
Only citations of, or from, this element.
An id from a result, or an identifier or citation.
Lines to return, 1–60. Default 15.
Size of the answer in tokens, 200–8000. Default 1500.
For direction in. leading (default): those the other citing documents cite most. newest: by date.
Only one relation: cites, amends, repeals, implements, consolidates, appeals, joins.
Responses
Section titled “Responses”The answer: JSON, or with format=text the text the MCP tool gives a model.
object
In or out.
The element asked for.
Those whose other side is held.
object
How many of the documents that cite the same text cite this one too.
Elements of the citing side.
How many documents cite the citing document itself.
Its date.
The other document, when it is held.
Its legislator or court.
How many times.
The passage the citation stands in.
Cites, amends, repeals, implements, consolidates, appeals, joins.
What it points to as written, for a target not held.
Its title.
Elements of the cited side.
The document.
Those whose other side is not held, as written.
object
How many of the documents that cite the same text cite this one too.
Elements of the citing side.
How many documents cite the citing document itself.
Its date.
The other document, when it is held.
Its legislator or court.
How many times.
The passage the citation stands in.
Cites, amends, repeals, implements, consolidates, appeals, joins.
What it points to as written, for a target not held.
Its title.
Elements of the cited side.
A word on the answer.
Its title.
Citations in all.
Example generated
{ "direction": "example", "element": "example", "held": [ { "among": 1, "at": [ "example" ], "cited_by": 1, "date": "example", "id": "example", "issuer": "example", "n": 1, "quote": "example", "relation": "example", "target": "example", "title": "example", "to": [ "example" ] } ], "id": "example", "not_held": [ { "among": 1, "at": [ "example" ], "cited_by": 1, "date": "example", "id": "example", "issuer": "example", "n": 1, "quote": "example", "relation": "example", "target": "example", "title": "example", "to": [ "example" ] } ], "note": "example", "title": "example", "total": 1}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"}