Overview
The search endpoint lets you query across all frameworks simultaneously. Results include articles, recitals, and requirements that match your query. Use $client->search->query() to search.
Methods
query()
Search across all frameworks (or a specific one).
Parameters
| Parameter | Type | Default | Description |
|---|
$q | string | required | Search query |
$framework | string|null | null | Limit to one framework slug |
$resultType | string|null | null | Filter by type: 'article', 'recital', 'requirement' |
$page | int|null | null | Page number |
$perPage | int|null | null | Items per page |
Returns Page<SearchResult>
Model
SearchResult
| Field | Type | Description |
|---|
type | string | 'article', 'recital', or 'requirement' |
frameworkSlug | string | Framework the result belongs to |
frameworkName | string | Human-readable framework name |
articleNumber | int|null | For article results |
recitalNumber | int|null | For recital results |
paragraphRef | string|null | Specific paragraph reference |
title | string|null | Result heading, if any |
requirementType | string|null | For requirement results |
matchContext | string | Snippet showing the match in context |
url | string | Direct API URL to the full resource |
Examples
Search across specific frameworks
Filter by result type
Cross-framework search
Use the $framework parameter to narrow results when you know which regulation you’re working with. Cross-framework search (without a filter) is great for discovering related obligations across different laws.