AsyncLinkUpClient
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| HttpSessionMixin searchly.http Gives a provider one `anyenv.HttpSession`, opened on first use. |
||
| WebSearchProvider searchly.base Protocol for web search providers. |
⋔ Inheritance diagram¶
graph TD
2321112441["client.AsyncLinkUpClient"]
1226828128["http.HttpSessionMixin"]
2751680898["builtins.object"]
4037333726["base.WebSearchProvider"]
1073422405["typing.Protocol"]
3481597255["typing.Generic"]
1226828128 --> 2321112441
2751680898 --> 1226828128
4037333726 --> 2321112441
1073422405 --> 4037333726
3481597255 --> 1073422405
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: HttpSessionMixin, WebSearchProvider
Async client for LinkUp API.
Note: LinkUp does not support country/language/max_results filtering. These parameters are accepted for protocol compatibility but are ignored.
Source code in src/searchly/providers/linkup_provider/client.py
__init__
¶
Initialize LinkUp client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
LinkUp API key. Defaults to LINKUP_API_KEY env var. |
None
|
base_url
|
str
|
Base URL for the API. |
'https://api.linkup.so/v1'
|
Source code in src/searchly/providers/linkup_provider/client.py
web_search
async
¶
web_search(
query: str,
*,
max_results: int = 10,
country: CountryCode | None = None,
language: LanguageCode | None = None,
depth: SearchDepth = "standard",
output_type: OutputType = "searchResults",
**kwargs: Any,
) -> WebSearchResponse
Execute a web search query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query string. |
required |
max_results
|
int
|
Ignored (LinkUp does not support result count). |
10
|
country
|
CountryCode | None
|
Ignored (LinkUp does not support country filtering). |
None
|
language
|
LanguageCode | None
|
Ignored (LinkUp does not support language filtering). |
None
|
depth
|
SearchDepth
|
Search depth - "standard" (faster) or "deep" (more thorough). |
'standard'
|
output_type
|
OutputType
|
Type of output format. |
'searchResults'
|
**kwargs
|
Any
|
Additional LinkUp-specific options. |
{}
|
Returns:
| Type | Description |
|---|---|
WebSearchResponse
|
Unified web search response. |