# EUR-Lex Cellar SPARQL query

Run a read-only SPARQL SELECT on the EU Publications Office Cellar (EUR-Lex legislation, case law, Official Journal, CDM ontology) and get JSON bindings, e.g.. Needs sparql.

Run a read-only SPARQL SELECT on the EU Publications Office Cellar (EUR-Lex legislation, case law, Official Journal, CDM ontology) and get JSON bindings, e.g. 'PREFIX cdm: <http://publications.europa.eu/ontology/cdm#> SELECT ?celex WHERE { ?w cdm:work_date_document "2025-06-30"^^<http://www.w3.org/2001/XMLSchema#date> ; cdm:resource_legal_id_celex ?celex }'. LIMIT is appended for you, so never write your own, and prefer exact matches over FILTER for speed.

- Tool ID: `eur-lex/sparql-query`
- Provider: [EUR-Lex](/providers/eur-lex.md)
- Capability: [Knowledge & research](/tools/knowledge.md)
- Price: no charge per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No charge per call. A workspace is still needed so your agent can call it.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "sparql": {
      "type": "string",
      "minLength": 10,
      "maxLength": 4000,
      "description": "SPARQL SELECT query without LIMIT, e.g. 'PREFIX cdm: <http://publications.europa.eu/ontology/cdm#> SELECT ?w WHERE { ?w cdm:resource_legal_id_celex \"32016R0679\"^^<http://www.w3.org/2001/XMLSchema#string> }'"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 50,
      "description": "Maximum rows (appended as LIMIT), e.g. 50"
    }
  },
  "required": [
    "sparql"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "eur-lex/sparql-query",
  "input": {
    "sparql": "PREFIX cdm: <http://publications.europa.eu/ontology/cdm#>\nSELECT ?work ?date WHERE { ?work cdm:resource_legal_id_celex \"32016R0679\"^^<http://www.w3.org/2001/XMLSchema#string> ; cdm:work_date_document ?date }",
    "limit": 5
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

Licence: Commission Decision 2011/833/EU reuse (EUR-Lex documents); EUR-Lex metadata CC0 1.0.

Attribution: Source: EUR-Lex / Publications Office of the European Union (Cellar), © European Union.

[Provider documentation](https://op.europa.eu/en/web/cellar/cellar-data/metadata/knowledge-graph)

[REST inspection](https://api.agentik.cc/v1/tools/eur-lex/sparql-query) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/eur-lex/sparql-query) · [Agent index](/llms.txt)
