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.1
1.15.0
1.14.9
1.14.8
1.14.7
1.14.6
1.14.5
1.14.4
1.14.3
1.14.20
1.14.2
1.14.19
1.14.18
1.14.17
1.14.16
1.14.15
1.14.14
1.14.13
1.14.12
1.14.10
1.14.1
1.14.0
1.13.2
1.13.1
1.13.0
1.12.5
1.12.4
1.12.3
1.12.1
1.12.0
1.11.0
1.10.0
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.2
1.0.18b1
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.12
1.0.11
1.0.1
1.0.0
توضیحات
Python SDK for Exa API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | exa-py-2.9.0 |
| نام | exa-py |
| نسخه کتابخانه | 2.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Exa AI |
| ایمیل نویسنده | hello@exa.ai |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/exa-py/ |
| مجوز | MIT |
# Exa Python SDK
[](https://pypi.org/project/exa-py/)
The official Python SDK for [Exa](https://exa.ai), the web search API for AI.
**[Documentation](https://docs.exa.ai)** | **[Dashboard](https://dashboard.exa.ai)**
## Install
```bash
pip install exa-py
```
Requires Python 3.9+
## Quick Start
```python
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?")
```
## Search
```python
results = exa.search(
"machine learning startups",
contents={"highlights": True}
)
```
```python
results = exa.search(
"climate tech news",
num_results=20,
start_published_date="2024-01-01",
include_domains=["techcrunch.com", "wired.com"],
contents={"highlights": True}
)
```
```python
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)
```
```python
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.content`
`system_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:
- max nesting depth: `2`
- max total properties: `10`
Deep search variants that also support `additional_queries`:
- `deep-lite`
- `deep`
- `deep-reasoning`
## Contents
```python
results = exa.get_contents(
["https://docs.exa.ai"],
text=True
)
```
```python
results = exa.get_contents(
["https://arxiv.org/abs/2303.08774"],
highlights=True
)
```
## Answer
```python
response = exa.answer("What caused the 2008 financial crisis?")
print(response.answer)
```
```python
for chunk in exa.stream_answer("Explain quantum computing"):
print(chunk, end="", flush=True)
```
## Async
```python
from exa_py import AsyncExa
exa = AsyncExa(api_key="your-api-key")
results = await exa.search("async search example", contents={"highlights": True})
```
## More
See the [full documentation](https://docs.exa.ai) for all features including websets, filters, and advanced options.
نیازمندی
| مقدار | نام |
|---|---|
| - | httpcore>=1.0.9 |
| - | httpx>=0.28.1 |
| - | openai>=1.48 |
| - | pydantic>=2.10.6 |
| - | python-dotenv>=1.0.1 |
| - | requests>=2.32.3 |
| - | typing-extensions>=4.12.2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl exa-py-2.9.0:
pip install exa-py-2.9.0.whl
نصب پکیج tar.gz exa-py-2.9.0:
pip install exa-py-2.9.0.tar.gz