langchain_community.utilities.searchapi
.SearchApiAPIWrapper¶
- class langchain_community.utilities.searchapi.SearchApiAPIWrapper[source]¶
Bases:
BaseModel
Wrapper around SearchApi API.
To use, you should have the environment variable
SEARCHAPI_API_KEY
set with your API key, or pass searchapi_api_key as a named parameter to the constructor.Example
from langchain_community.utilities import SearchApiAPIWrapper searchapi = SearchApiAPIWrapper()
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param aiosession: Optional[ClientSession] = None¶
- param engine: str = 'google'¶
- param searchapi_api_key: Optional[str] = None¶
- async aresults(query: str, **kwargs: Any) dict [source]¶
- Parameters
query (str) –
kwargs (Any) –
- Return type
dict
- async arun(query: str, **kwargs: Any) str [source]¶
- Parameters
query (str) –
kwargs (Any) –
- Return type
str