Skip to main content
cURL

Get your Exa API key

Create a key in the dashboard. New accounts start with free credits.

Authorizations

x-api-key
string
header
required

Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .

Body

application/json
query
string
required

The query string for the search.

Minimum string length: 1
includeDomains
string[] | null

List of domains or domain paths to include in the search. Each entry can be a hostname (for example, example.com), a hostname with a path prefix (for example, example.com/docs), or a wildcard subdomain (for example, *.example.com). If specified, results will only come from the matching domains or paths. Use this parameter for domain or path filtering instead of adding a site: operator to the query.

Maximum array length: 1200
excludeDomains
string[] | null

List of domains or domain paths to exclude from search results. Each entry can be a hostname (for example, example.com), a hostname with a path prefix (for example, example.com/docs), or a wildcard subdomain (for example, *.example.com). If specified, no results will be returned from the matching domains or paths. Use this parameter for domain or path filtering instead of adding a site: operator to the query.

Maximum array length: 1200
startPublishedDate
string<date-time> | null

Only links with a published date after this will be returned. Must be specified in ISO 8601 format.

endPublishedDate
string<date-time> | null

Only links with a published date before this will be returned. Must be specified in ISO 8601 format.

numResults
integer | null
default:10

Number of results to return. Limits vary by search type. The maximum public limit is 100 results. Contact sales (hello@exa.ai) to discuss higher limits.

Required range: 1 <= x <= 100
moderation
boolean | null
default:false

Enable content moderation to filter unsafe content from search results.

contents
object | null

Content options for text, highlights, summary, extras, and freshness controls.

additionalQueries
string[] | null

Additional query variations for deep-search variants. Only works with a deep-search type. When provided, these queries are used alongside the main query for broader results.

Required array length: 1 - 10 elements
type
default:auto

The search mode to use. Defaults to auto, a balanced mode recommended for most applications.

  • auto: The default. A balanced mode that optimizes for both quality and speed and is recommended for most applications.
  • lite: Low-cost, low-latency search for real-time and interactive experiences such as chat, voice agents, and autocomplete. Accepts only query (a single string), objective, userIdentifier, metadata, category, numResults, contents.highlights, contents.text, contents.snapshotAsOf, userLocation, includeDomains, excludeDomains, startPublishedDate, endPublishedDate, moderation, and compliance; a request that sets any other parameter is rejected. Serves cached content only; it never fetches live, so the freshness options are rejected.
  • deep-lite: Performs lightweight research with synthesized results and a consistent 4-second latency, lower than full deep search.
  • deep: Conducts comprehensive multi-step research with synthesis.
  • instant: Legacy. Use lite instead. Runs a minimum-latency search that trades some search depth for speed. Unlike lite, it accepts every search parameter.
  • fast: Legacy. Use lite instead. Runs a reduced-latency search for user-facing and interactive workflows. Unlike lite, it accepts every search parameter.
  • deep-reasoning: Legacy. Use deep instead. Runs deep with stronger reasoning at each step, for complex analysis and decision-making tasks. For agentic, multi-step research, use the Agent API.
Allowed value: "auto"
category
enum<string> | null

A data category to focus on. Other strings are accepted and used as category hints. people and company return higher-quality people profiles and company pages. publication returns scholarly publications such as research papers, preprints, and journal articles, with metadata like authors, venue, and citations. company and people do not support startPublishedDate or endPublishedDate, and people also does not support excludeDomains. Requests that set an unsupported filter return a 400 error.

Available options:
company,
publication,
news,
personal site,
financial report,
people
userLocation

The end user's location, as a two-letter ISO 3166-1 country code (e.g. US) or an object with country, a latitude and longitude pair, or both. The country localizes results. Coordinates are used only for queries that name no place but depend on where the user is, such as "coffee near me". They do not set a country, so send country with them to localize results. Send only the precision your use case needs.

compliance
enum<string> | null

Enterprise-only compliance mode. Set to hipaa for HIPAA mode. Requires cache-only retrieval with supported parameters. See the HIPAA docs for details.

Available options:
hipaa
outputSchema
object

JSON schema for synthesized output. Supported root types are "text" and "object". When provided, the response includes an output object whose content matches this schema. Works with every search type and adds about 2 seconds of synthesis latency on top of the selected search type. Object schemas are limited to 10 properties in total (nested and array items properties count toward the limit) and 2 levels of nesting, and every array must define items.

objective
string | null

The broader goal this search serves: the task the caller is working on, beyond the query itself. When exposing this field to an agent as a tool parameter, describe it as: "Goal for this search turn; say which documents should rank first, which should be excluded, and what specific facts or figures to pull from them."

Maximum string length: 4096
userIdentifier
string | null

An opaque ID your platform assigns to the end user this request is made for, such as a UUID. Lets Exa attribute usage to that end user rather than your whole team. Must not contain personal information such as an email address, phone number, username, or name. Hash such values before sending them. 1 to 64 characters: letters, digits, underscores, and hyphens. Retained even when your team has Zero Data Retention enabled. Does not affect results.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"7f3a9c52-1d4e-4b8a-9e60-2c5d8a1f0b37"

systemPrompt
string | null

Additional instructions that guide generated output or agent behavior. Use this for source preferences, novelty constraints, duplication constraints, or other behavior guidance.

stream
boolean | null
default:false

Requests server-sent events for synthesized output streaming. Streaming is currently used only when outputSchema is provided; otherwise the endpoint returns the normal JSON search response.

startCrawlDate
string<date-time> | null
deprecated

Deprecated. Ignored by the API. Setting it adds an IGNORED_FIELD warning to the response's warnings.

endCrawlDate
string<date-time> | null
deprecated

Deprecated. Ignored by the API. Setting it adds an IGNORED_FIELD warning to the response's warnings.

includeText
string[] | null
deprecated

Deprecated. List of strings that must be present in the webpage text of results. Matching is approximate (word-level rather than exact phrase), so a multi-word entry can match pages where its words appear separately. Up to 50 strings, each up to 4096 characters.

Maximum array length: 50
Maximum string length: 4096
excludeText
string[] | null
deprecated

Deprecated. List of strings that must not be present in the webpage text of results. Matching is approximate (word-level rather than exact phrase). Up to 50 strings, each up to 4096 characters.

Maximum array length: 50
Maximum string length: 4096
context
deprecated

Deprecated. Use highlights or text instead. Returns page contents as a combined context string.

Response

OK

results
object[]
required

A list of search results containing title, URL, published date, and author.

output
object
required

Synthesized output. Returned when outputSchema is provided.

requestId
string

Unique identifier for the request.

costDollars
object

Estimated dollar cost of the request. Which fields appear depends on the endpoint.

searchTime
number

Server-side processing time in milliseconds. May exclude output synthesis time, so it can be lower than end-to-end latency.

warnings
object[]

Warnings about the request, such as a field that has no effect. Log them; do not pass them to a model. Omitted when there are none.

notices
object[]

Notices about how the results were produced. Pass them to your model with the results. Omitted when there are none.

resolvedSearchType
string
deprecated

Deprecated. May be an empty string. Do not branch on this value.

context
string
deprecated

Deprecated. Use results[].highlights or results[].text instead. Combined context string from search results.