Skip to main content

Getting started

Install the exa-js SDK
and then instantiate an Exa client

Get 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 the contents 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.

SummaryContentsOptions

Options for retrieving summary from page.

AnswerOptions

Options for the answer endpoint

Response Types

These types represent API response objects.

CostDollars

Represents the total cost breakdown. Only non-zero costs are included.

SearchResult

Represents a search result object.

SearchResponse

Represents a search response object.

Status

AnswerResponse

Represents an answer response object from the /answer endpoint.

AnswerStreamChunk

Entity Types

These types represent structured entity data returned for company or person searches.

EntityCompanyProperties

Structured properties for a company entity.

EntityPersonProperties

Structured properties for a person entity.

CompanyEntity

Structured entity data for a company.

PersonEntity

Structured entity data for a person.
Last modified on July 21, 2026