Google / Bing / Baidu Search Results in Python
This Python package is meant to scrape and parse Google, Bing, Baidu results using SerpAPI. The following services are provided:
SerpApi provides a script builder to get you started quickly.
Feel free to fork this repository to add more backends.
Installation
Compatible with Python 2.7 or 3.7.
pip install google-search-results
Quick start
from lib.google_search_results import GoogleSearchResults
client = GoogleSearchResults({"q": "coffee", "location": "Austin,Texas", "api_key": "secretKey"})
result = client.get_dict()
This example runs a search about “coffee” using your secret api key.
The Serp API service (backend)
searches on Google using the client: q = “coffee”
parses the messy HTML responses
return a standardizes JSON response
The GoogleSearchResults class
Format the request
Execute GET http request against Serp API service
Parse JSON response into a dictionary
Et voila..
Alternatively, you can search:
Bing using BingSearchResults class
Baidu using BaiduSearchResults class
Metadata
Release files for google-search-results 1.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| google_search_results-1.5.4.tar.gz | 7.1 kB | Without provenance | Details |
Release files / google_search_results-1.5.4.tar.gz
| Download URL | google_search_results-1.5.4.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c731c985678a22d82d6b779c3675da06c98a3257ea6432bc5b38b6fa0ae7b4fc
|
|
BLAKE2b-256 checksum How to use checksums |
78d6dfa48d817ff019ea948493eaf9a4fe2804b7a749ec46df3f8041d6fe4345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for google-search-results 1.5.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.