elm.web.search.base.PatchedSerpApiClient

class PatchedSerpApiClient(params_dict, engine=None, timeout=60000, verify=True)[source]

Bases: SerpApiClient

SerpApiClient patched to allow bypassing of SSL verification

Methods

construct_url([path])

get_account()

Get account information using Account API Returns: dict: account information

get_dict()

Returns: Dict with the formatted response content (alias for get_dictionary)

get_dictionary()

Returns: Dict with the formatted response content

get_html()

Returns: Raw HTML search result from Gooogle

get_json()

Returns: Formatted JSON search results using json package

get_location(q[, limit])

Get location using Location API Parameters: q (string): location (like: city name..) limit (int): number of matches returned Returns: dict: Location matching q

get_object()

Returns: Dynamically created python object wrapping the result data structure

get_raw_json()

Returns: Formatted JSON search result as string

get_response([path])

Get search response

get_results([path])

Returns: Response text field

get_search_archive(search_id[, format])

Retrieve search result from the Search Archive API Parameters: search_id (int): unique identifier for the search provided by metadata.id format (string): search format: json or html [optional] Returns: dict|string: search result from the archive

make_pyobj(name, node)

pagination([start, end, page_size])

Return: Generator to iterate the search results pagination

Attributes

BACKEND

SERP_API_KEY

get_account()

Get account information using Account API Returns:

dict: account information

get_dict()

Returns: Dict with the formatted response content (alias for get_dictionary)

get_dictionary()

Returns: Dict with the formatted response content

get_html()

Returns: Raw HTML search result from Gooogle

get_json()

Returns: Formatted JSON search results using json package

get_location(q, limit=5)

Get location using Location API Parameters:

q (string): location (like: city name..) limit (int): number of matches returned

Returns:

dict: Location matching q

get_object()

Returns: Dynamically created python object wrapping the result data structure

get_raw_json()

Returns: Formatted JSON search result as string

get_results(path='/search')

Returns: Response text field

get_search_archive(search_id, format='json')

Retrieve search result from the Search Archive API Parameters:

search_id (int): unique identifier for the search provided by metadata.id format (string): search format: json or html [optional]

Returns:

dict|string: search result from the archive

pagination(start=0, end=1000000000, page_size=10)

Return: Generator to iterate the search results pagination

get_response(path='/search')[source]

Get search response

Parameters:

path (str, default=’/search’) – API path to use for the search.

Returns:

Response object provided by requests.get.