Getting started
Install the exa-js SDKGet API Key
Follow this link to get your API key
search Method
The
options.type parameter accepts: "auto" (default), "fast", "deep-lite", "deep",
"deep-reasoning", or "instant". See
RegularSearchOptions for all available options.Input Example
Input Parameters
Return Example
Result Object
getContents Method
Retrieves contents of documents based on URLs.
Input Example
Input Parameters
Return Example
Result Object
answer Method
Input Example
Input Parameters
Return Example
Result Object
streamAnswer Method
Input Example
Input Parameters
Return Example
Result Object
Types Reference
This section documents the types used throughout the SDK.Content Options
These types configure content retrieval options for thecontents parameter.
ContentsOptions
Options for retrieving page contents
BaseSearchOptions
Options for performing a search query
RegularSearchOptions
Search options for performing a search query.
Uses a discriminated union to ensure additionalQueries is only allowed when type is a deep search variant.
ExtrasOptions
TextContentsOptions
Options for retrieving text from page.
HighlightsContentsOptions
Options for retrieving highlights from page.
These options are supported for deep search types (“deep”, “deep-reasoning”) as well.
Dynamic Highlights is a research preview. Requests that set
dynamic require the Exa-Beta: dynamic-highlights-2026-08-28 header; the SDK sends it automatically.