justserpapi 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- justserpapi-1.0.0/LICENSE +21 -0
- justserpapi-1.0.0/PKG-INFO +160 -0
- justserpapi-1.0.0/README.md +128 -0
- justserpapi-1.0.0/justserpapi/__init__.py +49 -0
- justserpapi-1.0.0/justserpapi/api/__init__.py +5 -0
- justserpapi-1.0.0/justserpapi/api/google_api_api.py +12558 -0
- justserpapi-1.0.0/justserpapi/api_client.py +805 -0
- justserpapi-1.0.0/justserpapi/api_response.py +21 -0
- justserpapi-1.0.0/justserpapi/configuration.py +626 -0
- justserpapi-1.0.0/justserpapi/exceptions.py +218 -0
- justserpapi-1.0.0/justserpapi/models/__init__.py +16 -0
- justserpapi-1.0.0/justserpapi/py.typed +0 -0
- justserpapi-1.0.0/justserpapi/rest.py +263 -0
- justserpapi-1.0.0/justserpapi.egg-info/PKG-INFO +160 -0
- justserpapi-1.0.0/justserpapi.egg-info/SOURCES.txt +21 -0
- justserpapi-1.0.0/justserpapi.egg-info/dependency_links.txt +1 -0
- justserpapi-1.0.0/justserpapi.egg-info/requires.txt +4 -0
- justserpapi-1.0.0/justserpapi.egg-info/top_level.txt +1 -0
- justserpapi-1.0.0/pyproject.toml +117 -0
- justserpapi-1.0.0/setup.cfg +7 -0
- justserpapi-1.0.0/setup.py +49 -0
- justserpapi-1.0.0/test/test_google_api_api.py +248 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 JustSerpAPI Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: justserpapi
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: API Shop Documentation
|
|
5
|
+
Home-page: https://api.justserpapi.com
|
|
6
|
+
Author: OpenAPI Generator community
|
|
7
|
+
Author-email: OpenAPI Generator Community <team@openapitools.org>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://api.justserpapi.com
|
|
10
|
+
Project-URL: Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
|
|
11
|
+
Keywords: OpenAPI,OpenAPI-Generator,API Shop Documentation
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
26
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
27
|
+
Requires-Dist: pydantic>=2
|
|
28
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="https://api.justserpapi.com/logo.png" alt="JustSerpAPI Logo" width="200">
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<h1 align="center">JustSerpAPI Python SDK</h1>
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<a href="https://pypi.org/project/justserpapi/">
|
|
41
|
+
<img src="https://img.shields.io/pypi/v/justserpapi?color=blue&style=flat-square" alt="PyPI version">
|
|
42
|
+
</a>
|
|
43
|
+
<a href="https://pypi.org/project/justserpapi/">
|
|
44
|
+
<img src="https://img.shields.io/pypi/pyversions/justserpapi?style=flat-square" alt="Python Versions">
|
|
45
|
+
</a>
|
|
46
|
+
<a href="https://docs.justserpapi.com">
|
|
47
|
+
<img src="https://img.shields.io/badge/docs-latest-brightgreen?style=flat-square" alt="Documentation">
|
|
48
|
+
</a>
|
|
49
|
+
<a href="LICENSE">
|
|
50
|
+
<img src="https://img.shields.io/badge/license-MIT-orange?style=flat-square" alt="License">
|
|
51
|
+
</a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<strong>The most reliable and high-performance SERP API for Google Search, Maps, News, Shopping, and more.</strong>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 🌐 Quick Links
|
|
61
|
+
|
|
62
|
+
- **Official Website**: [justserpapi.com](https://justserpapi.com)
|
|
63
|
+
- **API Documentation**: [docs.justserpapi.com](https://docs.justserpapi.com)
|
|
64
|
+
- **User Dashboard**: [user.justserpapi.com](https://user.justserpapi.com)
|
|
65
|
+
- **Support**: [support@justserpapi.com](mailto:support@justserpapi.com)
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 🚀 Overview
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
### Key Features
|
|
74
|
+
- **Full Google Coverage**: Search, Maps, News, Shopping, Finance, Images, and Patents.
|
|
75
|
+
- **AI-Powered**: Access Google AI Overviews and AI Search modes.
|
|
76
|
+
- **Easy Integration**: Built-in authentication, automatic retries, and clean models.
|
|
77
|
+
- **Type Safety**: Full PEP 484 type hints support for a great developer experience.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🛠 Installation
|
|
82
|
+
|
|
83
|
+
Install the package via `pip`:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install justserpapi
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 📖 Getting Started
|
|
92
|
+
|
|
93
|
+
To start using the SDK, you need an **API Key**. You can get one from the [User Dashboard](https://user.justserpapi.com).
|
|
94
|
+
|
|
95
|
+
### Simple Search Example
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
import justserpapi
|
|
99
|
+
from justserpapi.api.google_api_api import GoogleAPIApi
|
|
100
|
+
from pprint import pprint
|
|
101
|
+
|
|
102
|
+
# Configure the SDK
|
|
103
|
+
configuration = justserpapi.Configuration(
|
|
104
|
+
host="https://api.justserpapi.com"
|
|
105
|
+
)
|
|
106
|
+
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY_HERE'
|
|
107
|
+
|
|
108
|
+
# Initialize the API client
|
|
109
|
+
with justserpapi.ApiClient(configuration) as api_client:
|
|
110
|
+
# Create an instance of the Google API
|
|
111
|
+
api_instance = GoogleAPIApi(api_client)
|
|
112
|
+
|
|
113
|
+
try:
|
|
114
|
+
# Search for "coffee shops in New York"
|
|
115
|
+
response = api_instance.search(
|
|
116
|
+
query="coffee shops in New York",
|
|
117
|
+
location="New York,NY",
|
|
118
|
+
language="en"
|
|
119
|
+
)
|
|
120
|
+
pprint(response)
|
|
121
|
+
except justserpapi.ApiException as e:
|
|
122
|
+
print(f"Exception when calling API: {e}")
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🍱 Supported APIs
|
|
128
|
+
|
|
129
|
+
| Service | Method | Description |
|
|
130
|
+
| :--- | :--- | :--- |
|
|
131
|
+
| **Google Search** | `search()` | Core Google search results (Organic, Ads, etc.) |
|
|
132
|
+
| **Google Maps** | `maps_search()` | Local business listings and place details |
|
|
133
|
+
| **Google AI** | `ai_overview()` | Extract AI-generated summaries from Google |
|
|
134
|
+
| **Google Images** | `images_search()` | High-quality image search results |
|
|
135
|
+
| **Google News** | `news_search()` | Real-time news results |
|
|
136
|
+
| **Google Shopping**| `shopping_search()`| Comprehensive product and price data |
|
|
137
|
+
|
|
138
|
+
Check out the [Full Documentation](https://docs.justserpapi.com) for a complete list of endpoints and parameters.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 🛡️ Authentication
|
|
143
|
+
|
|
144
|
+
The API uses an API Key passed in the `X-API-Key` header. In the SDK, this is managed via the `Configuration` object:
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## ⚖️ License
|
|
153
|
+
|
|
154
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
<p align="center">
|
|
159
|
+
Proudly maintained by the <a href="https://justserpapi.com">JustSerpAPI Team</a>.
|
|
160
|
+
</p>
|
|
@@ -0,0 +1,128 @@
|
|
|
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,0 +1,49 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
API Shop Documentation
|
|
7
|
+
|
|
8
|
+
Integrated API platform documentation. This document covers all services provided by API Shop. For details on common response codes (like 401, 403, 500), please refer to our unified error code documentation.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: v1.0.0
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "1.0.0"
|
|
18
|
+
|
|
19
|
+
# Define package exports
|
|
20
|
+
__all__ = [
|
|
21
|
+
"GoogleAPIApi",
|
|
22
|
+
"ApiResponse",
|
|
23
|
+
"ApiClient",
|
|
24
|
+
"Configuration",
|
|
25
|
+
"OpenApiException",
|
|
26
|
+
"ApiTypeError",
|
|
27
|
+
"ApiValueError",
|
|
28
|
+
"ApiKeyError",
|
|
29
|
+
"ApiAttributeError",
|
|
30
|
+
"ApiException",
|
|
31
|
+
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
# import apis into sdk package
|
|
35
|
+
from justserpapi.api.google_api_api import GoogleAPIApi as GoogleAPIApi
|
|
36
|
+
|
|
37
|
+
# import ApiClient
|
|
38
|
+
from justserpapi.api_response import ApiResponse as ApiResponse
|
|
39
|
+
from justserpapi.api_client import ApiClient as ApiClient
|
|
40
|
+
from justserpapi.configuration import Configuration as Configuration
|
|
41
|
+
from justserpapi.exceptions import OpenApiException as OpenApiException
|
|
42
|
+
from justserpapi.exceptions import ApiTypeError as ApiTypeError
|
|
43
|
+
from justserpapi.exceptions import ApiValueError as ApiValueError
|
|
44
|
+
from justserpapi.exceptions import ApiKeyError as ApiKeyError
|
|
45
|
+
from justserpapi.exceptions import ApiAttributeError as ApiAttributeError
|
|
46
|
+
from justserpapi.exceptions import ApiException as ApiException
|
|
47
|
+
|
|
48
|
+
# import models into sdk package
|
|
49
|
+
|