|
| 1 | +<p align="center"> |
| 2 | + <img src="https://api.justserpapi.com/logo.png" alt="JustSerpAPI Logo" width="200"> |
| 3 | +</p> |
| 4 | + |
| 5 | +<h1 align="center">JustSerpAPI Python SDK</h1> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <a href="https://pypi.org/project/justserpapi/"> |
| 9 | + <img src="https://img.shields.io/pypi/v/justserpapi?color=blue&style=flat-square" alt="PyPI version"> |
| 10 | + </a> |
| 11 | + <a href="https://pypi.org/project/justserpapi/"> |
| 12 | + <img src="https://img.shields.io/pypi/pyversions/justserpapi?style=flat-square" alt="Python Versions"> |
| 13 | + </a> |
| 14 | + <a href="https://docs.justserpapi.com"> |
| 15 | + <img src="https://img.shields.io/badge/docs-latest-brightgreen?style=flat-square" alt="Documentation"> |
| 16 | + </a> |
| 17 | + <a href="LICENSE"> |
| 18 | + <img src="https://img.shields.io/badge/license-MIT-orange?style=flat-square" alt="License"> |
| 19 | + </a> |
| 20 | +</p> |
| 21 | + |
| 22 | +<p align="center"> |
| 23 | + <strong>The most reliable and high-performance SERP API for Google Search, Maps, News, Shopping, and more.</strong> |
| 24 | +</p> |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 🌐 Quick Links |
| 29 | + |
| 30 | +- **Official Website**: [justserpapi.com](https://justserpapi.com) |
| 31 | +- **API Documentation**: [docs.justserpapi.com](https://docs.justserpapi.com) |
| 32 | +- **User Dashboard**: [user.justserpapi.com](https://user.justserpapi.com) |
| 33 | +- **Support**: [support@justserpapi.com](mailto:support@justserpapi.com) |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## 🚀 Overview |
| 38 | + |
| 39 | +JustSerpAPI provides a comprehensive suite of tools to scrape and parse search engine results in real-time. This Python SDK allows you to integrate Google Search, Maps, Images, News, Shopping, and AI-powered overviews directly into your Python applications with full type safety and high performance. |
| 40 | + |
| 41 | +### Key Features |
| 42 | +- **Full Google Coverage**: Search, Maps, News, Shopping, Finance, Images, and Patents. |
| 43 | +- **AI-Powered**: Access Google AI Overviews and AI Search modes. |
| 44 | +- **Easy Integration**: Built-in authentication, automatic retries, and clean models. |
| 45 | +- **Type Safety**: Full PEP 484 type hints support for a great developer experience. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 🛠 Installation |
| 50 | + |
| 51 | +Install the package via `pip`: |
| 52 | + |
| 53 | +```bash |
| 54 | +pip install justserpapi |
| 55 | +``` |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 📖 Getting Started |
| 60 | + |
| 61 | +To start using the SDK, you need an **API Key**. You can get one from the [User Dashboard](https://user.justserpapi.com). |
| 62 | + |
| 63 | +### Simple Search Example |
| 64 | + |
| 65 | +```python |
| 66 | +import justserpapi |
| 67 | +from justserpapi.api.google_api_api import GoogleAPIApi |
| 68 | +from pprint import pprint |
| 69 | + |
| 70 | +# Configure the SDK |
| 71 | +configuration = justserpapi.Configuration( |
| 72 | + host="https://api.justserpapi.com" |
| 73 | +) |
| 74 | +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY_HERE' |
| 75 | + |
| 76 | +# Initialize the API client |
| 77 | +with justserpapi.ApiClient(configuration) as api_client: |
| 78 | + # Create an instance of the Google API |
| 79 | + api_instance = GoogleAPIApi(api_client) |
| 80 | + |
| 81 | + try: |
| 82 | + # Search for "coffee shops in New York" |
| 83 | + response = api_instance.search( |
| 84 | + query="coffee shops in New York", |
| 85 | + location="New York,NY", |
| 86 | + language="en" |
| 87 | + ) |
| 88 | + pprint(response) |
| 89 | + except justserpapi.ApiException as e: |
| 90 | + print(f"Exception when calling API: {e}") |
| 91 | +``` |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## 🍱 Supported APIs |
| 96 | + |
| 97 | +| Service | Method | Description | |
| 98 | +| :--- | :--- | :--- | |
| 99 | +| **Google Search** | `search()` | Core Google search results (Organic, Ads, etc.) | |
| 100 | +| **Google Maps** | `maps_search()` | Local business listings and place details | |
| 101 | +| **Google AI** | `ai_overview()` | Extract AI-generated summaries from Google | |
| 102 | +| **Google Images** | `images_search()` | High-quality image search results | |
| 103 | +| **Google News** | `news_search()` | Real-time news results | |
| 104 | +| **Google Shopping**| `shopping_search()`| Comprehensive product and price data | |
| 105 | + |
| 106 | +Check out the [Full Documentation](https://docs.justserpapi.com) for a complete list of endpoints and parameters. |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | +## 🛡️ Authentication |
| 111 | + |
| 112 | +The API uses an API Key passed in the `X-API-Key` header. In the SDK, this is managed via the `Configuration` object: |
| 113 | + |
| 114 | +```python |
| 115 | +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' |
| 116 | +``` |
| 117 | + |
| 118 | +--- |
| 119 | + |
| 120 | +## ⚖️ License |
| 121 | + |
| 122 | +Distributed under the MIT License. See `LICENSE` for more information. |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +<p align="center"> |
| 127 | + Proudly maintained by the <a href="https://justserpapi.com">JustSerpAPI Team</a>. |
| 128 | +</p> |
0 commit comments