
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
exa-py
Advanced tools
The official Python SDK for Exa, the web search API for AI.
pip install exa-py
Requires Python 3.9+
from exa_py import Exa
exa = Exa(api_key="your-api-key")
# Search the web
results = exa.search(
"blog post about artificial intelligence",
type="auto",
contents={"highlights": True}
)
# Ask a question
response = exa.answer("What is the capital of France?")
results = exa.search(
"machine learning startups",
contents={"highlights": True}
)
results = exa.search(
"climate tech news",
num_results=20,
start_published_date="2024-01-01",
include_domains=["techcrunch.com", "wired.com"],
contents={"highlights": True}
)
results = exa.search(
"What are the latest battery breakthroughs?",
type="auto",
system_prompt="Prefer official sources and avoid duplicate results",
output_schema={
"type": "object",
"properties": {
"summary": {"type": "string"},
"key_companies": {"type": "array", "items": {"type": "string"}},
},
"required": ["summary", "key_companies"],
},
)
print(results.output.content if results.output else None)
for chunk in exa.stream_search(
"What are the latest battery breakthroughs?",
type="auto",
):
if chunk.content:
print(chunk.content, end="", flush=True)
Search output_schema modes:
{"type": "text", "description": "..."}: return plain text in output.content{"type": "object", ...}: return structured JSON in output.contentsystem_prompt and output_schema are supported on every search type.
Search streaming is available via stream_search(...), which yields OpenAI-style chat completion chunks.
For type: "object", search currently enforces:
210Deep search variants that also support additional_queries:
deep-litedeepdeep-reasoningresults = exa.get_contents(
["https://docs.exa.ai"],
text=True
)
results = exa.get_contents(
["https://arxiv.org/abs/2303.08774"],
highlights=True
)
response = exa.answer("What caused the 2008 financial crisis?")
print(response.answer)
for chunk in exa.stream_answer("Explain quantum computing"):
print(chunk, end="", flush=True)
from exa_py import AsyncExa
exa = AsyncExa(api_key="your-api-key")
results = await exa.search("async search example", contents={"highlights": True})
See the full documentation for all features including websets, filters, and advanced options.
FAQs
Python SDK for Exa API.
We found that exa-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.