Skip to main content

Overview

The search resource provides full-text search across all framework content — articles, recitals, and requirements. Results include a matchContext snippet showing the matched text in context.

Methods

query()

Execute a full-text search and return a page of results.
Parameters
ParameterTypeDefaultDescription
querystringrequiredSearch terms
frameworkstringFilter results to a specific framework slug
resultTypestringFilter by content type: "article", "recital", or "requirement"
pagenumber1Page number
perPagenumber20Items per page (1–100)
Returns Promise<Page<SearchResult>>
meta.pages is always 0 for search results. This is an endpoint limitation — use meta.total and links.next to determine if more results exist.

iter()

Iterate over all search results without managing pagination.
Parameters — same options as query() (except page, which is managed internally). Returns AsyncGenerator<SearchResult>

Model

SearchResult

FieldTypeDescription
typestringResult type: "article", "recital", or "requirement"
frameworkSlugstringParent framework slug
frameworkNamestringParent framework display name
articleNumbernumber | nullArticle number (for article and requirement results)
recitalNumbernumber | nullRecital number (for recital results)
paragraphRefstring | nullSource paragraph reference
titlestring | nullArticle title (for article results)
requirementTypestring | nullRequirement type (for requirement results)
matchContextstringSnippet of text surrounding the match
urlstringDeep link to the matched item in the API

Examples

Search for a concept across all frameworks

Collect all requirement results mentioning a term

Combine resultType: 'article' with iter() for a simple way to find every article across all frameworks that mentions a specific term — no need to iterate frameworks first.