Skip to main content

The official Python client for SerpApi.com.

Project description

SerpApi Python Library & Package

serpapi python library logo

serpapi-python

This repository is the home of the soon–to–be official Python API wrapper for SerpApi (https://serpapi.com). This serpapi module allows you to access search data in your Python application.

SerpApi supports Google, Google Maps, Google Shopping, Bing, Baidu, Yandex, Yahoo, eBay, App Stores, and more. Check out the documentation for a full list.

Current Status

This project is under development, and will be released to the public on PyPi soon.

Installation

To install the serpapi package, simply run the following command:

$ pip install serpapi

Please note that this package is separate from the soon–to–be legacy serpapi module, which is currently available on PyPi as google-search-results.

Usage

Let’s start by searching for Coffee on Google:

>>> import serpapi
>>> s = serpapi.search(q="Coffee", engine="google", location="Austin, Texas", hl="en", gl="us")

The s variable now contains a SerpResults object, which acts just like a standard dictionary, with some convenient functions added on top.

Let’s print the first result:

>>> s["organic_results"][0]["link"]
'https://en.wikipedia.org/wiki/Coffee'

Let’s print the title of the first result, but in a more Pythonic way:

>>> s["organic_results"][0].get("title")
'Coffee - Wikipedia'

The SerpApi.com API Documentation contains a list of all the possible parameters that can be passed to the API.

Documentation

Documentation is available on Read the Docs.

License

MIT License.

Contributing

Bug reports and pull requests are welcome on GitHub. Once dependencies are installed, you can run the tests with pytest.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

serpapi-0.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

serpapi-0.1.1-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file serpapi-0.1.1.tar.gz.

File metadata

  • Download URL: serpapi-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for serpapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6903452fec6a4f98bde008a3c158b1e2cbab50272384ee19242a8a5260cbc5c9
MD5 28fb5e13c1dae2fbf22d6dc26c755d23
BLAKE2b-256 380ceba54cb7e02b68a825b87d150c1100669321c16bff443c1be53145a8ee59

See more details on using hashes here.

File details

Details for the file serpapi-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: serpapi-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for serpapi-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 462873d6fa65d381daf95b3e81b5821392f166d7c663d155c46e3a209ae11505
MD5 9bbbe87e34df095a2466f9a38f81bb72
BLAKE2b-256 388ce5f236a12e62bb057cfddfa00a4e78f4f6ab7c17b066d707e0f83b917500

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page