Skip to main content
Documentation · MCP + REST API

From zero to a first answer in five minutes.

One API key, one command, and your agent is reading official sources from Argentina, Brazil, Chile and Mexico. This page is the whole reference: tools, parameters, errors and limits, with real responses from the server.

Quickstart

1. Get a key

Pick a plan on the plans page and sign in with your email: we send a link, there is no password. In the dashboard, create an API key. It is shown once, so store it as a secret. Every key starts with jn_live_.

2. Connect your client

The server speaks MCP over streamable HTTP and authenticates with the key in a header. Any client that accepts a remote HTTP server with headers works.

Claude CodeMCP · HTTP
claude mcp add --transport http jurisnet \ https://mcp.jurisnet.ai/public/mcp \ --header "X-API-Key: $JURISNET_API_KEY"
Cursor · ~/.cursor/mcp.json or .cursor/mcp.jsonMCP · HTTP
{ "mcpServers": { "jurisnet": { "url": "https://mcp.jurisnet.ai/public/mcp", "headers": { "X-API-Key": "<your-key>" } } } }
VS Code · .vscode/mcp.json (asks for the key once)MCP · HTTP
{ "inputs": [ { "type": "promptString", "id": "jurisnet-key", "description": "JurisNet API key", "password": true } ], "servers": { "jurisnet": { "type": "http", "url": "https://mcp.jurisnet.ai/public/mcp", "headers": { "X-API-Key": "${input:jurisnet-key}" } } } }

Endpoint, transport and header are all a client needs. MCP accepts X-API-Key: <key> or Authorization: Bearer <key>.

Any HTTP MCP clientMCP · HTTP
# Endpoint https://mcp.jurisnet.ai/public/mcp # Transport streamable HTTP # Header X-API-Key: <your-key> curl -s https://mcp.jurisnet.ai/public/mcp \ -H "X-API-Key: $JURISNET_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Claude on the web and desktop, and ChatGPT, add remote servers through OAuth, not API keys. OAuth is on its way; until then, use one of the clients above.

3. Your first REST call

The same key opens the REST API. One call, one JSON answer:

RESTGET
# Supreme Court tesis, first result curl -s -G "https://api.jurisnet.ai/api/raw/search" \ --data-urlencode "q=suspensión del acto reclamado" \ -d country=MX -d source=MX/SCJN-Tesis -d limit=1 \ -H "X-API-Key: $JURISNET_API_KEY"

Try these with your agent

  • “Find the Supreme Court tesis on suspension of the challenged act in amparo and give me the official link for each one.”
  • “Which laws amended Argentina's consumer protection law, Ley 24.240? List them by date.”
  • “Search SCBA rulings on dismissal during pregnancy since 2020 and summarise the criterion, citing each ruling.”

The four tools

Real responses from the service, trimmed for length.

get_document

Fetches a document's metadata and text by the numeric id from search. Long texts come in pages.

ParameterTypeDefaultWhat it does
idintegerrequiredThe id from a search result.
max_charsinteger20000Characters of text per call, up to 100,000.
offset_charsinteger0Where to start reading. Pass the previous text_next_offset.

text_length is the full length; text_next_offset is null once you have read to the end.

Argumentsget_document
{ "id": 6317175, "max_chars": 300 }
ResponseJSON
{ "id": 6317175, "country": "MX", "source": "MX/SCJN-Tesis", "upstream_id": "2029697", "type": "case_law", "title": "I.11o.C.28 K (11a.) — RECURSO DE QUEJA. …", "citation": null, "date": "2024-12-06", "issuer": "Tribunales Colegiados de Circuito", "lang": "es", "url": "https://sjf2.scjn.gob.mx/detalle/tesis/2029697", "text": "RECURSO DE QUEJA. QUEDA SIN MATERIA EL INTERPUESTO CONTRA LA RESOLUCIÓN DICTADA POR LA AUTORIDAD RESPONSABLE EN EL INCIDENTE DE MODIFICACIÓN DEL MONTO DE LA GARANTÍA FIJADA CON MOTIVO DE LA SUSPENSIÓN DEL ACTO RECLAMADO, SI EN EL JUICIO DE AMPARO DIRECTO SE DICTA SENTENCIA EJECUTORIA QUE CONCEDE LA ", "text_length": 2957, "text_offset": 0, "text_next_offset": 300 }

list_sources

Lists the sources your key can read, with totals per country and the date of each source's last update run.

ParameterTypeDefaultWhat it does
countrystring—AR, BR, CL or MX. Without it, every country in your plan.

doc_count changes every day, so the example hides it. last_run is when that source was last updated.

Argumentslist_sources
{ "country": "MX" }
ResponseJSON
{ "countries": { "MX": { "sources": 9, "documents": 1262629 } }, "total_documents": 1262629, "sources": [ { "id": "MX/DOF", "country": "MX", "name": "Diario Oficial de la Federación (SIDOF)", "url": "https://sidof.segob.gob.mx/dof/sidof", "doc_count": …, "last_run": "2026-11-06T07:49:48.884532+00:00" }, { "id": "MX/SCJN-Tesis", "country": "MX", "name": "Suprema Corte de Justicia de la Nación — Tesis del Semanario Judicial (texto completo)", "url": "https://sjf2.scjn.gob.mx/SJFHome/home", "doc_count": …, "last_run": "2026-11-06T22:28:43.391884+00:00" } // … ] }

get_relations

Walks Argentine legislation: which norms amend a law, and which laws it amends. Data from InfoLEG.

ParameterTypeDefaultWhat it does
idintegerrequiredThe id of an InfoLEG document (source = AR/INFOLEG-SEED).
directionstringbothmodificada_por (amended by), modifica_a (amends) or both.
limitinteger50Relations per page, 1 to 200.
cursorstring—The previous next_cursor.

Each relation points to the other norm by related_document_id, which you can pass to get_document.

Argumentsget_relations
{ "id": 123135, "direction": "modifica_a", "limit": 2 }
ResponseJSON
{ "document_id": 123135, "upstream_id": "52068", "direction": "modifica_a", "relations": [ { "direction": "modifica_a", "related_document_id": 74702, "related_upstream_id": "638", "related_title": "Ley 24240 - REGIMEN LEGAL", "related_type": "legislation", "related_date": "1993-09-22", "related_url": "http://servicios.infoleg.gob.ar/infolegInternet/anexos/0-4999/638/texact.htm", "related_issuer": "HONORABLE CONGRESO DE LA NACION ARGENTINA", "infoleg_metadata": { "tipo_norma": "Ley", "numero_norma": "24240", "titulo_sumario": "DEFENSA DEL CONSUMIDOR", "texto_original": "http://servicios.infoleg.gob.ar/infolegInternet/anexos/0-4999/638/norma.htm", "texto_actualizado": "http://servicios.infoleg.gob.ar/infolegInternet/anexos/0-4999/638/texact.htm" // … }, "titulo_resumido": "MODIFICACION PARCIAL LEY 24.240", "titulo_sumario": "DEFENSA DEL CONSUMIDOR" } ], "next_cursor": null, "limit": 2 }

REST API

The REST API reads the same data as the tools. Send the key in X-API-Key: REST does not accept Authorization: Bearer.

Base URL: https://api.jurisnet.ai/api/raw

Method and pathToolNotes
GET /search?q=…searchSame filters, with q instead of query. limit 1–100, default 20. No offset: for deep pagination use MCP.
GET /documents/{id}get_documentAll the available text in one response, plus raw_payload (the source's own metadata), fetched_at and last_seen_at.
GET /sourceslist_sourcesIncludes each source's status.
GET /documents/{id}/relationsget_relationsdirection, limit (1–200) and cursor.

Search and filters

  • Write short keyword queries in the language of the documents: Spanish for Argentina, Chile and Mexico, Portuguese for Brazil.
  • Pass country whenever you know it, and source when you know where the answer lives. It narrows the search and makes it faster.
  • Cite norms by number: Ley 24.240, Decreto 70/2023.
  • Responses carry total, the number of matches. With enhanced search, responses carry has_more instead, and match: "any_terms" when no document contained every word and the results fall back to documents with some of them.

Pagination

  • search: raise offset by limit on each call. Up to 1,000 results deep.
  • get_document: call again with offset_chars = text_next_offset until it is null.
  • get_relations: pass next_cursor as cursor until it is null.

Errors and limits

Authentication and limit errors come back as HTTP status codes:

MCPHTTP
# Missing or unknown key HTTP 401 {"error": "…", "code": "UNAUTHORIZED"} # Over the per-minute limit HTTP 429 {"error": "…", "code": "RATE_LIMITED"}

Inside a tool call, problems with the request come back as a normal result with an error field: a document that does not exist or is outside your plan, a country your plan does not include, an invalid cursor. Your agent can read the message and correct itself.

MCPget_document
{ "error": "document not found" }

The REST API uses HTTP status codes for everything:

RESTHTTP
# Missing X-API-Key header HTTP 422 # Unknown, revoked or expired key HTTP 401 # Document not found or outside your plan HTTP 404

Limits

  • Solo: 30 requests per minute per key, 1 active key.
  • Builder: 120 requests per minute per key, up to 5 active keys.
  • Over the limit you get 429 with RATE_LIMITED. Wait a few seconds and retry.
  • A revoked key answers 401. Keys are revoked when the subscription ends.
  • Each key reads the countries in its plan: up to 2 of your choice with Solo; with Builder, up to 5, which today means all four available (AR, BR, CL, MX). Asking for a country outside your plan returns an error.

Full text, summary or record

Every document carries its metadata, citation and official link. How much text comes with it depends on the source: in Brazil most documents include the full text; in Argentina, Chile and Mexico most are records, with the text where the source publishes it.

  • Full text: text holds the whole document, as published by the source.
  • Partial: text holds a summary written by the source (a sumario or a tesis), or the text for only part of the collection.
  • Record: text holds the metadata and a short description. The full document is at url, often an official PDF.

The level of each source is in the coverage table →

How to cite

  • Cite the url: it is the official source. JurisNet is the road to the document, not the document.
  • Build the reference from title or citation, issuer and date.
  • Before relying on a norm, check on the official site that it is still in force and that no later text replaced it.
Example
Tribunales Colegiados de Circuito, tesis I.11o.C.28 K (11a.), 2024-12-06. https://sjf2.scjn.gob.mx/detalle/tesis/2029697

JurisNet returns documents from official sources. It does not give legal advice, and it does not guarantee that a document is complete, current or in force.

Something missing or wrong here? Write to us · help@jurisnet.ai