Search
Search API Updated (October 2025)
The search API has been updated. The legacy API continues to work, but we recommend migrating to the new API.
View Migration Details
What Changed?
Endpoints:
→ Still works but deprecatedGET /collections/{id}/searchPOST /collections/{id}/search→ Accepts both old and new schemas
Request Schema:
Full Comparison
Migration Steps
Step 1: Update Request Schema
Step 2: Update Response Handling
Step 3: Remove Deprecated Fields
The new response no longer includes:
statusfieldresponse_typefield
REST API Migration
GET Endpoint (Deprecated)
POST Endpoint Schema
Detecting Deprecation
When using the legacy API, you’ll receive HTTP headers indicating deprecation:
Airweave lets you search across all your connected data sources through one unified interface. When you query a collection, Airweave runs a multi-step search pipeline that combines AI understanding with keyword precision. You can start with the defaults or configure each step for full control.
Want to try out our search right now? Head to our interactive API documentation where you can test search queries directly in your browser!
Quick Reference
Here are the default settings Airweave uses. You can override any of these in your queries.
Which endpoint to use
GET /collections/{readable_id}/search
⚠️ Deprecated: This endpoint is maintained for backwards compatibility only. Use POST for new integrations.
POST /collections/{readable_id}/search
Recommended: Full control. Use this for all new integrations.
How Airweave search works
Each search runs through a multi step pipeline. Understanding the stages helps explain why different parameters exist and when to use them:
- Query expansion: Generate variations of the user query to capture synonyms and related terms.
- Retrieval: Use keyword, neural, or hybrid methods to fetch candidate documents.
- Filtering: Apply structured metadata filters before or during retrieval.
- Recency bias: Optionally weight results toward fresher content.
- Reranking: Use AI to reorder the top results for higher precision.
- Answer generation: Return raw documents or synthesize a natural language response.
Defaults are designed to work out of the box, and you can override any stage as needed.
Parameters
Query Expansion
Expands your query to catch related terms and synonyms that may not appear verbatim in your documents. This improves recall when wording differs but meaning is the same.
Parameter: expand_query (boolean)
true(default): Generate query variations for better recallfalse: Search only for your exact query
Search Method
The search method determines how Airweave searches your data. Different methods balance semantic understanding and keyword precision. You can use AI to understand meaning, traditional keyword matching, or both.
Parameter: retrieval_strategy
hybrid(default): Best of both worlds - finds results by meaning AND exact keywordsneural: AI-powered search that understands what you mean, not just what you typekeyword: Traditional search that looks for exact word matches
Filtering Results
Applies structured filters before search, ensuring only relevant subsets are scanned. Useful for large datasets or when results must match specific attributes like source, date, or status.
Parameter: filter
Example 1: Filter by source
Example 2: Multiple filters
Example 3: Exclude results
Query Interpretation
This feature is currently in beta. It can occasionally filter too narrowly, so verify result counts.
Query interpretation allows Airweave to automatically extract structured filters from a natural language query. Instead of manually defining metadata filters, you can simply describe what you are looking for, and Airweave will translate that description into filter conditions.
This feature is useful when you want to let end users search in plain English, for example “open GitHub issues from last week” or “critical bugs reported this month”. Airweave analyzes the query, identifies entities like dates, sources, or statuses, and applies them as filters.
Parameter: interpret_filters (boolean)
false(default): You control all filters manuallytrue: AI extracts filters from your natural language query
Temporal Relevance
Temporal relevance adjusts the results ranking to prefer newer documents. This is valuable for time-sensitive data like messages, customer feedback, tickets, or news.
The scoring formula adjusts results based on age:
Sfinal = Ssimilarity × (1 − β + β × d(t))
where,
- Sfinal = final relevance score
- Ssimilarity = semantic similarity score
- β = recency bias parameter (0 to 1)
- d(t) = time decay factor (0 = oldest, 1 = newest).
Parameter: temporal_relevance (0.0 to 1.0)
0.3(default): Slightly prefer newer content0.0: Don’t care about dates, just find the best matches1.0: Heavily prioritize the newest content
Use this when freshness matters. For example, prioritizing the latest bug reports or recent customer complaints over historical ones.
Pagination
Control how many results you get and navigate through large result sets.
Parameters:
limit: How many results to return (1-1000, default: 20)offset: How many results to skip (for pagination, default: 0)
AI Reranking
AI reranking takes the top set of results from the initial search and reorders them using a large language model. This improves accuracy in cases where keyword or semantic similarity alone might be misleading.
Parameter: rerank (boolean)
true(default): AI reviews and reorders results for best relevancefalse: Skip reranking for faster results
Reranking adds about 10 seconds to your search. Turn it off if you need fast results.
Generate AI Answers
Airweave can return either raw results or a synthesized answer. When enabled, a large language model generates a natural language response based on the top results, including sources when available.
Parameter: generate_answer (boolean)
true(default): Generate an AI-synthesized answer from the top search resultsfalse: Return only raw results
Complete example
Here’s everything together in one search using the new API:
Legacy API Example
If you’re still using the legacy API, here’s how the same query looks (deprecated):
Try these examples live in our interactive API documentation. You can execute real searches and see responses instantly!