Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2.06 KB

README.rst

File metadata and controls

69 lines (47 loc) · 2.06 KB

Google / Bing / Baidu Search Results in Python

This Python package is meant to scrape and parse Google, Google Scholar, Bing, Baidu, Yandex, Yahoo, Ebay results using SerpApi. The following services are provided:

SerpApi provides a script builder to get you started quickly.

Installation

Compatible with Python 3.7+

pip install google-search-results

Link to the python package page

Quick start

from serpapi import GoogleSearch
search = GoogleSearch({"q": "coffee", "location": "Austin,Texas", "api_key": "secretKey"})
result = search.get_dict()

This example runs a search about "coffee" using your secret api key.

The Serp API service (backend)

  • searches on Google using the query: q = "coffee"
  • parses the messy HTML responses
  • return a standardizes JSON response

The GoogleSearch 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 BingSearch class
  • Baidu using BaiduSearch class
  • Yahoo using YahooSearch class
  • duckduckgo using DuckDuckGoSearch class
  • Ebay using EbaySearch class
  • Yandex using YandexSearch class
  • HomeDepot using HomeDepotSearch class
  • GoogleScholar using GoogleScholarSearch class
  • Youtube using YoutubeSearch class
  • Walmart using WalmartSearch
  • Apple App Store using AppleAppStoreSearch class
  • Naver using NaverSearch class

See the playground to generate your code.

Documentation available here