GET /api/search
Changed onSearch for items in Metabase. For the list of supported models, check [[metabase.search.config/all-models]].
context identifies the surface issuing the search; it selects the ranking weights and filter defaults. It defaults to api, the value for programmatic callers.
Filters:
- archived: set to true to search archived items only, default is false
- table_db_id: search for tables, cards, and models of a certain DB
- models: only search for items of specific models. If not provided, search for all models
- filter_items_in_personal_collection: only search for items in personal collections
- created_at: search for items created at a specific timestamp
- created_by: search for items created by a specific user
- last_edited_at: search for items last edited at a specific timestamp
- last_edited_by: search for items last edited by a specific user
- search_native_query: set to true to search the content of native queries
- vector_search_strategy: for the semantic engine: hnsw (approximate index search, default), brute-force (exact filter-first search), or hnsw-iterative-relaxed / hnsw-iterative-strict (index-backed iterative scans with inline filters); ignored by other engines
- vector_search_ef_search: override pgvector's hnsw.ef_search (1-1000) for the iterative strategies; (admin only)
- vector_search_max_scan_tuples: override pgvector's hnsw.max_scan_tuples for the iterative strategies; (admin only)
- vector_search_explain: set to true to record vector-scan instrumentation for this search (expensive); (admin only)
- verified: set to true to search for verified items only (requires Content Management or Official Collections premium feature)
- ids: search for items with those ids, works iff single value passed to models
- display_type: search for cards/models with specific display types
Note that not all item types support all filters, and the results will include only models that support the provided filters. For example:
- The created-by filter supports dashboards, models, actions, and cards.
- The verified filter supports models and cards.
A search query that has both filters applied will only return models and cards.
Request
- Base URL(relative, and the document was published on a file host, not at the API’s origin)
- AuthAPI key in header X-API-Key
Query parameters
value must be an integer greater than zero.
value must be a non-blank string.
value must be a non-blank string.
value must be an integer greater than zero.
Response
Successful response
Changes
- breaking
the
queryrequest parametercontextwas restricted to a list of enum values - breaking
for the
queryrequest parametercontext, default valueapiwas added - breaking
queryrequest parametercontextlist-of-types was narrowed by removing typesnull - warning
deleted the
queryrequest parameterhas_temporal_dim - warning
deleted the
queryrequest parameternon_temporal_dim_ids - info
added the new optional
queryrequest parametervector_search_ef_search - info
added the new optional
queryrequest parametervector_search_explain - info
added the new optional
queryrequest parametervector_search_max_scan_tuples - info
added the new optional
queryrequest parametervector_search_strategy - info
the
queryrequest parameterarchivedbecame optional - info
the
queryrequest parameterinclude_dashboard_questionsbecame optional - info
the
queryrequest parameterinclude_metadatabecame optional - info
the
queryrequest parametermodel_ancestorsbecame optional - info
added the new enum value
apito thequeryrequest parametercontext - info
added the new enum value
basic-actionsto thequeryrequest parametercontext - info
added the new enum value
browseto thequeryrequest parametercontext - info
added the new enum value
command-paletteto thequeryrequest parametercontext - info
added the new enum value
data-pickerto thequeryrequest parametercontext - info
added the new enum value
dependenciesto thequeryrequest parametercontext - info
added the new enum value
documentto thequeryrequest parametercontext - info
added the new enum value
embedding-setupto thequeryrequest parametercontext - info
added the new enum value
entity-pickerto thequeryrequest parametercontext - info
added the new enum value
libraryto thequeryrequest parametercontext - info
added the new enum value
metabotto thequeryrequest parametercontext - info
added the new enum value
model-migrationto thequeryrequest parametercontext - info
added the new enum value
search-appto thequeryrequest parametercontext - info
added the new enum value
search-barto thequeryrequest parametercontext - info
added the new enum value
type-filterto thequeryrequest parametercontext - info
for the
queryrequest parametercontext, the type was generalized from no type tostring
- breaking
- breaking
api path removed without deprecation
- info
endpoint added
- breaking