EU law · 24 official languagesArticle-level JSON · typed citation graphMCP server · Claude, Cursor, VS CodeSDKs · Python, TypeScriptFree plan · 500 credits to start
Brussels · CET
Vol. II·Section S — Solutions Desk
Court of Justice · General Court

§ European case law API — For developers

CJEU case law your code can search, read and cite.

Search the case law of the Court of Justice of the European Union by meaning, turn an ECLI into a CELEX number, read the judgment as JSON and follow its citations.

The free plan starts with 500 credits, no card. Your API key is on the dashboard once you confirm your email.

Create a free accountQuickstart


Semantic search matches by meaning: send a question or a description. Keywords work too. Run this with your key in place of lex_your_key.

curl
curl -X POST "https://lex-api.com/api/v1/search/semantic" \
  -H "x-api-key: lex_your_key" \
  -H "Content-Type: application/json" \
  -d '{"query":"transfers of personal data to third countries and standard contractual clauses","limit":3}'
You get (abridged)
{
  "success": true,
  "searchType": "semantic-case-law",
  "resultCount": 2,
  "results": [
    {
      "score": 0.7763084,
      "case_name": "Judgment of the Court (Grand Chamber) of 16 July 2020. Data Protection Commissioner v Facebook Ireland Limited and Maximillian Schrems. …",
      "court": "Court of Justice",
      "decision_date": "2020-07-16",
      "case_number": "C-311/18",
      "ecli": "ECLI:EU:C:2020:559",
      "summary": "The Court of Justice of the European Union invalidated the EU-US Privacy Shield adequacy decision. …",
      "metadata": { "celex_id": "62018CJ0311", "document_type": "judgment" },
      …
    },
    …
  ],
  "credits": { "operation_weight": 5, … }
}
  • metadata.celex_id is the CELEX number to read the decision with.
  • summary is written by a model. Use it as a preview and quote the judgment itself.
  • Fields LexAPI could not fill are left out, not sent as null.
  • filters narrows the search by date_from and date_to, court, case_number or ecli.
  • Without min_score a default relevance floor applies, so a search can return fewer results than limit.

Costs 5 credits, on every credit plan including the free one, which returns up to 10 results per search. With hyde: true a model first drafts the passage a relevant judgment would contain and both are searched: 15 credits.

The same search with the SDKs

Install with pip install lexapi-client or npm install @lexapi/client.

Python
from lexapi import LexAPI

client = LexAPI(api_key="lex_your_key")

resp = client.semantic_search("transfers of personal data to third countries and standard contractual clauses", limit=3)

for hit in resp.results:
    print(hit.decision_date, hit.case_number, hit.ecli, hit.celex)
TypeScript
import { LexAPI } from "@lexapi/client";

const client = new LexAPI({ apiKey: "lex_your_key" });

const resp = await client.semanticSearch({
  query: "transfers of personal data to third countries and standard contractual clauses",
  limit: 3,
});

for (const hit of resp.results) {
  console.log(hit.decision_date, hit.case_number, hit.ecli, hit.metadata?.celex_id);
}
Both print
2020-07-16 C-311/18 ECLI:EU:C:2020:559 62018CJ0311
2025-01-08 T-354/22 ECLI:EU:T:2025:4 62022TJ0354

Semantic search reference

§ 02 — Identify

From an ECLI to a CELEX number.


Documents are read by CELEX number. /resolve turns an ECLI, an ELI or a pasted EUR-Lex link into one.

curl
curl -X POST "https://lex-api.com/api/v1/resolve" \
  -H "x-api-key: lex_your_key" \
  -H "Content-Type: application/json" \
  -d '{"identifier":"ECLI:EU:C:2020:559"}'
You get (abridged)
{
  "success": true,
  "identifier": "ECLI:EU:C:2020:559",
  "identifierType": "ecli",
  "resolvedVia": "ecli-corpus",
  "verified": true,
  "celex": "62018CJ0311",
  "urls": {
    "html": "https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:62018CJ0311",
    …
  },
  "credits": { "operation_weight": 1, … }
}

An ECLI resolves only for a decision LexAPI already holds. A 404 for a valid ECLI is not proof that the decision does not exist: find it with the search above. Costs 1 credit.

An ELI or a pasted link, and whether the match was confirmed: CELEX, ELI & ECLI resolver.

Resolve reference

§ 03 — Read

The judgment, as JSON.


The same document endpoint that reads legislation reads case law. A judgment has no articles; ask for fullText.

curl
curl -X POST "https://lex-api.com/api/v1/documentContent" \
  -H "x-api-key: lex_your_key" \
  -H "Content-Type: application/json" \
  -d '{"celexNumber":"62018CJ0311","include":["metadata","fullText"]}'
You get (abridged)
{
  "success": true,
  "document": {
    "celex": "62018CJ0311",
    "language": "en",
    "documentType": "Judgment",
    "author": "Court of Justice",
    "dateOfDocumentISO": "2020-07-16",
    "ecli": "ECLI:EU:C:2020:559",
    "caseNumber": "C-311/18",
    "parties": "Data Protection Commissioner v Facebook Ireland Limited and Maximillian Schrems",
    "content": {
      "fullText": "JUDGMENT OF THE COURT (Grand Chamber)\n\n16 July 2020 …"
    },
    …
  },
  "credits": { "operation_weight": 1, … }
}
  • Cite the decision by document.ecli, caseNumber, celex and its EUR-Lex link in document.urls.html.
  • Not every decision has an English text. acceptLanguages lets you take another language instead, labelled in the response.
  • Case law carries no inForce label.

Costs 1 credit when LexAPI already holds the document, 4 or 5 when it is fetched from the source first. credits.operation_weight is what you were charged.

§ 04 — Citations

What it cites, what cites it.


Two calls walk the citation graph from a decision: the documents it cites, legislation included, and the documents that cite it. Each returns the edges LexAPI has so far, which can be none.

curl — what the judgment cites
curl "https://lex-api.com/api/v1/citations/cites/62018CJ0311?limit=20" \
  -H "x-api-key: lex_your_key"
curl — what cites the judgment
curl "https://lex-api.com/api/v1/citations/cited-by/62018CJ0311?limit=20" \
  -H "x-api-key: lex_your_key"
  • The answer groups edges by document, in cites[] or citedBy[]: each group has the document’s celexNumber and title, each edge a citationType.
  • Page with limit and offset until you have totalEdges rows.
  • Edges come from the EUR-Lex pages of the documents LexAPI has extracted and from the Publications Office’s Cellar repository. A short or empty list is not proof that nothing cites the judgment.
  • Each list costs 1 credit.

Edge types, their sources and a response to read: EU law citation graph API.

Citation endpoints reference

§ 05 — FAQ

Asked & answered.

N° 01What is an ECLI, and how do I look one up?+
An ECLI (European Case Law Identifier) identifies a court decision: ECLI:EU:C:2020:559 is the judgment of the Court of Justice in Case C-311/18. Send it as identifier to POST /api/v1/resolve and the answer holds the CELEX number the decision is read by, here 62018CJ0311. An ECLI resolves only for a decision LexAPI already holds, so a 404 is not proof that the decision does not exist.
N° 02Which courts does the case law API cover?+
The Court of Justice of the European Union: decisions of the Court of Justice and of the General Court, as published on EUR-Lex. LexAPI does not hold every decision. One it does not hold is fetched from EUR-Lex when you read it by CELEX number, if EUR-Lex has it; semantic search finds only the decisions in its index. The European Court of Human Rights is not an EU court and is not covered.
N° 03Can I list the judgments that cite an EU act?+
Call GET /api/v1/citations/cited-by/{CELEX number of the act}. Each group in the answer is a document that cites the act; its documentKind is decision for an EU case-law document (a judgment, an order or an Advocate General’s opinion) and act for an EU act. The list holds the edges LexAPI has so far, so a short or empty list is not proof that no judgment cites the act.
N° 04Are Advocate General opinions included?+
Yes. An opinion is a document of its own, with its own CELEX number and ECLI: the opinion in Case C-311/18 is CELEX 62018CC0311, ECLI:EU:C:2019:1145. Read it with POST /api/v1/documentContent, like a judgment. Semantic search returns opinions too; metadata.document_type says what kind of document a hit is. LexAPI does not hold every opinion.
§ 06 — Next

Keep building.


  • GDPR APIRead the GDPR by article or recital, cite it, and list what corrects or amends it.
  • European legal RAGSemantic search to article text with provenance, citations and the text for a date.
  • Legal data API for AI agentsThe MCP server, hosted or local, the REST API and the SDKs, all on the same credit pool.
  • QuickstartA first request by curl, MCP, Python and TypeScript.
  • API referenceEvery endpoint, parameter, response field and error.
  • MCP serverSetup for Claude, Cursor and VS Code, and the tool list.
  • PricingPlans, credit pools and what each call costs.

LexAPI returns source texts and their identifiers. It does not assess compliance and gives no legal advice.