AsyncJigsawStackClient
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
189624456["jigsawstack.AsyncJigsawStackClient"]
1226828128["http.HttpSessionMixin"]
2751680898["builtins.object"]
4037333726["base.WebSearchProvider"]
1073422405["typing.Protocol"]
3481597255["typing.Generic"]
1226828128 --> 189624456
2751680898 --> 1226828128
4037333726 --> 189624456
1073422405 --> 4037333726
3481597255 --> 1073422405
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: HttpSessionMixin, WebSearchProvider
Async client for JigsawStack API.
Note: JigsawStack does not support country/language/max_results filtering. These parameters are accepted for protocol compatibility but are ignored.
Source code in src/searchly/providers/jigsawstack_provider/jigsawstack.py
__init__
¶
Initialize JigsawStack client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
JigsawStack API key. Defaults to JIGSAWSTACK_API_KEY env var. |
None
|
base_url
|
str
|
Base URL for the API. |
'https://api.jigsawstack.com/v1'
|
Source code in src/searchly/providers/jigsawstack_provider/jigsawstack.py
web_search
async
¶
web_search(
query: str,
*,
max_results: int = 10,
country: CountryCode | None = None,
language: LanguageCode | None = None,
ai_overview: bool = True,
safe_search: SafeSearchSetting = "moderate",
spell_check: bool = True,
**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 (JigsawStack does not support country filtering). |
None
|
language
|
LanguageCode | None
|
Ignored (JigsawStack does not support language filtering). |
None
|
ai_overview
|
bool
|
Include AI-powered overview. |
True
|
safe_search
|
SafeSearchSetting
|
Safe search level. |
'moderate'
|
spell_check
|
bool
|
Enable query spell checking. |
True
|
**kwargs
|
Any
|
Additional JigsawStack-specific options. |
{}
|
Returns:
| Type | Description |
|---|---|
WebSearchResponse
|
Unified web search response. |