Overview
The search endpoint performs full-text search across articles, recitals, and requirements. Results include a match_context snippet showing where the query matched. Use filters to narrow by framework or content type.
Methods
query()
Run a full-text search and return a page of results.
Parameters
| Parameter | Type | Default | Description |
|---|
q | str | required | Search query string |
framework | str | None | Limit to a specific framework slug |
result_type | str | None | "article", "recital", or "requirement" |
page | int | 1 | Page number |
per_page | int | 20 | Items per page (1–100) |
Returns Page[SearchResult]
page.meta.pages is always 0 for search results. The search endpoint does not support traditional page-count pagination. Use the presence of page.links.next to detect whether more results exist.
Model
SearchResult
| Field | Type | Description |
|---|
type | str | Result type: "article", "recital", or "requirement" |
framework_slug | str | Framework the result belongs to |
framework_name | str | Human-readable framework name |
article_number | int | None | Article number (for article and requirement results) |
recital_number | int | None | Recital number (for recital results) |
paragraph_ref | str | None | Paragraph label (for requirement results) |
title | str | None | Article or section heading |
requirement_type | str | None | Requirement classification (requirement results only) |
match_context | str | Snippet of matched text with surrounding context |
url | str | Direct API URL to the matched resource |
Examples
Basic search
Search within a specific framework
Filter by result type
Search across multiple frameworks manually
Paginate through search results
Display results grouped by framework
Combine framework and result_type filters to narrow results significantly. For example, result_type="requirement" limits results to machine-readable obligations, which is useful when building compliance checkers.
Search queries are matched against parsed text content. Very short queries (one or two characters) may produce unexpected results. Use at least three characters for meaningful searches.