Get CELLAR Relationship Graph
eurlex_get_relationsTraverse the one-hop CDM relationship graph of an EU act: what it amends or is amended by, what it repeals or is repealed by (explicit and implicit), its consolidated versions, its legal basis, and works that cite it. Returns direct relations only, paginated per relation type and direction. Requires a CELEX number or CELLAR work URI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum related works per relation type and direction (1–100, default 100). Incoming edges are ordered newest-first, so the cap keeps the newest — page with offset for older ones. When truncated is true, at least one direction filled its cap. | |
| offset | No | Pagination offset applied per relation type and direction — related works to skip (default 0). Page forward by adding limit; incoming edges are newest-first, so higher offsets reach older works. | |
| work_uri | No | CELLAR work resource URI to traverse (e.g. http://publications.europa.eu/resource/cellar/3e485e15-11bd-11e6-ba9a-01aa75ed71a1). Used directly without CELEX resolution. Provide exactly one of celex_number or work_uri. | |
| celex_number | No | CELEX number of the work to traverse (e.g. 32016R0679). Provide exactly one of celex_number or work_uri. | |
| relation_types | No | Subset of relation types to return; omit for all. Types: cites, amends, amended_by, repeals, repealed_by, implicitly_repeals, implicitly_repealed_by, legal_basis (treaty/article this act rests on), consolidated_version (consolidated texts of this act). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The per-direction cap applied to this page. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of relations returned in this page. | |
| total | No | Number of relations returned in this page (not a corpus-wide count). A direction that filled its cap sets truncated — page with offset for the rest. | |
| offset | No | Pagination offset applied to this response (per relation type and direction). | |
| work_uri | No | CELLAR URI of the source work (the work_uri input, or resolved from the CELEX). | |
| relations | No | Direct CDM relations for the requested work. | |
| truncated | No | True when at least one relation type/direction filled its per-direction cap and more related works may exist — page with offset. | |
| celex_number | No | CELEX number of the source work whose relations were traversed. Absent when addressed directly by work_uri. | |
| empty_relation_types | No | Requested relation types that returned zero relations in THIS page. Page-scoped: a type can appear here because all its edges sit beyond the current offset/limit window, not only because the act genuinely has none of that relation — so absent-from-here does not prove absent-in-CELLAR. When every requested type is empty the tool throws no_relations instead. | |
| requested_relation_types | No | The relation types this request traversed — the explicit relation_types list, or all types when it was omitted. Diff against the types present in relations[], or read empty_relation_types, to confirm which requested types returned edges. |