langchain_community.utilities.dataforseo_api_search.DataForSeoAPIWrapper¶

class langchain_community.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[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]¶
Parameters

url (str) –

Return type

list

async arun(url: str) str[source]¶

Run request to DataForSEO SERP API and parse result async.

Parameters

url (str) –

Return type

str

results(url: str) list[source]¶
Parameters

url (str) –

Return type

list

run(url: str) str[source]¶

Run request to DataForSEO SERP API and parse result async.

Parameters

url (str) –

Return type

str

Examples using DataForSeoAPIWrapper¶