exa
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AsyncExaClient searchly.providers.exa_provider.exa Async client for Exa API. |
🛈 DocStrings¶
Exa API client implementing search protocols.
AsyncExaClient
¶
Bases: WebSearchProvider
Async client for Exa API.
Note: Exa does not support country/language filtering. These parameters are accepted for protocol compatibility but are ignored.
Source code in src/searchly/providers/exa_provider/exa.py
__init__
¶
Initialize Exa client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
Exa API key. Defaults to EXA_API_KEY env var. |
None
|
Source code in src/searchly/providers/exa_provider/exa.py
web_search
async
¶
web_search(
query: str,
*,
max_results: int = 10,
country: CountryCode | None = None,
language: LanguageCode | None = None,
search_type: Literal["auto", "keyword", "neural", "deep"] = "auto",
max_characters: int | None = None,
include_domains: list[str] | None = None,
exclude_domains: list[str] | None = None,
start_published_date: str | None = None,
end_published_date: str | None = None,
category: str | None = None,
summary: bool | dict[str, Any] | None = None,
**kwargs: Any,
) -> WebSearchResponse
Execute a web search query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query string. |
required |
max_results
|
int
|
Maximum number of results to return. |
10
|
country
|
CountryCode | None
|
Ignored (Exa does not support country filtering). |
None
|
language
|
LanguageCode | None
|
Ignored (Exa does not support language filtering). |
None
|
search_type
|
Literal['auto', 'keyword', 'neural', 'deep']
|
Type of search ("auto", "keyword", "neural", "deep"). |
'auto'
|
max_characters
|
int | None
|
Max characters for text content. |
None
|
include_domains
|
list[str] | None
|
List of domains to include. |
None
|
exclude_domains
|
list[str] | None
|
List of domains to exclude. |
None
|
start_published_date
|
str | None
|
Only include content after this date (ISO 8601). |
None
|
end_published_date
|
str | None
|
Only include content before this date (ISO 8601). |
None
|
category
|
str | None
|
Category to focus search on. |
None
|
summary
|
bool | dict[str, Any] | None
|
Whether to include AI summary. |
None
|
**kwargs
|
Any
|
Additional Exa-specific options. |
{}
|
Returns:
| Type | Description |
|---|---|
WebSearchResponse
|
Unified web search response. |
Source code in src/searchly/providers/exa_provider/exa.py
example
async
¶
Example usage of AsyncExaClient.