Documentation Index
Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Recitals are the numbered “whereas” clauses that precede the operative articles of an EU regulation. They provide legislative context and interpretation guidance but are not themselves legally binding obligations. Each recital belongs to one framework.
Methods
list()
Returns a page of recital summaries for a framework.
const page = await client.recitals.list('gdpr', { page: 1, perPage: 20 });
console.log(`GDPR has ${page.meta.total} recitals`);
for (const recital of page.data) {
const preview = recital.content.slice(0, 80);
console.log(`Recital ${recital.recitalNumber}: ${preview}...`);
}
Parameters
| Parameter | Type | Default | Description |
|---|
frameworkSlug | string | required | Framework slug, e.g. "gdpr" |
page | number | 1 | Page number |
perPage | number | 20 | Items per page (1–100) |
Returns Promise<Page<Recital>>
get()
Fetch a single recital by its number.
const recital = await client.recitals.get('gdpr', 1);
console.log(`Recital ${recital.recitalNumber}`);
console.log(recital.content);
Parameters
| Parameter | Type | Description |
|---|
frameworkSlug | string | Framework slug |
recitalNumber | number | Recital number |
Returns Promise<Recital>
iter()
Iterate over all recitals in a framework.
for await (const recital of client.recitals.iter('nis2')) {
console.log(`Recital ${recital.recitalNumber} (position ${recital.position})`);
}
Parameters — same options as list() (except page, which is managed internally).
Returns AsyncGenerator<Recital>
Model
Recital
| Field | Type | Description |
|---|
id | number | Internal numeric ID |
frameworkSlug | string | Parent framework slug |
recitalNumber | number | Recital number |
content | string | Full recital text |
position | number | Display order within the framework |
const keyword = 'legitimate interest';
const matches: number[] = [];
for await (const recital of client.recitals.iter('gdpr')) {
if (recital.content.toLowerCase().includes(keyword)) {
matches.push(recital.recitalNumber);
}
}
console.log(`Recitals mentioning "${keyword}":`, matches.join(', '));
For more structured full-text search across recitals and articles, use client.search.query() with resultType: 'recital'.