Skip to main content
The official Exa SDKs. Search the web, get page contents, and get answers with citations.

Get your Exa API key

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

Install

The Python SDK requires Python 3.9+.

Authentication

Set your API key as an environment variable:

Getting started

Initialize the client and run your first search:
Both clients read your key from the EXA_API_KEY environment variable. To set it explicitly instead, pass it inline: Exa(api_key="your-api-key") or new Exa("your-api-key").
The two request types take the same content options in different places:
Search finds relevant pages and returns their contents in one call.
highlights is a strong default for retrieval workflows because it preserves the most relevant evidence without pulling full page text into every response.
Filters, date ranges, and result counts:

Output schema

output_schema / outputSchema works with every search type and returns the synthesized value in output.content. Use system_prompt / systemPrompt for source preferences or emphasis. Grounding is returned automatically in output.grounding, so do not duplicate citations or confidence in your schema.
Deep modes are recommended when the output requires research across several searches. Use deep-lite for lightweight research or deep for multi-step search and stronger synthesis. See the Search guide for the full request options.

Contents

Extract highlights, full text, or summaries from URLs you already know. Start with highlights and add a query to focus them on the information you need.
Use full text when you need broader context or document structure. See the Contents guide for output shapes, freshness controls, and subpage crawling.

Answer

Get answers to questions with citations.

Async and types

Python exposes AsyncExa for async operations, and the JavaScript SDK ships TypeScript types for every method.

Resources

Python: exa-py source and PyPI package. JavaScript: exa-js source and npm package.

Continue

Search guide

Return to the main Search guide for request patterns, filters, and deeper modes.

Search reference

Jump to the full /search request and response schema.

Contents guide

Use Contents when you already know the URLs and want direct extraction.
Last modified on September 15, 2026