Google client

class valueserp.GoogleClient(credentials: Credentials, **kwargs)

The primary interface for interacting with Google via VALUE SERP.

credentials

An initialized valueserp.Credentials object.

search(params: Mapping[str, Any]) Mapping[str, Any]

Conducts a generic search with the API and returns the response.

Parameters:

params – Parameters to send to the API with the request.

Returns:

The API response as a dict parsed from JSON.

Makes a web search.

Any custom parameters can be added as keyword arguments and will be passed directly to the API.

Parameters:
  • query – The query to search in Google.

  • location – The location to use for the search in Google.

  • site – Add a domain to use a site: search

  • **kwargs – Custom parameters to pass to the API.

Returns:

A WebSERP object containing the API response.

close() None

Closes the HTTP session.