Hybrid Search
Run keyword search and an AI answer in a single call. This powers the Hybrid Search experience — a search box that returns ranked results next to a generated, cited answer.
How it works
- Send the user's query as
q. - Decide whether to generate an answer with
answer(true/false/"AUTO"). - Read ranked documents from
data.products. - If an answer was generated, take
data.question_idand pollGET /v1/ask/questions/{question_id}/answerfor the (streaming) answer — see the Ask APIs.
Use cases
Pick a request example from the dropdown:
- Search + AI answer —
answer: "AUTO"returns results instantly and adds an answer when the query is a question. - Search results only —
answer: falsefor a classic results page. - Scope to a subscription tier — use
fqto restrict candidates. - Faceted search — pass
facetsto get counts for filter UIs. - Newest first —
order_by: "-published_at".
- Type: stringqrequired
The search query the user has entered.
- Type: stringanonymous
_id The anonymous visitor who made this query. Used for personalization when there is no
user_id. - answer
Controls the AI answer pipeline:
true— always generate an answerfalse— search results only, no answer"AUTO"— let Miso decide per query (recommended; generates an answer only when the query looks like a question)
- Type: boolean
Controls the AI answer pipeline:
true— always generate an answerfalse— search results only, no answer"AUTO"— let Miso decide per query (recommended; generates an answer only when the query looks like a question)
- Type: array string[]facets
Fields to compute facet counts for (e.g.
categories,tags,custom_attributes.director). Counts are returned indata.facet_counts— use them to build filter UIs. - Type: array string[]fl
Fields to return for each product in
data.products. Any uploaded field is allowed, includingcustom_attributes.*. - Type: stringfq
A query in Elasticsearch query-string syntax (Lucene) that restricts the candidate products without affecting ranking — use it to scope results (e.g. by section or subscription tier).
Examples:
"section:\"markets\""— only the markets section"tier:(\"premium\" OR \"pro\")"— only premium/pro content"rating:[4 TO *]"— numeric range, rating ≥ 4"custom_attributes.designer:\"Calvin Klein\""— filter on a custom attribute
- Type: objectmetadata
Arbitrary metadata to store with the request (e.g.
{"site": "markets"}). - Type: string enumorder
_by Sort order of results:
relevance(default),published_at(newest first), or-published_at(oldest first). A record with nopublished_atsorts byupdated_atinstead. You can also send a list of order-by objects to sort on your own numeric or boolean fields.values- relevance
- published
_at - -published
_at
- Type: integerrows
Number of search results to return in
data.products. - Type: array string[]source
_fl Fields to return for each answer source. Same field rules as
fl. - Type: integerstart
Offset of the first result — use with
rowsfor pagination. - Type: booleanstemming
When enabled, query words are reduced to their root form (e.g. "running" → "run"), improving recall by matching inflected forms.
- application/json
curl 'https://api.askmiso.com/v1/ask/search?api_key=YOUR_SECRET_TOKEN' \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"q": "interest rate cuts 2026",
"answer": "AUTO",
"rows": 5,
"fl": [
"title",
"url",
"cover_image"
]
}'
{
"message": "success",
"data": {
"miso_id": "b7c9e1a2-3d4e-5f60-7a8b-9c0d1e2f3a4b",
"question_id": "0e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
"took": 142,
"total": 87,
"products": [
{
"product_id": "art-20260612-rates",
"title": "Central bank signals 2026 cuts",
"url": "https://example.com/markets/rates"
}
],
"facet_counts": {
"facet_fields": {
"categories": [
[
"Markets",
41
],
[
"Economy",
18
]
]
}
}
}
}