v1

latestOpenAPI 3.1.02026-08-04253331435.1 KB
Budgets

Search Budgets

Search budget document chunks via Postgres FTS.

At least one of institution_ids or query must be supplied — chunks table is 12M+ rows and we don't allow unbounded scans.

With query: results ranked by ts_rank_cd. Without query (institution-scoped browse): results sorted by document date descending.

query accepts a websearch-style string (same syntax as RFP / Grant / Meeting Minute search): bare words for stemmed match, "phrase" for exact phrase, OR, -word for exclude.

Set group_by_document=true to collapse to the highest-scoring chunk per budget document (or earliest chunk when no query).

Semantic / LLM-synthesized answers are not in scope here — use the existing /v3/rag/query endpoint for that. This endpoint returns raw evidence rows for downstream reasoning.

post/api/internal/budgets/search

Request body

querystring nullable
institution_idsstring[] nullable
statesstring[] nullable
source_tablesstring[] nullable
document_date_afterstring date nullable
document_date_beforestring date nullable
group_by_documentboolean
offsetinteger
limitinteger

Response

Successful Response

totalinteger required
offsetinteger required
limitinteger required