AsyncExaClient
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| WebSearchProvider searchly.base Protocol for web search providers. |
⋔ Inheritance diagram¶
graph TD
2161958798["exa.AsyncExaClient"]
4037333726["base.WebSearchProvider"]
1073422405["typing.Protocol"]
3481597255["typing.Generic"]
2751680898["builtins.object"]
4037333726 --> 2161958798
1073422405 --> 4037333726
3481597255 --> 1073422405
2751680898 --> 3481597255
🛈 DocStrings¶
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. |