GnistAI GnistAI
Log in

EUR-Lex (EU Legislation)

EU legislation database — search regulations, directives, and decisions via CELLAR SPARQL. Covers the entire Official Journal corpus from founding treaties to present.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Legal

Data source: EUR-Lex CELLAR (publications.europa.eu)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/eurlex/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (5)

search_legislation

Search EU legislation by keyword.

Searches titles of EU legal acts (regulations, directives, decisions)
published in the Official Journal. Covers the entire EUR-Lex corpus
from the founding treaties to present-day legislation.

Args:
query: Search term to match against legislation titles.
doc_type: Optional filter for document type.
year: Optional filter for publication year.
limit: Number of results to return (1-50, default 20).

Returns:
List of matching legal acts with CELEX number, title, date, and link.

ParameterTypeRequiredDescription
querystringrequiredSearch term for EU legislation titles (e.g. "artificial intelligence", "data protection", "climate", "digital markets").
doc_typeanyoptionalFilter by document type: "regulation", "directive", or "decision". Omit for all types.
yearanyoptionalFilter by year of publication (e.g. 2024).
limitintegeroptionalNumber of results to return (1-50, default 20). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_legislation",
    "arguments": {
      "query": "example"
    }
  }
}
get_document

Get an EU legal document by its CELEX number.

Returns metadata for a specific EU legal act including title, date,
document types, and a direct link to the full text on EUR-Lex.

CELEX numbers follow the pattern: sector + year + type + number.
Common sectors: 3 = secondary legislation, 1 = treaties, 6 = case law.

Args:
celex: CELEX document identifier.

Returns:
Document metadata including title, date, types, and EUR-Lex URL.

ParameterTypeRequiredDescription
celexstringrequiredCELEX document number (e.g. "32024R1689" for the AI Act, "32016R0679" for GDPR).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_document",
    "arguments": {
      "celex": "123456789"
    }
  }
}
get_recent

Get recently published EU legislation.

Returns the latest EU legal acts published within the specified
time window. Useful for monitoring new regulations, directives,
and decisions from the European Union.

Args:
doc_type: Optional filter for document type.
days: Look back period in days (1-365, default 30).
limit: Number of results to return (1-50, default 20).

Returns:
List of recent legal acts with CELEX number, title, date, and link.

ParameterTypeRequiredDescription
doc_typeanyoptionalFilter by type: "regulation", "directive", or "decision". Omit for all types.
daysintegeroptionalLook back period in days (1-365, default 30). (default: 30)
limitintegeroptionalNumber of results to return (1-50, default 20). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_recent",
    "arguments": {}
  }
}
search_by_subject

Search EU legislation by EuroVoc subject matter.

EuroVoc is the EU's multilingual thesaurus used to classify all
legal acts. This searches by subject descriptor rather than
title keywords, which can find legislation that doesn't mention
a topic explicitly in its title.

Args:
subject: EuroVoc subject descriptor to search for.
limit: Number of results to return (1-50, default 20).

Returns:
List of matching legal acts with subject labels.

ParameterTypeRequiredDescription
subjectstringrequiredEuroVoc subject descriptor (e.g. "environmental policy", "consumer protection", "competition", "transport").
limitintegeroptionalNumber of results to return (1-50, default 20). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_by_subject",
    "arguments": {
      "subject": "example"
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/eurlex/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_legislation", "arguments": {"query": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/eurlex/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_legislation",
    "arguments": {
      "query": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Legal)

Resources