Google client
- class valueserp.GoogleClient(credentials: Credentials, **kwargs)
The primary interface for interacting with Google via VALUE SERP.
- credentials
An initialized
valueserp.Credentialsobject.
- 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.
- web_search(query: str, location: str | valueserp.Location | None = None, site: str | None = None, **kwargs) WebSERP
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
WebSERPobject containing the API response.
- close() None
Closes the HTTP session.