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
REST · JSON · Cellar SPARQL

§ SPARQL alternative — For developers

EU law without writing SPARQL: one REST call, JSON back.

The Publications Office’s Cellar repository has a SPARQL endpoint. For the common questions, such as an act’s dates and identifiers or what amends it, LexAPI answers with one REST call and JSON. It does not replace the endpoint, and this page says where.

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

§ 01 — Metadata

An act’s dates and identifiers, two ways.

You need: curl in bash or zsh, and an API key

The question: when was the AI Act adopted, when was it published, and what is its ELI? In SPARQL, sent to https://publications.europa.eu/webapi/rdf/sparql:

SPARQL — the Cellar endpoint
PREFIX cdm: <http://publications.europa.eu/ontology/cdm#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?dateOfDocument ?ojPublished ?eli WHERE {
  ?work cdm:resource_legal_id_celex "32024R1689"^^xsd:string ;
        cdm:work_date_document ?dateOfDocument ;
        cdm:official-journal-act_date_publication ?ojPublished ;
        cdm:resource_legal_eli ?eli .
}
# → 2024-06-13, 2024-07-12, http://data.europa.eu/eli/reg/2024/1689/oj

With LexAPI, by CELEX number. Run this with your key in place of lex_your_key.

curl — LexAPI
curl -X POST "https://lex-api.com/api/v1/documents/metadata" \
  -H "x-api-key: lex_your_key" \
  -H "Content-Type: application/json" \
  -d '{"celexNumber":"32024R1689"}'
You get (abridged)
{
  "success": true,
  "metadata": {
    "celex": "32024R1689",
    "title": "Regulation (EU) 2024/1689 … laying down harmonised rules on artificial intelligence … (Artificial Intelligence Act) …",
    "documentType": "Regulation",
    "author": "Council of the European Union, European Parliament",
    "dateOfDocumentISO": "2024-06-13",
    "dateOfEffectISO": "2024-08-01",
    "dateOfPublicationISO": "2024-07-12",
    "eli": "http://data.europa.eu/eli/reg/2024/1689/oj",
    "urls": {
      "html": "https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32024R1689",
      …
    },
    "inForce": true,
    …
  },
  "credits": { "operation_weight": 1, … }
}
  • The three values of the query are dateOfDocumentISO, dateOfPublicationISO and eli.
  • A field LexAPI could not fill is null or left out.
  • Costs 1 credit when LexAPI already holds the document, 4 or 5 when it is fetched from the source first.

Metadata reference

§ 02 — Relations

What amends an act, without a graph pattern.


In Cellar, an amendment is a relation between two works that you match in a query. Here it is a filter on one call.

curl — LexAPI
curl "https://lex-api.com/api/v1/citations/cited-by/32024R1689?citationType=amendment&limit=20" \
  -H "x-api-key: lex_your_key"
You get (abridged)
{
  "success": true,
  "targetDocument": "32024R1689",
  "totalEdges": 1,
  "citedBy": [
    {
      "id": "32026R1744",
      "celexNumber": "32026R1744",
      "title": "Regulation (EU) 2026/1744 of the European Parliament and of the Council of 8 July 2026 amending Regulations (EU) 2024/1689, (EU) 2018/1139 and (EU) 2023/1230 … (Digital Omnibus on AI) …",
      "citations": [
        { "citationType": "amendment", "provenance": "cellar", "resolution": null, … }
      ],
      …
    }
  ],
  "relationSync": { "source": "cellar", "status": "fresh", "syncedAt": "2026-11-18T10:09:30.014Z" },
  "credits": { "operation_weight": 1, … }
}

Amendments, corrigenda and repeals of legislation are read from Cellar; relationSync says when. A short or empty list is not proof that nothing amends the act. Costs 1 credit.

The citation graph, edge by edge

§ 03 — Differences

What SPARQL does that LexAPI does not.


  • Arbitrary queries. The endpoint answers any query you can write over the whole Cellar graph. LexAPI answers the questions its endpoints were built for, and no others.
  • Data LexAPI does not hold. Cellar records more about each document, and more documents, than LexAPI mirrors. If a field is not in a LexAPI response, the endpoint is where to look.
  • The source itself. LexAPI reads Cellar for part of its data: an answer here is as current as LexAPI’s last read, and the Publications Office’s record is the reference.
  • No account. The endpoint is open and run by the Publications Office of the European Union. LexAPI is a commercial service and is not affiliated with it.

Using Cellar SPARQL directly

§ 04 — Side by side

Which one for what.


TopicCellar SPARQLLexAPI
QuestionsAny query you can write over the whole Cellar graph.A fixed set of endpoints: read, resolve, search, citations, versions.
DataEverything the Publications Office records, including what LexAPI does not hold.The documents and relations LexAPI holds or fetches on request.
Document textNot searchable; titles are.Parsed to articles, recitals and annexes, and searchable by meaning.
AnswerSPARQL results (bindings or RDF).JSON with one shape per endpoint, described in an OpenAPI spec.
AccessAnonymous; run by the Publications Office.An API key; a commercial service, not affiliated with the Publications Office.
§ 05 — FAQ

Asked & answered.

N° 01Does EUR-Lex have a SPARQL endpoint?+
The Publications Office of the European Union runs one for Cellar, the repository that feeds EUR-Lex: https://publications.europa.eu/webapi/rdf/sparql. It answers queries over document metadata and relations. Titles are searchable there; document text is not.
N° 02Is LexAPI a replacement for the Cellar SPARQL endpoint?+
No. The endpoint answers any query you can write over the whole Cellar graph, including data LexAPI does not hold. LexAPI answers a fixed set of questions over REST and returns JSON, and it reads Cellar itself for part of its data.
N° 03How do I get the metadata of an EU act without SPARQL?+
Send its CELEX number to POST /api/v1/documents/metadata. The answer holds the title, type, author, dates, ELI and EUR-Lex links as JSON.
N° 04Is LexAPI affiliated with the Publications Office?+
No. EUR-Lex and Cellar are run by the Publications Office of the European Union; LexAPI is not affiliated with it.
§ 06 — Next

Keep building.


  • CELEX, ELI & ECLI resolverTurn an ECLI, an ELI or a pasted EUR-Lex link into a CELEX number, and see whether the match was confirmed.
  • EU law citation graph APIList what an act or judgment cites and what cites, amends, corrects or repeals it, as typed edges.
  • EUR-Lex Python clientlexapi-client on PyPI: read articles, follow citations and handle errors, with typed objects.
  • 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.