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.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: serpapi-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 35a836faca4f1cf5ba837545a68a5940826ac1d2b9c488e2d8feff0c8d7eaaf6
MD5 4e9998ce55d293c85efd39107635e4de
BLAKE2b-256 ee6d45a2358dd432c9f294373e4a8b31cb3597e27973d36cfcf3b7561984cd8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: serpapi-0.1.0-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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2790293e2187129e43193703ea311ac0c6824253fd9adf707e898d20835ebae6
MD5 6112ea08cf387812857103ccd45cf995
BLAKE2b-256 be1f103810a69e53a175534b9a9642ab45a7652b3409e411430600dff1de1d0c

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