Skip to main content
Exa Search takes a natural language query and returns ranked web results with clean page content.

Make your first request

Start with a query in natural language. Optional fields control how Exa searches and what each result includes; the rest of this page covers the ones you will actually use.
Search returns up to 10 results by default. Set numResults to request up to 100 results; fewer may be returned when fewer relevant pages are available. Search does not support pagination.
Highlights and the list below are shortened.
Results are ranked by relevance. Each one carries metadata such as title, URL, and publication date, plus whatever you requested under contents.

Writing queries

The query field is the only required field when using the Search API. Write queries in natural language. Include the subject and, when useful, the kind of source and time period you want. Queries can be broad and exploratory. "Latest news on EU battery policy" gives Exa enough intent to discover relevant pages; "news" does not. When the source type matters, name it in the query:
See What’s in Exa’s Index for what Exa’s index includes and how to search those content types.

Choose a search type

type selects a search mode, each tuned for a different balance of speed, search depth, and synthesis. auto is the default and works for most searches. Deep modes run a research process rather than a single retrieval pass. See Deep Search for how that process works and how to use its additional controls.
Instead of deep-reasoning, use Exa Agent for long-running research, list building, and multi-hop enrichment. Agent has more compute per run and returns grounded, structured results.

Output shapes

Every result includes metadata such as its title, URL, and publication date. Use contents to add highlights, full text, or a summary from the page.
Highlights return the excerpts most relevant to your query. They give models and agents the evidence they need without filling the context window with unrelated parts of each page.This is the recommended output shape for most tasks.Start with bare highlights: true. Exa uses the query to select an appropriate amount of content from each result.
See Highlights for Dynamic Highlights and guidance on when to enable it.
Pick one content view per request. Requesting both highlights and text returns and bills two views of the same page. summary is a third option, but it adds a language model call for every result.
/search and /contents accept the same content options in different places:
  • /search nests highlights, text, and summary inside the contents object: "contents": { "highlights": true }
  • /contents has no contents wrapper. Its body is the content options themselves, so the same fields sit at the top level next to urls: "urls": [...], "highlights": true

Output schema

Add outputSchema when you want Exa to synthesize the search results. It works with every search type and adds an output object to the response. The ranked pages remain in results. The generated value is returned in output.content, with field-level sources and confidence in output.grounding.
Use type: "text" for generated prose. Add a description to specify its format or length.
Use systemPrompt for instructions such as source preferences or emphasis; use outputSchema for the response shape. Python uses system_prompt and output_schema.
Keep object schemas small: they support up to 2 levels of nesting and 10 properties. Do not add citation or confidence fields to the schema; Exa returns them automatically in output.grounding.

Filter results

Filters are hard constraints: add one when a result outside it would be unusable to you, and keep softer source preferences in the query text instead. The API reference has the full set.

Include domains or paths

includeDomains restricts results to sources you trust. It accepts full domains, path prefixes such as anthropic.com/news, and subdomain wildcards such as *.substack.com.
Put the path in the filter rather than repeating it as a site: operator in the query.

Exclude domains or paths

excludeDomains removes results from specific domains or paths. It supports the same path prefixes and subdomain wildcards as includeDomains. Use it when those sources would make a result unusable, not to express a preference.

Content freshness

contents.maxAgeHours controls how fresh the content extracted from each result must be. It does not filter results by publication date. Most searches should omit this field. Set it when stale page content would be unusable, such as for prices, availability, or a page that changes frequently.

Next steps

Best practices

Token budgets, content freshness, structured output, and system prompts.

API reference

Every request parameter and response field, with a live playground.

Contents

You already have the URLs and want clean text, highlights, or summaries.

Exa Agent

You need long-running research, list building, or enrichment.
Last modified on September 15, 2026