Skip to content

Search

oikapi provides multiple search modes, automatically detecting the query type.

GET /api/search?q=acme

The search engine automatically detects the query type:

PatternSearch typePerformance
ABC-123Counter searchInstant
UUID formatUUID searchInstant
TextFull-text searchRanked results

Text queries return relevance-ranked results across all searchable fields:

GET /api/search?q=website+redesign&preview=true

With preview=true, results include matched record data (name, title, description, and other display fields) suitable for rendering in a search dropdown or preview panel. Text queries require preview=true; omitting it returns a 400 error.

Search by counter prefix and number. Partial matches work – searching INV-42 finds INV-00042:

GET /api/search?q=INV-42

For populating reference field dropdowns and autocomplete inputs:

GET /api/apps/crm/tables/companies/records?find_refs=acme

Returns matching records with their display values, designed for fast autocomplete in UIs.

Search results are filtered by the user’s permissions. Users only see records from tables they have read access to, and any row-level security (RLS) filters on those tables are applied to search results as well — so a user never sees a record through search that they could not see by querying the table directly.

Tables and individual fields can be marked as searchable or non-searchable to control what appears in global search results.