One request that looks through everything the public site publishes: the
register of legal acts (title, direction and document number), financing
programmes (title, summary), the FAQ base (question and answer) and news
(title, intro). Backs the header search box and the /search page.
The same matching also powers every list endpoint's filter[search]
(/legal-documents, /programs, /faqs, /posts), so a term behaves the
same wherever it is typed.
How a term is matched
- Case-insensitive substring match (
ILIKE). - The term is tried in every supported locale of the row, not only the
negotiated one — a row that carries only
uztext is still found by auz_cyrlreader. - The term is also tried in the other Uzbek script: «пахта» finds "paxta" and "paxta" finds «пахта».
- Apostrophes (
',‘,’,ʻ,ʼ) are ignored on both sides. - Rows are still subject to the usual visibility rules (active catalogue rows, published and live posts in the current locale).
GET /api/v1/search
Public, throttled 60/min.
| Param | Rules |
|---|---|
q |
required, 2–120 characters |
limit |
optional, 1–20, default 5 — per group |
{
"data": {
"query": "paxta",
"total": 7,
"groups": [
{ "kind": "legal_documents", "count": 2, "items": [ /* LegalDocument */ ] },
{ "kind": "programs", "count": 1, "items": [ /* Program, no terms */ ] },
{ "kind": "faqs", "count": 3, "items": [ /* Faq with category */ ] },
{ "kind": "posts", "count": 1, "items": [ /* Post list item */ ] }
]
}
}
Items use the same shapes as the corresponding list endpoints in
Catalog and News. Groups always come in this
order; a group with no hits has count: 0 and an empty items.
When the term contains digits and a legal document's number equals those
digits exactly, that document is placed first in its group.
count is the number of items returned for the group (capped by limit), not
the total number of matches — link to the section's own list with
filter[search] for the full result.