The official Python SDK for Exa, the web search API for AI. It enables developers to semantically search the web, retrieve page contents, find similar pages, and generate answers with citations. The library is currently at version 2.11.0 and is actively maintained with regular updates.
Install & Compatibility
Where this runs
tested against v2.13.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.925 runs
installs and imports cleanly · install 0.0s · import 3.256s · 53.1MB
glibcpy 3.10–3.925 runs
installs and imports cleanly · install 5.6s · import 2.866s · 52MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Use for asynchronous operations.
from exa_py import AsyncExa
Instantiate the Exa client with your API key, then perform a web search and get an answer to a question. Ensure the 'EXA_API_KEY' environment variable is set.
import os
from exa_py import Exa
exa = Exa(api_key=os.environ.get('EXA_API_KEY', ''))
if exa.api_key:
# Search the web
results = exa.search(
"blog post about artificial intelligence",
type="auto",
contents={"highlights": True}
)
print("Search results:", results.results)
# Ask a question
response = exa.answer("What is the capital of France?")
print("Answer:", response.answer)
else:
print("EXA_API_KEY environment variable not set. Please set it to run the quickstart example.")
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.