langchain.utilities.dataforseo_api_search.DataForSeoAPIWrapper¶
class langchain.utilities.dataforseo_api_search.DataForSeoAPIWrapper[source]¶
Bases: BaseModel
Wrapper around the DataForSeo API.
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[aiohttp.client.ClientSession] = None¶
The aiohttp session to use for the DataForSEO SERP API.
param api_login: Optional[str] = None¶
The API login to use for the DataForSEO SERP API.
param api_password: Optional[str] = None¶
The API password to use for the DataForSEO SERP API.
param default_params: dict = {'depth': 10, 'language_code': 'en', 'location_name': 'United States', 'se_name': 'google', 'se_type': 'organic'}¶
Default parameters to use for the DataForSEO SERP API.
param json_result_fields: Optional[list] = None¶
The JSON result fields.
param json_result_types: Optional[list] = None¶
The JSON result types.
param params: dict = {}¶
Additional parameters to pass to the DataForSEO SERP API.
param top_count: Optional[int] = None¶
The number of top results to return.
async aresults(url: str) → list[source]¶
async arun(url: str) → str[source]¶
Run request to DataForSEO SERP API and parse result async.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.