{"repo":"serpapi/serpapi-python","free":true,"listed":false,"github":"https://github.com/serpapi/serpapi-python","clone":"git clone https://github.com/serpapi/serpapi-python.git","description":"Official Python wrapper for SerpApi HTTP endpoints","language":"Python","stars":169,"topics":["api-client","python","scraping-api","serpapi","api-wrapper","google-search-api","google-search-results","requests","api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"SerpApi Python Library & Package Integrate search data into your AI workflow, RAG / fine-tuning, or Python application using this official wrapper for SerpApi. SerpApi supports Google, Google Maps, Google Shopping, Baidu, Yandex, Yahoo, eBay, App Stores, and more. Query a vast range of data at scale, including web search results, flight schedules, stock market data, news headlines, and more. Installation To install the serpapi package, simply run the following command: Please note that this package is separate from the legacy serpapi module, which is available on PyPi as google-search-results . This package is maintained by SerpApi, and is the recommended way to access the SerpApi service from Python. Simple Usage Let's start by searching for Coffee on Google: The results variable now contains a SerpResults object, which acts just like a standard dictionary, with some convenient functions added on top. This example runs a search for \"coffee\" on Google. It then returns the results as a regular Python Hash. See the playground to generate your own code. The SerpApi key can be obtained from serpapi.com/signup. Environment variables are a secure, safe, and easy way to manage secrets. Set export SERPAPI KEY= in your shell. Python accesses these variables from os.environ[\"SERPAPI KEY\"] . Error handling Unsuccessful requests raise serpapi.HTTPError or serpapi.TimeoutError exceptions. The returned status code will reflect the sort of error that occurred, please refer to Status and Err","default_branch":null,"files":null,"tree":[],"storefront":"/r/serpapi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/serpapi/serpapi-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}