Skip to main content

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

The search resource lets you query articles, recitals, and annexes across all 19 EU frameworks simultaneously. Optionally filter by framework or result type.

Methods

query()

Future<Page<SearchResult>> query(
  String q, {
  String? framework,
  String? resultType,
  int? page,
  int? perPage,
})
Parameters
ParameterTypeDescription
qStringSearch query
frameworkString?Filter by framework slug (e.g. gdpr)
resultTypeString?Filter by type: article, recital, annex
pageint?Page number
perPageint?Items per page

iter()

Stream<SearchResult> iter(String q, {String? framework, String? resultType, int perPage = 20})

Model

SearchResult

FieldTypeDescription
idintInternal ID
frameworkSlugStringSource framework
typeStringarticle, recital, or annex
numberStringItem number
titleString?Item title
matchContextString?Surrounding matched text snippet

Examples

final results = await client.search.query('incident notification 72 hours');
print('Found ${results.meta.total} results');

for (final r in results.data) {
  print('[${r.frameworkSlug.toUpperCase()}] ${r.type} ${r.number}: ${r.title}');
}

Search within a specific framework

final results = await client.search.query(
  'data breach',
  framework: 'gdpr',
);

Filter by type

final results = await client.search.query(
  'supply chain security',
  resultType: 'article',
);

Auto-paginate search results

await for (final r in client.search.iter('personal data')) {
  print('[${r.frameworkSlug}] ${r.number}${r.title}');
}