Key Benefits
- Token efficient: Use
highlightsto get key excerpts relevant to your query, reducing token usage by 10x compared to full text, without adding latency. - Specialized index coverage: State of the art search performance on people, company, and code using Exa’s in-house search indexes.
- Incredible speed: From
auto(default) tofastfor sub-second latency toinstantfor sub-200ms latency, Exa provides the fastest search available without compromising on quality, enabling real-time workflows like autocomplete and live suggestions.
Request Fields
Thequery parameter is required for all search requests. The remaining fields are optional. See the API Reference for complete parameter details.
Search Types
Thetype parameter selects the search method:
-
auto(default): Exa’s default search. Start here unless you have a specific latency target or need a deeper synthesized mode. -
fast: Low latency search using optimized versions of the search models. A good middle ground when you need speed without sacrificing too much quality. -
instant: Lowest latency search optimized for real-time applications like autocomplete or live suggestions. -
deep-lite: Lightweight synthesized search output with lower latency than the deeper research modes. -
deep: Deep web research with structured outputs. Best for complicated queries that require multi steps of search, reasoning, and structured json outputs. -
deep-reasoning: More deliberate deep-search mode when you want more reasoning thandeep.
Some older docs and payloads still use legacy search-type names. For new integrations, prefer the search types above.
Token Efficiency
Choosing the right content mode can significantly reduce token usage while maintaining answer quality.
Use highlights for agentic workflows: When building multi-step agents that make repeated search calls, highlights provide the most relevant excerpts without flooding context windows.
maxCharacters to cap token usage.
Content Freshness
Control whether results come from Exa’s index or are freshly crawled usingmaxAgeHours:
maxAgeHours: 24: Use cache if less than 24 hours old, otherwise livecrawl. Good for daily-fresh content.maxAgeHours: 0: Always livecrawl (ignore cache). Use when cached data is unacceptable.maxAgeHours: -1: Never livecrawl (cache only). Maximum speed, historical/static content.- Omit (recommended): Default behavior — livecrawl as fallback if no cache exists.
Output Schema
For any search type, you can passoutputSchema (or output_schema in Python SDK) to control output.content format.
type: "text": return plain text output (optionally guided with adescription)type: "object": return structured JSON output
Do not include citation or confidence fields in
outputSchema/output_schema. /search already
returns grounding and citations automatically in output.grounding.- Redundant: duplicates data that is already returned, increasing tokens and latency.
- Less reliable: model-generated citation fields inside
output.contentare generally less reliable than built-in grounding.
- Maximum nesting depth:
2 - Maximum total properties:
10
System Prompt
For any search type, you can also passsystemPrompt (or system_prompt in Python SDK) to guide how the endpoint synthesizes the final returned result. On deep-search variants, it also guides search planning.
Use this for instructions like:
- prefer official or primary sources
- emphasize novelty or avoid duplicate findings
- keep the answer concise or highly structured
outputSchema/output_schema for shape, and systemPrompt/system_prompt for behavior.
Streaming
Setstream: true to receive text/event-stream responses from /search. Each SSE frame contains an OpenAI-compatible chat completion chunk, so you should read partial text from choices[0].delta.content instead of expecting a single JSON body.
Category Filters
Usecategory to target specific content types where Exa has specialized coverage: