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 Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Legal

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

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/eurlex/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-eurlex": {
      "url": "https://context.gnist.ai/mcp/eurlex/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
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"}}}'

API REST API

API Root https://context.gnist.ai/rest/eurlex/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/eurlex/search_legislation?query=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/eurlex/search_legislation",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "query": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc eurlex

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

search_legislation
Search EU legislation by keyword.
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)
get_document
Get an EU legal document by its CELEX number.
ParameterTypeRequiredDescription
celexstringrequiredCELEX document number (e.g. "32024R1689" for the AI Act, "32016R0679" for GDPR).
get_recent
Get recently published EU legislation.
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)
search_by_subject
Search EU legislation by EuroVoc subject matter.
ParameterTypeRequiredDescription
subjectstringrequiredEuroVoc subject descriptor (e.g. "environmental policy", "consumer protection", "competition", "transport").
limitintegeroptionalNumber of results to return (1-50, default 20). (default: 20)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related