Skip to main content

Getting started

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

Get API Key

Follow this link to get your API key

search Method

Perform a search. By default, returns text contents with 10,000 max characters. Use contents=False to opt-out.

Input Example

Input Parameters

Return Example

Result Object

get_contents Method

Retrieve contents for a list of URLs.

Input Example

Input Parameters

Return Example

Result Object

answer Method

Generate an answer to a query using Exa’s search and LLM capabilities.

Input Example

Input Parameters

Return Example

Result Object

stream_answer Method

Generate a streaming answer response.

Input Example

Input Parameters

Return Example

Result Object

Types Reference

This section documents the TypedDict and dataclass types used throughout the SDK.

Content Options

These TypedDict classes configure content retrieval options for the contents parameter.

TextContentsOptions

A class representing the options that you can specify when requesting text

SummaryContentsOptions

A class representing the options that you can specify when requesting summary

HighlightsContentsOptions

A class representing the options that you can specify when requesting highlights.

ExtrasOptions

A class representing additional extraction fields (e.g. links, images)

ContentsOptions

Options for retrieving page contents in search methods. All fields are optional. If no content options are specified, text with max_characters=10000 is returned by default.

Response Types

These dataclasses represent API response objects.

JSONSchema

Represents a JSON Schema definition used for structured summary output. .. deprecated:: 1.15.0 Use Pydantic models or dict[str, Any] directly instead. This will be removed in a future version. To learn more visit https://json-schema.org/overview/what-is-jsonschema.

CostDollarsSearch

Represents the cost breakdown for search.

CostDollarsContents

Represents the cost breakdown for contents.

CostDollars

Represents costDollars field in the API response.

_Result

A class representing the base fields of a search result.

Result

A class representing a search result with optional text, summary, and highlights.

ResultWithText

A class representing a search result with text present.

ResultWithSummary

A class representing a search result with summary present.

ResultWithTextAndSummary

A class representing a search result with text and summary present.

AnswerResult

A class representing a result for an answer.

StreamChunk

A class representing a single chunk of streaming data.

AnswerResponse

A class representing the response for an answer operation.

StreamAnswerResponse

A class representing a streaming answer response.

AsyncStreamAnswerResponse

A class representing a streaming answer response.

ContentStatus

A class representing the status of a content retrieval operation.

SearchResponse

A class representing the response for a search operation.

DeepSearchOutputGroundingCitation

DeepSearchOutputGrounding

DeepSearchOutput

CostDollars

Result

Entity Types

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

JSONSchemaInput

Input type for JSON schema parameters. Can be either a Pydantic model class (automatically converted to JSON Schema) or a raw JSON Schema dictionary. Type: Union[type[BaseModel], dict[str, Any]]

Category

Data category to focus on when searching. Each category returns results specialized for that content type. Type: Literal[‘company’, ‘publication’, ‘news’, ‘personal site’, ‘financial report’, ‘people’]

SearchType

Search type that determines the search algorithm:
  • auto (default): Automatically selects an appropriate search method based on the query for optimal results
  • fast: Low latency search using optimized search models
  • instant: Lowest latency search optimized for real-time applications like voice agents
  • deep-lite: Lightweight synthesized output with lower latency than deep
  • deep: Multi-step search with reasoning and structured outputs
  • deep-reasoning: More deliberate deep-search mode when you want more reasoning than deep
Type: Literal[‘auto’, ‘fast’, ‘instant’, ‘deep-lite’, ‘deep’, ‘deep-reasoning’]

VERBOSITY_OPTIONS

Verbosity levels for content filtering.
  • compact: Most concise output, main content only (default)
  • standard: Balanced content with more detail
  • full: Complete content including all sections
Type: Literal[‘compact’, ‘standard’, ‘full’]

SECTION_TAG

Section tags for semantic content filtering. Type: Literal[‘unspecified’, ‘header’, ‘navigation’, ‘banner’, ‘body’, ‘sidebar’, ‘footer’, ‘metadata’]

Entity

Type: Union[CompanyEntity, PersonEntity]

EntityCompanyPropertiesWorkforce

Company workforce information.

EntityCompanyPropertiesHeadquarters

Company headquarters information.

EntityCompanyPropertiesFundingRound

Funding round information.

EntityCompanyPropertiesFinancials

Company financial information.

EntityCompanyPropertiesWebTraffic

Company web traffic information.

EntityCompanyProperties

Structured properties for a company entity.

EntityDateRange

Date range for work history entries.

EntityPersonPropertiesCompanyRef

Reference to a company in work history.

EntityPersonPropertiesWorkHistoryEntry

A single work history entry for a person.

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