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.
Find judgments by meaning.
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 -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}'{
"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_idis the CELEX number to read the decision with.summaryis 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. filtersnarrows the search bydate_fromanddate_to,court,case_numberorecli.- Without
min_scorea default relevance floor applies, so a search can return fewer results thanlimit.
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.
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)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);
}2020-07-16 C-311/18 ECLI:EU:C:2020:559 62018CJ0311
2025-01-08 T-354/22 ECLI:EU:T:2025:4 62022TJ0354From 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 -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"}'{
"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.
The judgment, as JSON.
The same document endpoint that reads legislation reads case law. A judgment has no articles; ask for fullText.
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"]}'{
"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,celexand its EUR-Lex link indocument.urls.html. - Not every decision has an English text.
acceptLanguageslets you take another language instead, labelled in the response. - Case law carries no
inForcelabel.
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.
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 citescurl "https://lex-api.com/api/v1/citations/cites/62018CJ0311?limit=20" \ -H "x-api-key: lex_your_key"
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[]orcitedBy[]: each group has the document’scelexNumberandtitle, each edge acitationType. - Page with
limitandoffsetuntil you havetotalEdgesrows. - 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.
Asked & answered.
N° 01What is an ECLI, and how do I look one up?+
N° 02Which courts does the case law API cover?+
N° 03Can I list the judgments that cite an EU act?+
N° 04Are Advocate General opinions included?+
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.