automdev 0.1.0__py3-none-any.whl
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.
- autom/__init__.py +61 -0
- autom/_endpoints.py +200 -0
- autom/_operations.py +2058 -0
- autom/_response.py +82 -0
- autom/_serialization.py +105 -0
- autom/_version.py +1 -0
- autom/client.py +529 -0
- autom/errors.py +85 -0
- autom/models.py +81 -0
- autom/py.typed +1 -0
- automdev-0.1.0.dist-info/METADATA +218 -0
- automdev-0.1.0.dist-info/RECORD +14 -0
- automdev-0.1.0.dist-info/WHEEL +4 -0
- automdev-0.1.0.dist-info/licenses/LICENSE +21 -0
autom/_operations.py
ADDED
|
@@ -0,0 +1,2058 @@
|
|
|
1
|
+
"""Generated from the Autom OpenAPI document. Do not edit by hand."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, cast
|
|
6
|
+
|
|
7
|
+
from .models import APIResponse, JsonResponse, RequestOptions
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class _SyncOperations:
|
|
11
|
+
"""Generated Autom endpoint methods."""
|
|
12
|
+
|
|
13
|
+
__slots__ = ()
|
|
14
|
+
|
|
15
|
+
def _call(
|
|
16
|
+
self, name: str, params: dict[str, Any], options: RequestOptions | None
|
|
17
|
+
) -> APIResponse:
|
|
18
|
+
raise NotImplementedError
|
|
19
|
+
|
|
20
|
+
def bing_search(
|
|
21
|
+
self,
|
|
22
|
+
*,
|
|
23
|
+
query: str,
|
|
24
|
+
page: int | float | None = None,
|
|
25
|
+
num: int | float | None = None,
|
|
26
|
+
location: str | None = None,
|
|
27
|
+
lat: int | float | None = None,
|
|
28
|
+
lon: int | float | None = None,
|
|
29
|
+
mkt: str | None = None,
|
|
30
|
+
cc: str | None = None,
|
|
31
|
+
fields: str | None = None,
|
|
32
|
+
is_async: bool | None = None,
|
|
33
|
+
soft_fail: bool | None = None,
|
|
34
|
+
request_options: RequestOptions | None = None,
|
|
35
|
+
) -> JsonResponse:
|
|
36
|
+
"""Bing Search. Query Bing Search via API and retrieve structured organic results (title, link, snippet, position). Credit cost: 1 credit per call.
|
|
37
|
+
|
|
38
|
+
``GET / POST /v1/bing/search``
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
query: The search query you want to run on Bing.
|
|
42
|
+
page: Page number for pagination (1 = first page).
|
|
43
|
+
num: Number of results per page (e.g. 10, 20, 50). This value is a suggestion.
|
|
44
|
+
location: Search origin location (e.g. city).
|
|
45
|
+
lat: GPS latitude for the search origin.
|
|
46
|
+
lon: GPS longitude for the search origin.
|
|
47
|
+
mkt: Market code where results come from (e.g. en-US). Cannot be used together with cc.
|
|
48
|
+
cc: Country code to search from (2-letter ISO 3166-1). Cannot be used together with mkt.
|
|
49
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
50
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
51
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
52
|
+
"""
|
|
53
|
+
return cast(
|
|
54
|
+
JsonResponse,
|
|
55
|
+
self._call(
|
|
56
|
+
"bing_search",
|
|
57
|
+
{
|
|
58
|
+
"query": query,
|
|
59
|
+
"page": page,
|
|
60
|
+
"num": num,
|
|
61
|
+
"location": location,
|
|
62
|
+
"lat": lat,
|
|
63
|
+
"lon": lon,
|
|
64
|
+
"mkt": mkt,
|
|
65
|
+
"cc": cc,
|
|
66
|
+
"fields": fields,
|
|
67
|
+
"is_async": is_async,
|
|
68
|
+
"soft_fail": soft_fail,
|
|
69
|
+
},
|
|
70
|
+
request_options,
|
|
71
|
+
),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def brave_images(
|
|
75
|
+
self,
|
|
76
|
+
*,
|
|
77
|
+
query: str,
|
|
78
|
+
page: int | float | None = None,
|
|
79
|
+
gl: str | None = None,
|
|
80
|
+
hl: str | None = None,
|
|
81
|
+
safe: str | None = None,
|
|
82
|
+
fields: str | None = None,
|
|
83
|
+
is_async: bool | None = None,
|
|
84
|
+
soft_fail: bool | None = None,
|
|
85
|
+
request_options: RequestOptions | None = None,
|
|
86
|
+
) -> JsonResponse:
|
|
87
|
+
"""Brave Images. Search Brave Images via API and retrieve structured image results with pagination and SafeSearch. Credit cost: 1 credit per call.
|
|
88
|
+
|
|
89
|
+
``GET / POST /v1/brave/images``
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
query: The search query you want to run on Brave Images.
|
|
93
|
+
page: Page number for pagination (50 results per page).
|
|
94
|
+
gl: Country code (e.g. fr, us). Mapped to Brave country.
|
|
95
|
+
hl: Language code (e.g. fr, en). Mapped to Brave lang.
|
|
96
|
+
safe: SafeSearch: active | off | moderate | strict. Google-style active maps to Brave strict.
|
|
97
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
98
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
99
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
100
|
+
"""
|
|
101
|
+
return cast(
|
|
102
|
+
JsonResponse,
|
|
103
|
+
self._call(
|
|
104
|
+
"brave_images",
|
|
105
|
+
{
|
|
106
|
+
"query": query,
|
|
107
|
+
"page": page,
|
|
108
|
+
"gl": gl,
|
|
109
|
+
"hl": hl,
|
|
110
|
+
"safe": safe,
|
|
111
|
+
"fields": fields,
|
|
112
|
+
"is_async": is_async,
|
|
113
|
+
"soft_fail": soft_fail,
|
|
114
|
+
},
|
|
115
|
+
request_options,
|
|
116
|
+
),
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
def brave_search(
|
|
120
|
+
self,
|
|
121
|
+
*,
|
|
122
|
+
query: str,
|
|
123
|
+
page: int | float | None = None,
|
|
124
|
+
gl: str | None = None,
|
|
125
|
+
hl: str | None = None,
|
|
126
|
+
fields: str | None = None,
|
|
127
|
+
is_async: bool | None = None,
|
|
128
|
+
soft_fail: bool | None = None,
|
|
129
|
+
request_options: RequestOptions | None = None,
|
|
130
|
+
) -> JsonResponse:
|
|
131
|
+
"""Brave Search. Search Brave Search via API and retrieve structured organic results with pagination. Credit cost: 1 credit per call.
|
|
132
|
+
|
|
133
|
+
``GET / POST /v1/brave/search``
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
query: The search query you want to run on Brave Search.
|
|
137
|
+
page: Page number for pagination.
|
|
138
|
+
gl: Country code, for example us, fr, gb, de.
|
|
139
|
+
hl: Language code, for example en, fr, de.
|
|
140
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
141
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
142
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
143
|
+
"""
|
|
144
|
+
return cast(
|
|
145
|
+
JsonResponse,
|
|
146
|
+
self._call(
|
|
147
|
+
"brave_search",
|
|
148
|
+
{
|
|
149
|
+
"query": query,
|
|
150
|
+
"page": page,
|
|
151
|
+
"gl": gl,
|
|
152
|
+
"hl": hl,
|
|
153
|
+
"fields": fields,
|
|
154
|
+
"is_async": is_async,
|
|
155
|
+
"soft_fail": soft_fail,
|
|
156
|
+
},
|
|
157
|
+
request_options,
|
|
158
|
+
),
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
def brave_videos(
|
|
162
|
+
self,
|
|
163
|
+
*,
|
|
164
|
+
query: str,
|
|
165
|
+
page: int | float | None = None,
|
|
166
|
+
gl: str | None = None,
|
|
167
|
+
hl: str | None = None,
|
|
168
|
+
safe: str | None = None,
|
|
169
|
+
fields: str | None = None,
|
|
170
|
+
is_async: bool | None = None,
|
|
171
|
+
soft_fail: bool | None = None,
|
|
172
|
+
request_options: RequestOptions | None = None,
|
|
173
|
+
) -> JsonResponse:
|
|
174
|
+
"""Brave Videos. Search Brave Videos via API and retrieve structured video results with pagination and SafeSearch. Credit cost: 1 credit per call.
|
|
175
|
+
|
|
176
|
+
``GET / POST /v1/brave/videos``
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
query: The search query you want to run on Brave Videos.
|
|
180
|
+
page: Page number for pagination.
|
|
181
|
+
gl: Country code (e.g. fr, us). Mapped to Brave country.
|
|
182
|
+
hl: Language code (e.g. fr, en). Mapped to Brave lang.
|
|
183
|
+
safe: SafeSearch: active | off | moderate | strict. Google-style active maps to Brave strict.
|
|
184
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
185
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
186
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
187
|
+
"""
|
|
188
|
+
return cast(
|
|
189
|
+
JsonResponse,
|
|
190
|
+
self._call(
|
|
191
|
+
"brave_videos",
|
|
192
|
+
{
|
|
193
|
+
"query": query,
|
|
194
|
+
"page": page,
|
|
195
|
+
"gl": gl,
|
|
196
|
+
"hl": hl,
|
|
197
|
+
"safe": safe,
|
|
198
|
+
"fields": fields,
|
|
199
|
+
"is_async": is_async,
|
|
200
|
+
"soft_fail": soft_fail,
|
|
201
|
+
},
|
|
202
|
+
request_options,
|
|
203
|
+
),
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
def duckduckgo_search(
|
|
207
|
+
self,
|
|
208
|
+
*,
|
|
209
|
+
query: str,
|
|
210
|
+
page: int | float | None = None,
|
|
211
|
+
gl: str | None = None,
|
|
212
|
+
hl: str | None = None,
|
|
213
|
+
fields: str | None = None,
|
|
214
|
+
is_async: bool | None = None,
|
|
215
|
+
soft_fail: bool | None = None,
|
|
216
|
+
request_options: RequestOptions | None = None,
|
|
217
|
+
) -> JsonResponse:
|
|
218
|
+
"""DuckDuckGo Search. Query DuckDuckGo via API and retrieve structured organic results with region and language. Credit cost: 1 credit per call.
|
|
219
|
+
|
|
220
|
+
``GET / POST /v1/duckduckgo/search``
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
query: Search query sent to DuckDuckGo Search.
|
|
224
|
+
page: Page number. Page 1 is the first page of results.
|
|
225
|
+
gl: Country code, for example us, fr, gb, de, jp.
|
|
226
|
+
hl: Language code, for example en, fr, de, ja, zh.
|
|
227
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
228
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
229
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
230
|
+
"""
|
|
231
|
+
return cast(
|
|
232
|
+
JsonResponse,
|
|
233
|
+
self._call(
|
|
234
|
+
"duckduckgo_search",
|
|
235
|
+
{
|
|
236
|
+
"query": query,
|
|
237
|
+
"page": page,
|
|
238
|
+
"gl": gl,
|
|
239
|
+
"hl": hl,
|
|
240
|
+
"fields": fields,
|
|
241
|
+
"is_async": is_async,
|
|
242
|
+
"soft_fail": soft_fail,
|
|
243
|
+
},
|
|
244
|
+
request_options,
|
|
245
|
+
),
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
def finder_google_countries(
|
|
249
|
+
self,
|
|
250
|
+
*,
|
|
251
|
+
query: str,
|
|
252
|
+
fields: str | None = None,
|
|
253
|
+
is_async: bool | None = None,
|
|
254
|
+
soft_fail: bool | None = None,
|
|
255
|
+
request_options: RequestOptions | None = None,
|
|
256
|
+
) -> JsonResponse:
|
|
257
|
+
"""Google Countries. Search Google countries and retrieve country codes (free Finder endpoint).
|
|
258
|
+
|
|
259
|
+
``GET /v1/finder/google-countries``
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
query: Filter countries by a search string (case-insensitive). Returns all countries whose code or name matches the specified query.
|
|
263
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
264
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
265
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
266
|
+
"""
|
|
267
|
+
return cast(
|
|
268
|
+
JsonResponse,
|
|
269
|
+
self._call(
|
|
270
|
+
"finder_google_countries",
|
|
271
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
272
|
+
request_options,
|
|
273
|
+
),
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
def finder_google_languages(
|
|
277
|
+
self,
|
|
278
|
+
*,
|
|
279
|
+
query: str,
|
|
280
|
+
fields: str | None = None,
|
|
281
|
+
is_async: bool | None = None,
|
|
282
|
+
soft_fail: bool | None = None,
|
|
283
|
+
request_options: RequestOptions | None = None,
|
|
284
|
+
) -> JsonResponse:
|
|
285
|
+
"""Google Languages. Search Google languages and retrieve language codes (free Finder endpoint).
|
|
286
|
+
|
|
287
|
+
``GET /v1/finder/google-languages``
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
query: Filter languages by a search string (case-insensitive). Returns all languages whose names contain the specified string.
|
|
291
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
292
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
293
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
294
|
+
"""
|
|
295
|
+
return cast(
|
|
296
|
+
JsonResponse,
|
|
297
|
+
self._call(
|
|
298
|
+
"finder_google_languages",
|
|
299
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
300
|
+
request_options,
|
|
301
|
+
),
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
def finder_google_locations(
|
|
305
|
+
self,
|
|
306
|
+
*,
|
|
307
|
+
query: str,
|
|
308
|
+
fields: str | None = None,
|
|
309
|
+
is_async: bool | None = None,
|
|
310
|
+
soft_fail: bool | None = None,
|
|
311
|
+
request_options: RequestOptions | None = None,
|
|
312
|
+
) -> JsonResponse:
|
|
313
|
+
"""Google Locations. Find supported Google locations and retrieve location IDs and country codes (free endpoint).
|
|
314
|
+
|
|
315
|
+
``GET /v1/finder/google-locations``
|
|
316
|
+
|
|
317
|
+
Args:
|
|
318
|
+
query: Search locations supported by Piloterr (cities, countries, etc.) by providing a query string. Returns matching locations ordered by reach.
|
|
319
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
320
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
321
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
322
|
+
"""
|
|
323
|
+
return cast(
|
|
324
|
+
JsonResponse,
|
|
325
|
+
self._call(
|
|
326
|
+
"finder_google_locations",
|
|
327
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
328
|
+
request_options,
|
|
329
|
+
),
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
def google_images(
|
|
333
|
+
self,
|
|
334
|
+
*,
|
|
335
|
+
query: str,
|
|
336
|
+
page: int | float | None = None,
|
|
337
|
+
google_domain: str | None = None,
|
|
338
|
+
gl: str | None = None,
|
|
339
|
+
hl: str | None = None,
|
|
340
|
+
cr: str | None = None,
|
|
341
|
+
lr: str | None = None,
|
|
342
|
+
async_: bool | None = None,
|
|
343
|
+
safe: str | None = None,
|
|
344
|
+
fields: str | None = None,
|
|
345
|
+
is_async: bool | None = None,
|
|
346
|
+
soft_fail: bool | None = None,
|
|
347
|
+
request_options: RequestOptions | None = None,
|
|
348
|
+
) -> JsonResponse:
|
|
349
|
+
"""Google Images. Search Google Images via API and retrieve image results (URLs, titles, sources, dimensions). Credit cost: 1 credit per call.
|
|
350
|
+
|
|
351
|
+
``GET / POST /v1/google/images``
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
query: Query you want to search on Google Images (e.g. "lion", "nike logo", "modern house exterior").
|
|
355
|
+
page: Page number for pagination (1 = first page).
|
|
356
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
357
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
358
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
359
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
360
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
361
|
+
async_: If true, returns a job and lets you fetch results asynchronously.
|
|
362
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
363
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
364
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
365
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
366
|
+
"""
|
|
367
|
+
return cast(
|
|
368
|
+
JsonResponse,
|
|
369
|
+
self._call(
|
|
370
|
+
"google_images",
|
|
371
|
+
{
|
|
372
|
+
"query": query,
|
|
373
|
+
"page": page,
|
|
374
|
+
"google_domain": google_domain,
|
|
375
|
+
"gl": gl,
|
|
376
|
+
"hl": hl,
|
|
377
|
+
"cr": cr,
|
|
378
|
+
"lr": lr,
|
|
379
|
+
"async": async_,
|
|
380
|
+
"safe": safe,
|
|
381
|
+
"fields": fields,
|
|
382
|
+
"is_async": is_async,
|
|
383
|
+
"soft_fail": soft_fail,
|
|
384
|
+
},
|
|
385
|
+
request_options,
|
|
386
|
+
),
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
def google_jobs(
|
|
390
|
+
self,
|
|
391
|
+
*,
|
|
392
|
+
query: str,
|
|
393
|
+
uds: str | None = None,
|
|
394
|
+
lrad: int | float | None = None,
|
|
395
|
+
ltype: int | float | None = None,
|
|
396
|
+
location: str | None = None,
|
|
397
|
+
uule: str | None = None,
|
|
398
|
+
google_domain: str | None = None,
|
|
399
|
+
gl: str | None = None,
|
|
400
|
+
hl: str | None = None,
|
|
401
|
+
cr: str | None = None,
|
|
402
|
+
lr: str | None = None,
|
|
403
|
+
next_page_token: str | None = None,
|
|
404
|
+
fields: str | None = None,
|
|
405
|
+
is_async: bool | None = None,
|
|
406
|
+
soft_fail: bool | None = None,
|
|
407
|
+
request_options: RequestOptions | None = None,
|
|
408
|
+
) -> JsonResponse:
|
|
409
|
+
"""Google Jobs. Scrape Google Jobs results via API and retrieve structured job listings with title, company, location, and pagination. Credit cost: 1 credit per call.
|
|
410
|
+
|
|
411
|
+
``GET / POST /v1/google/jobs``
|
|
412
|
+
|
|
413
|
+
Args:
|
|
414
|
+
query: The job search query to run on Google Jobs (e.g. developer, barista new york).
|
|
415
|
+
uds: Advanced search filters string for Google Jobs (encoded filter chips).
|
|
416
|
+
lrad: Search radius in kilometers. Does not strictly limit the radius, but influences result proximity.
|
|
417
|
+
ltype: Filter results by work type. Set to 1 to filter for work from home / remote jobs.
|
|
418
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
419
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
420
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
421
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
422
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
423
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
424
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
425
|
+
next_page_token: Token to fetch the next page of results. Returned in the serpapi_pagination.next_page_token field of the previous response.
|
|
426
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
427
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
428
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
429
|
+
"""
|
|
430
|
+
return cast(
|
|
431
|
+
JsonResponse,
|
|
432
|
+
self._call(
|
|
433
|
+
"google_jobs",
|
|
434
|
+
{
|
|
435
|
+
"query": query,
|
|
436
|
+
"uds": uds,
|
|
437
|
+
"lrad": lrad,
|
|
438
|
+
"ltype": ltype,
|
|
439
|
+
"location": location,
|
|
440
|
+
"uule": uule,
|
|
441
|
+
"google_domain": google_domain,
|
|
442
|
+
"gl": gl,
|
|
443
|
+
"hl": hl,
|
|
444
|
+
"cr": cr,
|
|
445
|
+
"lr": lr,
|
|
446
|
+
"next_page_token": next_page_token,
|
|
447
|
+
"fields": fields,
|
|
448
|
+
"is_async": is_async,
|
|
449
|
+
"soft_fail": soft_fail,
|
|
450
|
+
},
|
|
451
|
+
request_options,
|
|
452
|
+
),
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
def google_maps(
|
|
456
|
+
self,
|
|
457
|
+
*,
|
|
458
|
+
query: str,
|
|
459
|
+
page: int | float | None = None,
|
|
460
|
+
google_domain: str | None = None,
|
|
461
|
+
gl: str | None = None,
|
|
462
|
+
hl: str | None = None,
|
|
463
|
+
cr: str | None = None,
|
|
464
|
+
lr: str | None = None,
|
|
465
|
+
ll: str | None = None,
|
|
466
|
+
fields: str | None = None,
|
|
467
|
+
is_async: bool | None = None,
|
|
468
|
+
soft_fail: bool | None = None,
|
|
469
|
+
request_options: RequestOptions | None = None,
|
|
470
|
+
) -> JsonResponse:
|
|
471
|
+
"""Google Maps. Search Google Maps via API and retrieve structured place results (address, website, phone). Credit cost: 1 credit per call.
|
|
472
|
+
|
|
473
|
+
``GET / POST /v1/google/maps``
|
|
474
|
+
|
|
475
|
+
Args:
|
|
476
|
+
query: Search query for Google Maps (e.g. business type, brand, or place name).
|
|
477
|
+
page: Page number for pagination (1 = first page).
|
|
478
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
479
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
480
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
481
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
482
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
483
|
+
ll: Map center / geo hint in Google format (e.g. @43.5131985,1.4600501,60m). Helps focus results around a coordinate and zoom radius.
|
|
484
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
485
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
486
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
487
|
+
"""
|
|
488
|
+
return cast(
|
|
489
|
+
JsonResponse,
|
|
490
|
+
self._call(
|
|
491
|
+
"google_maps",
|
|
492
|
+
{
|
|
493
|
+
"query": query,
|
|
494
|
+
"page": page,
|
|
495
|
+
"google_domain": google_domain,
|
|
496
|
+
"gl": gl,
|
|
497
|
+
"hl": hl,
|
|
498
|
+
"cr": cr,
|
|
499
|
+
"lr": lr,
|
|
500
|
+
"ll": ll,
|
|
501
|
+
"fields": fields,
|
|
502
|
+
"is_async": is_async,
|
|
503
|
+
"soft_fail": soft_fail,
|
|
504
|
+
},
|
|
505
|
+
request_options,
|
|
506
|
+
),
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
def google_news(
|
|
510
|
+
self,
|
|
511
|
+
*,
|
|
512
|
+
query: str,
|
|
513
|
+
page: int | float | None = None,
|
|
514
|
+
num: int | float | None = None,
|
|
515
|
+
google_domain: str | None = None,
|
|
516
|
+
gl: str | None = None,
|
|
517
|
+
hl: str | None = None,
|
|
518
|
+
cr: str | None = None,
|
|
519
|
+
lr: str | None = None,
|
|
520
|
+
fields: str | None = None,
|
|
521
|
+
is_async: bool | None = None,
|
|
522
|
+
soft_fail: bool | None = None,
|
|
523
|
+
request_options: RequestOptions | None = None,
|
|
524
|
+
) -> JsonResponse:
|
|
525
|
+
"""Google News. Search Google News via API and retrieve structured news results with pagination. Credit cost: 1 credit per call.
|
|
526
|
+
|
|
527
|
+
``GET / POST /v1/google/news``
|
|
528
|
+
|
|
529
|
+
Args:
|
|
530
|
+
query: Query to search on Google News (keywords, company, topic).
|
|
531
|
+
page: Page number for pagination (1 = first page).
|
|
532
|
+
num: Maximum number of results per page (e.g. 10).
|
|
533
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
534
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
535
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
536
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
537
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
538
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
539
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
540
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
541
|
+
"""
|
|
542
|
+
return cast(
|
|
543
|
+
JsonResponse,
|
|
544
|
+
self._call(
|
|
545
|
+
"google_news",
|
|
546
|
+
{
|
|
547
|
+
"query": query,
|
|
548
|
+
"page": page,
|
|
549
|
+
"num": num,
|
|
550
|
+
"google_domain": google_domain,
|
|
551
|
+
"gl": gl,
|
|
552
|
+
"hl": hl,
|
|
553
|
+
"cr": cr,
|
|
554
|
+
"lr": lr,
|
|
555
|
+
"fields": fields,
|
|
556
|
+
"is_async": is_async,
|
|
557
|
+
"soft_fail": soft_fail,
|
|
558
|
+
},
|
|
559
|
+
request_options,
|
|
560
|
+
),
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
def google_search(
|
|
564
|
+
self,
|
|
565
|
+
*,
|
|
566
|
+
query: str,
|
|
567
|
+
tbs: str | None = None,
|
|
568
|
+
safe: str | None = None,
|
|
569
|
+
location: str | None = None,
|
|
570
|
+
uule: str | None = None,
|
|
571
|
+
google_domain: str | None = None,
|
|
572
|
+
gl: str | None = None,
|
|
573
|
+
hl: str | None = None,
|
|
574
|
+
cr: str | None = None,
|
|
575
|
+
lr: str | None = None,
|
|
576
|
+
page: int | float | None = None,
|
|
577
|
+
num: int | float | None = None,
|
|
578
|
+
fields: str | None = None,
|
|
579
|
+
is_async: bool | None = None,
|
|
580
|
+
soft_fail: bool | None = None,
|
|
581
|
+
request_options: RequestOptions | None = None,
|
|
582
|
+
) -> JsonResponse:
|
|
583
|
+
"""Google Search. Scrape Google Search results via API and retrieve structured SERP data with pagination. Credit cost: 1 credit per call.
|
|
584
|
+
|
|
585
|
+
``GET / POST /v1/google/search``
|
|
586
|
+
|
|
587
|
+
Args:
|
|
588
|
+
query: The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:).
|
|
589
|
+
tbs: Advanced search filters string (e.g. time ranges: qdr:h last hour, qdr:d last day, qdr:w last week, qdr:m last month, qdr:y last year).
|
|
590
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
591
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
592
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
593
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
594
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
595
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
596
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
597
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
598
|
+
page: Page number / offset used for pagination.
|
|
599
|
+
num: Maximum number of results to return per page (deprecated).
|
|
600
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
601
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
602
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
603
|
+
"""
|
|
604
|
+
return cast(
|
|
605
|
+
JsonResponse,
|
|
606
|
+
self._call(
|
|
607
|
+
"google_search",
|
|
608
|
+
{
|
|
609
|
+
"query": query,
|
|
610
|
+
"tbs": tbs,
|
|
611
|
+
"safe": safe,
|
|
612
|
+
"location": location,
|
|
613
|
+
"uule": uule,
|
|
614
|
+
"google_domain": google_domain,
|
|
615
|
+
"gl": gl,
|
|
616
|
+
"hl": hl,
|
|
617
|
+
"cr": cr,
|
|
618
|
+
"lr": lr,
|
|
619
|
+
"page": page,
|
|
620
|
+
"num": num,
|
|
621
|
+
"fields": fields,
|
|
622
|
+
"is_async": is_async,
|
|
623
|
+
"soft_fail": soft_fail,
|
|
624
|
+
},
|
|
625
|
+
request_options,
|
|
626
|
+
),
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
def google_search_ai(
|
|
630
|
+
self,
|
|
631
|
+
*,
|
|
632
|
+
query: str,
|
|
633
|
+
location: str | None = None,
|
|
634
|
+
uule: str | None = None,
|
|
635
|
+
google_domain: str | None = None,
|
|
636
|
+
gl: str | None = None,
|
|
637
|
+
hl: str | None = None,
|
|
638
|
+
cr: str | None = None,
|
|
639
|
+
lr: str | None = None,
|
|
640
|
+
fields: str | None = None,
|
|
641
|
+
is_async: bool | None = None,
|
|
642
|
+
soft_fail: bool | None = None,
|
|
643
|
+
request_options: RequestOptions | None = None,
|
|
644
|
+
) -> JsonResponse:
|
|
645
|
+
"""Google AI Mode. Query Google AI Mode via API. JSON with text_blocks, references, and shopping_results. Credit cost: 3 credits per call.
|
|
646
|
+
|
|
647
|
+
``GET / POST /v1/google/search/ai``
|
|
648
|
+
|
|
649
|
+
Args:
|
|
650
|
+
query: The question or search query you want Google AI Mode to answer (supports advanced operators like site:, inurl:, intitle:).
|
|
651
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
652
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
653
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
654
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
655
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
656
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
657
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
658
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
659
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
660
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
661
|
+
"""
|
|
662
|
+
return cast(
|
|
663
|
+
JsonResponse,
|
|
664
|
+
self._call(
|
|
665
|
+
"google_search_ai",
|
|
666
|
+
{
|
|
667
|
+
"query": query,
|
|
668
|
+
"location": location,
|
|
669
|
+
"uule": uule,
|
|
670
|
+
"google_domain": google_domain,
|
|
671
|
+
"gl": gl,
|
|
672
|
+
"hl": hl,
|
|
673
|
+
"cr": cr,
|
|
674
|
+
"lr": lr,
|
|
675
|
+
"fields": fields,
|
|
676
|
+
"is_async": is_async,
|
|
677
|
+
"soft_fail": soft_fail,
|
|
678
|
+
},
|
|
679
|
+
request_options,
|
|
680
|
+
),
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
def google_search_autocomplete(
|
|
684
|
+
self,
|
|
685
|
+
*,
|
|
686
|
+
query: str,
|
|
687
|
+
cp: int | float | None = None,
|
|
688
|
+
google_domain: str | None = None,
|
|
689
|
+
gl: str | None = None,
|
|
690
|
+
hl: str | None = None,
|
|
691
|
+
cr: str | None = None,
|
|
692
|
+
lr: str | None = None,
|
|
693
|
+
fields: str | None = None,
|
|
694
|
+
is_async: bool | None = None,
|
|
695
|
+
soft_fail: bool | None = None,
|
|
696
|
+
request_options: RequestOptions | None = None,
|
|
697
|
+
) -> JsonResponse:
|
|
698
|
+
"""Google Search Autocomplete. Get Google Search autocomplete suggestions via API for a given query. Credit cost: 1 credit per call.
|
|
699
|
+
|
|
700
|
+
``GET / POST /v1/google/search/autocomplete``
|
|
701
|
+
|
|
702
|
+
Args:
|
|
703
|
+
query: The search query for which you want to get autocomplete suggestions.
|
|
704
|
+
cp: Cursor position in the search query where you want to get autocomplete suggestions.
|
|
705
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
706
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
707
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
708
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
709
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
710
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
711
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
712
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
713
|
+
"""
|
|
714
|
+
return cast(
|
|
715
|
+
JsonResponse,
|
|
716
|
+
self._call(
|
|
717
|
+
"google_search_autocomplete",
|
|
718
|
+
{
|
|
719
|
+
"query": query,
|
|
720
|
+
"cp": cp,
|
|
721
|
+
"google_domain": google_domain,
|
|
722
|
+
"gl": gl,
|
|
723
|
+
"hl": hl,
|
|
724
|
+
"cr": cr,
|
|
725
|
+
"lr": lr,
|
|
726
|
+
"fields": fields,
|
|
727
|
+
"is_async": is_async,
|
|
728
|
+
"soft_fail": soft_fail,
|
|
729
|
+
},
|
|
730
|
+
request_options,
|
|
731
|
+
),
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
def google_search_light(
|
|
735
|
+
self,
|
|
736
|
+
*,
|
|
737
|
+
query: str,
|
|
738
|
+
google_domain: str | None = None,
|
|
739
|
+
gl: str | None = None,
|
|
740
|
+
hl: str | None = None,
|
|
741
|
+
cr: str | None = None,
|
|
742
|
+
lr: str | None = None,
|
|
743
|
+
fields: str | None = None,
|
|
744
|
+
is_async: bool | None = None,
|
|
745
|
+
soft_fail: bool | None = None,
|
|
746
|
+
request_options: RequestOptions | None = None,
|
|
747
|
+
) -> JsonResponse:
|
|
748
|
+
"""Google Search Light. Scrape lightweight Google Search results via API: fast, cost-efficient, organic results only. Credit cost: 1 credit per call.
|
|
749
|
+
|
|
750
|
+
``GET / POST /v1/google/search/light``
|
|
751
|
+
|
|
752
|
+
Args:
|
|
753
|
+
query: The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:).
|
|
754
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
755
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
756
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
757
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
758
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
759
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
760
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
761
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
762
|
+
"""
|
|
763
|
+
return cast(
|
|
764
|
+
JsonResponse,
|
|
765
|
+
self._call(
|
|
766
|
+
"google_search_light",
|
|
767
|
+
{
|
|
768
|
+
"query": query,
|
|
769
|
+
"google_domain": google_domain,
|
|
770
|
+
"gl": gl,
|
|
771
|
+
"hl": hl,
|
|
772
|
+
"cr": cr,
|
|
773
|
+
"lr": lr,
|
|
774
|
+
"fields": fields,
|
|
775
|
+
"is_async": is_async,
|
|
776
|
+
"soft_fail": soft_fail,
|
|
777
|
+
},
|
|
778
|
+
request_options,
|
|
779
|
+
),
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
def google_shopping(
|
|
783
|
+
self,
|
|
784
|
+
*,
|
|
785
|
+
query: str,
|
|
786
|
+
page: int | float | None = None,
|
|
787
|
+
location: str | None = None,
|
|
788
|
+
uule: str | None = None,
|
|
789
|
+
google_domain: str | None = None,
|
|
790
|
+
gl: str | None = None,
|
|
791
|
+
hl: str | None = None,
|
|
792
|
+
cr: str | None = None,
|
|
793
|
+
lr: str | None = None,
|
|
794
|
+
safe: str | None = None,
|
|
795
|
+
fields: str | None = None,
|
|
796
|
+
is_async: bool | None = None,
|
|
797
|
+
soft_fail: bool | None = None,
|
|
798
|
+
request_options: RequestOptions | None = None,
|
|
799
|
+
) -> JsonResponse:
|
|
800
|
+
"""Google Shopping. Scrape Google Shopping results via API and retrieve structured product listings with prices, ratings, and merchant data. Credit cost: 1 credit per call.
|
|
801
|
+
|
|
802
|
+
``GET / POST /v1/google/shopping``
|
|
803
|
+
|
|
804
|
+
Args:
|
|
805
|
+
query: Query to search on Google Shopping (product name, brand, category).
|
|
806
|
+
page: Page number for pagination (1 = first page).
|
|
807
|
+
location: Location to localize results (e.g. New York, United States). Generates a UULE parameter automatically.
|
|
808
|
+
uule: Encoded location parameter (UULE). Use location instead if you don't have a pre-encoded value.
|
|
809
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
810
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
811
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
812
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
813
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
814
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
815
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
816
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
817
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
818
|
+
"""
|
|
819
|
+
return cast(
|
|
820
|
+
JsonResponse,
|
|
821
|
+
self._call(
|
|
822
|
+
"google_shopping",
|
|
823
|
+
{
|
|
824
|
+
"query": query,
|
|
825
|
+
"page": page,
|
|
826
|
+
"location": location,
|
|
827
|
+
"uule": uule,
|
|
828
|
+
"google_domain": google_domain,
|
|
829
|
+
"gl": gl,
|
|
830
|
+
"hl": hl,
|
|
831
|
+
"cr": cr,
|
|
832
|
+
"lr": lr,
|
|
833
|
+
"safe": safe,
|
|
834
|
+
"fields": fields,
|
|
835
|
+
"is_async": is_async,
|
|
836
|
+
"soft_fail": soft_fail,
|
|
837
|
+
},
|
|
838
|
+
request_options,
|
|
839
|
+
),
|
|
840
|
+
)
|
|
841
|
+
|
|
842
|
+
def google_videos(
|
|
843
|
+
self,
|
|
844
|
+
*,
|
|
845
|
+
query: str,
|
|
846
|
+
page: int | float,
|
|
847
|
+
location: str | None = None,
|
|
848
|
+
uule: str | None = None,
|
|
849
|
+
google_domain: str | None = None,
|
|
850
|
+
gl: str | None = None,
|
|
851
|
+
hl: str | None = None,
|
|
852
|
+
cr: str | None = None,
|
|
853
|
+
lr: str | None = None,
|
|
854
|
+
num: int | float | None = None,
|
|
855
|
+
safe: str | None = None,
|
|
856
|
+
fields: str | None = None,
|
|
857
|
+
is_async: bool | None = None,
|
|
858
|
+
soft_fail: bool | None = None,
|
|
859
|
+
request_options: RequestOptions | None = None,
|
|
860
|
+
) -> JsonResponse:
|
|
861
|
+
"""Google Videos. Search Google Videos via API and retrieve structured video results with metadata. Credit cost: 1 credit per call.
|
|
862
|
+
|
|
863
|
+
``GET / POST /v1/google/videos``
|
|
864
|
+
|
|
865
|
+
Args:
|
|
866
|
+
query: The search query you want to run on Google Videos.
|
|
867
|
+
location: Human-readable location to originate the search from. Note: location and uule cannot be used together.
|
|
868
|
+
uule: Google encoded location parameter. Note: uule and location cannot be used together.
|
|
869
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
870
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
871
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
872
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
873
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
874
|
+
page: Page number for pagination (1 = first page).
|
|
875
|
+
num: Maximum number of results per page (e.g. 10).
|
|
876
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
877
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
878
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
879
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
880
|
+
"""
|
|
881
|
+
return cast(
|
|
882
|
+
JsonResponse,
|
|
883
|
+
self._call(
|
|
884
|
+
"google_videos",
|
|
885
|
+
{
|
|
886
|
+
"query": query,
|
|
887
|
+
"location": location,
|
|
888
|
+
"uule": uule,
|
|
889
|
+
"google_domain": google_domain,
|
|
890
|
+
"gl": gl,
|
|
891
|
+
"hl": hl,
|
|
892
|
+
"cr": cr,
|
|
893
|
+
"lr": lr,
|
|
894
|
+
"page": page,
|
|
895
|
+
"num": num,
|
|
896
|
+
"safe": safe,
|
|
897
|
+
"fields": fields,
|
|
898
|
+
"is_async": is_async,
|
|
899
|
+
"soft_fail": soft_fail,
|
|
900
|
+
},
|
|
901
|
+
request_options,
|
|
902
|
+
),
|
|
903
|
+
)
|
|
904
|
+
|
|
905
|
+
def jobs(
|
|
906
|
+
self,
|
|
907
|
+
*,
|
|
908
|
+
id: str,
|
|
909
|
+
request_options: RequestOptions | None = None,
|
|
910
|
+
) -> JsonResponse:
|
|
911
|
+
"""Jobs. Poll the status, progress (0–100) and result of a job started with is_async=true. Polling is free. Poll until status is terminal: CompletedJob, Error, NotFound or BadRequest.
|
|
912
|
+
|
|
913
|
+
``GET /v1/jobs/{id}``
|
|
914
|
+
|
|
915
|
+
Args:
|
|
916
|
+
id: The job_id returned by an endpoint called with is_async=true.
|
|
917
|
+
"""
|
|
918
|
+
return cast(JsonResponse, self._call("jobs", {"id": id}, request_options))
|
|
919
|
+
|
|
920
|
+
def search(
|
|
921
|
+
self,
|
|
922
|
+
*,
|
|
923
|
+
query: str,
|
|
924
|
+
engines: str | None = None,
|
|
925
|
+
gl: str | None = None,
|
|
926
|
+
hl: str | None = None,
|
|
927
|
+
fields: str | None = None,
|
|
928
|
+
is_async: bool | None = None,
|
|
929
|
+
soft_fail: bool | None = None,
|
|
930
|
+
request_options: RequestOptions | None = None,
|
|
931
|
+
) -> JsonResponse:
|
|
932
|
+
"""Search. One call walks engines in order and returns the first organic results. engines=auto tries Google, then Brave, Bing, DuckDuckGo, Yahoo, and Baidu. Omitted gl is us and omitted hl is en. There is no page parameter: the response is always pag… Credit cost: 1 credit per call.
|
|
933
|
+
|
|
934
|
+
``GET / POST /v1/search``
|
|
935
|
+
|
|
936
|
+
Args:
|
|
937
|
+
query: Search query.
|
|
938
|
+
engines: Engine order. Default auto tries google, brave, bing, duckduckgo, yahoo, then baidu. A comma-separated list is followed as given. ddg and duck mean duckduckgo. Unknown names are ignored.
|
|
939
|
+
gl: Country code. Defaults to us when omitted. For example us, fr, gb, de.
|
|
940
|
+
hl: Language code. Defaults to en when omitted. For example en, fr, de.
|
|
941
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
942
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
943
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
944
|
+
"""
|
|
945
|
+
return cast(
|
|
946
|
+
JsonResponse,
|
|
947
|
+
self._call(
|
|
948
|
+
"search",
|
|
949
|
+
{
|
|
950
|
+
"query": query,
|
|
951
|
+
"engines": engines,
|
|
952
|
+
"gl": gl,
|
|
953
|
+
"hl": hl,
|
|
954
|
+
"fields": fields,
|
|
955
|
+
"is_async": is_async,
|
|
956
|
+
"soft_fail": soft_fail,
|
|
957
|
+
},
|
|
958
|
+
request_options,
|
|
959
|
+
),
|
|
960
|
+
)
|
|
961
|
+
|
|
962
|
+
def stats(
|
|
963
|
+
self,
|
|
964
|
+
*,
|
|
965
|
+
engine: str | None = None,
|
|
966
|
+
path: str | None = None,
|
|
967
|
+
request_options: RequestOptions | None = None,
|
|
968
|
+
) -> JsonResponse:
|
|
969
|
+
"""Stats. Infrastructure health for an engine or endpoint over the last hour. Not scoped to your account or tenant. Enabled per account: HTTP 403 means contact support to activate it.
|
|
970
|
+
|
|
971
|
+
``GET /v1/stats``
|
|
972
|
+
|
|
973
|
+
Args:
|
|
974
|
+
engine: API family to check, for example google. Provide at least engine or path.
|
|
975
|
+
path: Specific endpoint to check, for example /v1/google/search. If you also pass engine, use an endpoint from that API.
|
|
976
|
+
"""
|
|
977
|
+
return cast(
|
|
978
|
+
JsonResponse, self._call("stats", {"engine": engine, "path": path}, request_options)
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
def usage(
|
|
982
|
+
self,
|
|
983
|
+
*,
|
|
984
|
+
request_options: RequestOptions | None = None,
|
|
985
|
+
) -> JsonResponse:
|
|
986
|
+
"""Usage. Retrieve real-time usage statistics and credit balance for your Autom account.
|
|
987
|
+
|
|
988
|
+
``GET /v1/usage``
|
|
989
|
+
"""
|
|
990
|
+
return cast(JsonResponse, self._call("usage", {}, request_options))
|
|
991
|
+
|
|
992
|
+
def yahoo_search(
|
|
993
|
+
self,
|
|
994
|
+
*,
|
|
995
|
+
query: str,
|
|
996
|
+
page: int | float | None = None,
|
|
997
|
+
gl: str | None = None,
|
|
998
|
+
hl: str | None = None,
|
|
999
|
+
fields: str | None = None,
|
|
1000
|
+
is_async: bool | None = None,
|
|
1001
|
+
soft_fail: bool | None = None,
|
|
1002
|
+
request_options: RequestOptions | None = None,
|
|
1003
|
+
) -> JsonResponse:
|
|
1004
|
+
"""Yahoo Search. Query Yahoo via API and retrieve structured organic results with country and language. Credit cost: 1 credit per call.
|
|
1005
|
+
|
|
1006
|
+
``GET / POST /v1/yahoo/search``
|
|
1007
|
+
|
|
1008
|
+
Args:
|
|
1009
|
+
query: Search query sent to Yahoo Search.
|
|
1010
|
+
page: Page number. Page 1 is the first page of results.
|
|
1011
|
+
gl: Country code, for example us, fr, gb, de, jp.
|
|
1012
|
+
hl: Language code, for example en, fr, de, ja, zh.
|
|
1013
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1014
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1015
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1016
|
+
"""
|
|
1017
|
+
return cast(
|
|
1018
|
+
JsonResponse,
|
|
1019
|
+
self._call(
|
|
1020
|
+
"yahoo_search",
|
|
1021
|
+
{
|
|
1022
|
+
"query": query,
|
|
1023
|
+
"page": page,
|
|
1024
|
+
"gl": gl,
|
|
1025
|
+
"hl": hl,
|
|
1026
|
+
"fields": fields,
|
|
1027
|
+
"is_async": is_async,
|
|
1028
|
+
"soft_fail": soft_fail,
|
|
1029
|
+
},
|
|
1030
|
+
request_options,
|
|
1031
|
+
),
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
class _AsyncOperations:
|
|
1036
|
+
"""Generated Autom endpoint methods."""
|
|
1037
|
+
|
|
1038
|
+
__slots__ = ()
|
|
1039
|
+
|
|
1040
|
+
async def _call(
|
|
1041
|
+
self, name: str, params: dict[str, Any], options: RequestOptions | None
|
|
1042
|
+
) -> APIResponse:
|
|
1043
|
+
raise NotImplementedError
|
|
1044
|
+
|
|
1045
|
+
async def bing_search(
|
|
1046
|
+
self,
|
|
1047
|
+
*,
|
|
1048
|
+
query: str,
|
|
1049
|
+
page: int | float | None = None,
|
|
1050
|
+
num: int | float | None = None,
|
|
1051
|
+
location: str | None = None,
|
|
1052
|
+
lat: int | float | None = None,
|
|
1053
|
+
lon: int | float | None = None,
|
|
1054
|
+
mkt: str | None = None,
|
|
1055
|
+
cc: str | None = None,
|
|
1056
|
+
fields: str | None = None,
|
|
1057
|
+
is_async: bool | None = None,
|
|
1058
|
+
soft_fail: bool | None = None,
|
|
1059
|
+
request_options: RequestOptions | None = None,
|
|
1060
|
+
) -> JsonResponse:
|
|
1061
|
+
"""Bing Search. Query Bing Search via API and retrieve structured organic results (title, link, snippet, position). Credit cost: 1 credit per call.
|
|
1062
|
+
|
|
1063
|
+
``GET / POST /v1/bing/search``
|
|
1064
|
+
|
|
1065
|
+
Args:
|
|
1066
|
+
query: The search query you want to run on Bing.
|
|
1067
|
+
page: Page number for pagination (1 = first page).
|
|
1068
|
+
num: Number of results per page (e.g. 10, 20, 50). This value is a suggestion.
|
|
1069
|
+
location: Search origin location (e.g. city).
|
|
1070
|
+
lat: GPS latitude for the search origin.
|
|
1071
|
+
lon: GPS longitude for the search origin.
|
|
1072
|
+
mkt: Market code where results come from (e.g. en-US). Cannot be used together with cc.
|
|
1073
|
+
cc: Country code to search from (2-letter ISO 3166-1). Cannot be used together with mkt.
|
|
1074
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1075
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1076
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1077
|
+
"""
|
|
1078
|
+
return cast(
|
|
1079
|
+
JsonResponse,
|
|
1080
|
+
await self._call(
|
|
1081
|
+
"bing_search",
|
|
1082
|
+
{
|
|
1083
|
+
"query": query,
|
|
1084
|
+
"page": page,
|
|
1085
|
+
"num": num,
|
|
1086
|
+
"location": location,
|
|
1087
|
+
"lat": lat,
|
|
1088
|
+
"lon": lon,
|
|
1089
|
+
"mkt": mkt,
|
|
1090
|
+
"cc": cc,
|
|
1091
|
+
"fields": fields,
|
|
1092
|
+
"is_async": is_async,
|
|
1093
|
+
"soft_fail": soft_fail,
|
|
1094
|
+
},
|
|
1095
|
+
request_options,
|
|
1096
|
+
),
|
|
1097
|
+
)
|
|
1098
|
+
|
|
1099
|
+
async def brave_images(
|
|
1100
|
+
self,
|
|
1101
|
+
*,
|
|
1102
|
+
query: str,
|
|
1103
|
+
page: int | float | None = None,
|
|
1104
|
+
gl: str | None = None,
|
|
1105
|
+
hl: str | None = None,
|
|
1106
|
+
safe: str | None = None,
|
|
1107
|
+
fields: str | None = None,
|
|
1108
|
+
is_async: bool | None = None,
|
|
1109
|
+
soft_fail: bool | None = None,
|
|
1110
|
+
request_options: RequestOptions | None = None,
|
|
1111
|
+
) -> JsonResponse:
|
|
1112
|
+
"""Brave Images. Search Brave Images via API and retrieve structured image results with pagination and SafeSearch. Credit cost: 1 credit per call.
|
|
1113
|
+
|
|
1114
|
+
``GET / POST /v1/brave/images``
|
|
1115
|
+
|
|
1116
|
+
Args:
|
|
1117
|
+
query: The search query you want to run on Brave Images.
|
|
1118
|
+
page: Page number for pagination (50 results per page).
|
|
1119
|
+
gl: Country code (e.g. fr, us). Mapped to Brave country.
|
|
1120
|
+
hl: Language code (e.g. fr, en). Mapped to Brave lang.
|
|
1121
|
+
safe: SafeSearch: active | off | moderate | strict. Google-style active maps to Brave strict.
|
|
1122
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1123
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1124
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1125
|
+
"""
|
|
1126
|
+
return cast(
|
|
1127
|
+
JsonResponse,
|
|
1128
|
+
await self._call(
|
|
1129
|
+
"brave_images",
|
|
1130
|
+
{
|
|
1131
|
+
"query": query,
|
|
1132
|
+
"page": page,
|
|
1133
|
+
"gl": gl,
|
|
1134
|
+
"hl": hl,
|
|
1135
|
+
"safe": safe,
|
|
1136
|
+
"fields": fields,
|
|
1137
|
+
"is_async": is_async,
|
|
1138
|
+
"soft_fail": soft_fail,
|
|
1139
|
+
},
|
|
1140
|
+
request_options,
|
|
1141
|
+
),
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
async def brave_search(
|
|
1145
|
+
self,
|
|
1146
|
+
*,
|
|
1147
|
+
query: str,
|
|
1148
|
+
page: int | float | None = None,
|
|
1149
|
+
gl: str | None = None,
|
|
1150
|
+
hl: str | None = None,
|
|
1151
|
+
fields: str | None = None,
|
|
1152
|
+
is_async: bool | None = None,
|
|
1153
|
+
soft_fail: bool | None = None,
|
|
1154
|
+
request_options: RequestOptions | None = None,
|
|
1155
|
+
) -> JsonResponse:
|
|
1156
|
+
"""Brave Search. Search Brave Search via API and retrieve structured organic results with pagination. Credit cost: 1 credit per call.
|
|
1157
|
+
|
|
1158
|
+
``GET / POST /v1/brave/search``
|
|
1159
|
+
|
|
1160
|
+
Args:
|
|
1161
|
+
query: The search query you want to run on Brave Search.
|
|
1162
|
+
page: Page number for pagination.
|
|
1163
|
+
gl: Country code, for example us, fr, gb, de.
|
|
1164
|
+
hl: Language code, for example en, fr, de.
|
|
1165
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1166
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1167
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1168
|
+
"""
|
|
1169
|
+
return cast(
|
|
1170
|
+
JsonResponse,
|
|
1171
|
+
await self._call(
|
|
1172
|
+
"brave_search",
|
|
1173
|
+
{
|
|
1174
|
+
"query": query,
|
|
1175
|
+
"page": page,
|
|
1176
|
+
"gl": gl,
|
|
1177
|
+
"hl": hl,
|
|
1178
|
+
"fields": fields,
|
|
1179
|
+
"is_async": is_async,
|
|
1180
|
+
"soft_fail": soft_fail,
|
|
1181
|
+
},
|
|
1182
|
+
request_options,
|
|
1183
|
+
),
|
|
1184
|
+
)
|
|
1185
|
+
|
|
1186
|
+
async def brave_videos(
|
|
1187
|
+
self,
|
|
1188
|
+
*,
|
|
1189
|
+
query: str,
|
|
1190
|
+
page: int | float | None = None,
|
|
1191
|
+
gl: str | None = None,
|
|
1192
|
+
hl: str | None = None,
|
|
1193
|
+
safe: str | None = None,
|
|
1194
|
+
fields: str | None = None,
|
|
1195
|
+
is_async: bool | None = None,
|
|
1196
|
+
soft_fail: bool | None = None,
|
|
1197
|
+
request_options: RequestOptions | None = None,
|
|
1198
|
+
) -> JsonResponse:
|
|
1199
|
+
"""Brave Videos. Search Brave Videos via API and retrieve structured video results with pagination and SafeSearch. Credit cost: 1 credit per call.
|
|
1200
|
+
|
|
1201
|
+
``GET / POST /v1/brave/videos``
|
|
1202
|
+
|
|
1203
|
+
Args:
|
|
1204
|
+
query: The search query you want to run on Brave Videos.
|
|
1205
|
+
page: Page number for pagination.
|
|
1206
|
+
gl: Country code (e.g. fr, us). Mapped to Brave country.
|
|
1207
|
+
hl: Language code (e.g. fr, en). Mapped to Brave lang.
|
|
1208
|
+
safe: SafeSearch: active | off | moderate | strict. Google-style active maps to Brave strict.
|
|
1209
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1210
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1211
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1212
|
+
"""
|
|
1213
|
+
return cast(
|
|
1214
|
+
JsonResponse,
|
|
1215
|
+
await self._call(
|
|
1216
|
+
"brave_videos",
|
|
1217
|
+
{
|
|
1218
|
+
"query": query,
|
|
1219
|
+
"page": page,
|
|
1220
|
+
"gl": gl,
|
|
1221
|
+
"hl": hl,
|
|
1222
|
+
"safe": safe,
|
|
1223
|
+
"fields": fields,
|
|
1224
|
+
"is_async": is_async,
|
|
1225
|
+
"soft_fail": soft_fail,
|
|
1226
|
+
},
|
|
1227
|
+
request_options,
|
|
1228
|
+
),
|
|
1229
|
+
)
|
|
1230
|
+
|
|
1231
|
+
async def duckduckgo_search(
|
|
1232
|
+
self,
|
|
1233
|
+
*,
|
|
1234
|
+
query: str,
|
|
1235
|
+
page: int | float | None = None,
|
|
1236
|
+
gl: str | None = None,
|
|
1237
|
+
hl: str | None = None,
|
|
1238
|
+
fields: str | None = None,
|
|
1239
|
+
is_async: bool | None = None,
|
|
1240
|
+
soft_fail: bool | None = None,
|
|
1241
|
+
request_options: RequestOptions | None = None,
|
|
1242
|
+
) -> JsonResponse:
|
|
1243
|
+
"""DuckDuckGo Search. Query DuckDuckGo via API and retrieve structured organic results with region and language. Credit cost: 1 credit per call.
|
|
1244
|
+
|
|
1245
|
+
``GET / POST /v1/duckduckgo/search``
|
|
1246
|
+
|
|
1247
|
+
Args:
|
|
1248
|
+
query: Search query sent to DuckDuckGo Search.
|
|
1249
|
+
page: Page number. Page 1 is the first page of results.
|
|
1250
|
+
gl: Country code, for example us, fr, gb, de, jp.
|
|
1251
|
+
hl: Language code, for example en, fr, de, ja, zh.
|
|
1252
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1253
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1254
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1255
|
+
"""
|
|
1256
|
+
return cast(
|
|
1257
|
+
JsonResponse,
|
|
1258
|
+
await self._call(
|
|
1259
|
+
"duckduckgo_search",
|
|
1260
|
+
{
|
|
1261
|
+
"query": query,
|
|
1262
|
+
"page": page,
|
|
1263
|
+
"gl": gl,
|
|
1264
|
+
"hl": hl,
|
|
1265
|
+
"fields": fields,
|
|
1266
|
+
"is_async": is_async,
|
|
1267
|
+
"soft_fail": soft_fail,
|
|
1268
|
+
},
|
|
1269
|
+
request_options,
|
|
1270
|
+
),
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1273
|
+
async def finder_google_countries(
|
|
1274
|
+
self,
|
|
1275
|
+
*,
|
|
1276
|
+
query: str,
|
|
1277
|
+
fields: str | None = None,
|
|
1278
|
+
is_async: bool | None = None,
|
|
1279
|
+
soft_fail: bool | None = None,
|
|
1280
|
+
request_options: RequestOptions | None = None,
|
|
1281
|
+
) -> JsonResponse:
|
|
1282
|
+
"""Google Countries. Search Google countries and retrieve country codes (free Finder endpoint).
|
|
1283
|
+
|
|
1284
|
+
``GET /v1/finder/google-countries``
|
|
1285
|
+
|
|
1286
|
+
Args:
|
|
1287
|
+
query: Filter countries by a search string (case-insensitive). Returns all countries whose code or name matches the specified query.
|
|
1288
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1289
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1290
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1291
|
+
"""
|
|
1292
|
+
return cast(
|
|
1293
|
+
JsonResponse,
|
|
1294
|
+
await self._call(
|
|
1295
|
+
"finder_google_countries",
|
|
1296
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
1297
|
+
request_options,
|
|
1298
|
+
),
|
|
1299
|
+
)
|
|
1300
|
+
|
|
1301
|
+
async def finder_google_languages(
|
|
1302
|
+
self,
|
|
1303
|
+
*,
|
|
1304
|
+
query: str,
|
|
1305
|
+
fields: str | None = None,
|
|
1306
|
+
is_async: bool | None = None,
|
|
1307
|
+
soft_fail: bool | None = None,
|
|
1308
|
+
request_options: RequestOptions | None = None,
|
|
1309
|
+
) -> JsonResponse:
|
|
1310
|
+
"""Google Languages. Search Google languages and retrieve language codes (free Finder endpoint).
|
|
1311
|
+
|
|
1312
|
+
``GET /v1/finder/google-languages``
|
|
1313
|
+
|
|
1314
|
+
Args:
|
|
1315
|
+
query: Filter languages by a search string (case-insensitive). Returns all languages whose names contain the specified string.
|
|
1316
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1317
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1318
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1319
|
+
"""
|
|
1320
|
+
return cast(
|
|
1321
|
+
JsonResponse,
|
|
1322
|
+
await self._call(
|
|
1323
|
+
"finder_google_languages",
|
|
1324
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
1325
|
+
request_options,
|
|
1326
|
+
),
|
|
1327
|
+
)
|
|
1328
|
+
|
|
1329
|
+
async def finder_google_locations(
|
|
1330
|
+
self,
|
|
1331
|
+
*,
|
|
1332
|
+
query: str,
|
|
1333
|
+
fields: str | None = None,
|
|
1334
|
+
is_async: bool | None = None,
|
|
1335
|
+
soft_fail: bool | None = None,
|
|
1336
|
+
request_options: RequestOptions | None = None,
|
|
1337
|
+
) -> JsonResponse:
|
|
1338
|
+
"""Google Locations. Find supported Google locations and retrieve location IDs and country codes (free endpoint).
|
|
1339
|
+
|
|
1340
|
+
``GET /v1/finder/google-locations``
|
|
1341
|
+
|
|
1342
|
+
Args:
|
|
1343
|
+
query: Search locations supported by Piloterr (cities, countries, etc.) by providing a query string. Returns matching locations ordered by reach.
|
|
1344
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1345
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1346
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1347
|
+
"""
|
|
1348
|
+
return cast(
|
|
1349
|
+
JsonResponse,
|
|
1350
|
+
await self._call(
|
|
1351
|
+
"finder_google_locations",
|
|
1352
|
+
{"query": query, "fields": fields, "is_async": is_async, "soft_fail": soft_fail},
|
|
1353
|
+
request_options,
|
|
1354
|
+
),
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
async def google_images(
|
|
1358
|
+
self,
|
|
1359
|
+
*,
|
|
1360
|
+
query: str,
|
|
1361
|
+
page: int | float | None = None,
|
|
1362
|
+
google_domain: str | None = None,
|
|
1363
|
+
gl: str | None = None,
|
|
1364
|
+
hl: str | None = None,
|
|
1365
|
+
cr: str | None = None,
|
|
1366
|
+
lr: str | None = None,
|
|
1367
|
+
async_: bool | None = None,
|
|
1368
|
+
safe: str | None = None,
|
|
1369
|
+
fields: str | None = None,
|
|
1370
|
+
is_async: bool | None = None,
|
|
1371
|
+
soft_fail: bool | None = None,
|
|
1372
|
+
request_options: RequestOptions | None = None,
|
|
1373
|
+
) -> JsonResponse:
|
|
1374
|
+
"""Google Images. Search Google Images via API and retrieve image results (URLs, titles, sources, dimensions). Credit cost: 1 credit per call.
|
|
1375
|
+
|
|
1376
|
+
``GET / POST /v1/google/images``
|
|
1377
|
+
|
|
1378
|
+
Args:
|
|
1379
|
+
query: Query you want to search on Google Images (e.g. "lion", "nike logo", "modern house exterior").
|
|
1380
|
+
page: Page number for pagination (1 = first page).
|
|
1381
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1382
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1383
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1384
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1385
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1386
|
+
async_: If true, returns a job and lets you fetch results asynchronously.
|
|
1387
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
1388
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1389
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1390
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1391
|
+
"""
|
|
1392
|
+
return cast(
|
|
1393
|
+
JsonResponse,
|
|
1394
|
+
await self._call(
|
|
1395
|
+
"google_images",
|
|
1396
|
+
{
|
|
1397
|
+
"query": query,
|
|
1398
|
+
"page": page,
|
|
1399
|
+
"google_domain": google_domain,
|
|
1400
|
+
"gl": gl,
|
|
1401
|
+
"hl": hl,
|
|
1402
|
+
"cr": cr,
|
|
1403
|
+
"lr": lr,
|
|
1404
|
+
"async": async_,
|
|
1405
|
+
"safe": safe,
|
|
1406
|
+
"fields": fields,
|
|
1407
|
+
"is_async": is_async,
|
|
1408
|
+
"soft_fail": soft_fail,
|
|
1409
|
+
},
|
|
1410
|
+
request_options,
|
|
1411
|
+
),
|
|
1412
|
+
)
|
|
1413
|
+
|
|
1414
|
+
async def google_jobs(
|
|
1415
|
+
self,
|
|
1416
|
+
*,
|
|
1417
|
+
query: str,
|
|
1418
|
+
uds: str | None = None,
|
|
1419
|
+
lrad: int | float | None = None,
|
|
1420
|
+
ltype: int | float | None = None,
|
|
1421
|
+
location: str | None = None,
|
|
1422
|
+
uule: str | None = None,
|
|
1423
|
+
google_domain: str | None = None,
|
|
1424
|
+
gl: str | None = None,
|
|
1425
|
+
hl: str | None = None,
|
|
1426
|
+
cr: str | None = None,
|
|
1427
|
+
lr: str | None = None,
|
|
1428
|
+
next_page_token: str | None = None,
|
|
1429
|
+
fields: str | None = None,
|
|
1430
|
+
is_async: bool | None = None,
|
|
1431
|
+
soft_fail: bool | None = None,
|
|
1432
|
+
request_options: RequestOptions | None = None,
|
|
1433
|
+
) -> JsonResponse:
|
|
1434
|
+
"""Google Jobs. Scrape Google Jobs results via API and retrieve structured job listings with title, company, location, and pagination. Credit cost: 1 credit per call.
|
|
1435
|
+
|
|
1436
|
+
``GET / POST /v1/google/jobs``
|
|
1437
|
+
|
|
1438
|
+
Args:
|
|
1439
|
+
query: The job search query to run on Google Jobs (e.g. developer, barista new york).
|
|
1440
|
+
uds: Advanced search filters string for Google Jobs (encoded filter chips).
|
|
1441
|
+
lrad: Search radius in kilometers. Does not strictly limit the radius, but influences result proximity.
|
|
1442
|
+
ltype: Filter results by work type. Set to 1 to filter for work from home / remote jobs.
|
|
1443
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
1444
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
1445
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1446
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1447
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1448
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1449
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1450
|
+
next_page_token: Token to fetch the next page of results. Returned in the serpapi_pagination.next_page_token field of the previous response.
|
|
1451
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1452
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1453
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1454
|
+
"""
|
|
1455
|
+
return cast(
|
|
1456
|
+
JsonResponse,
|
|
1457
|
+
await self._call(
|
|
1458
|
+
"google_jobs",
|
|
1459
|
+
{
|
|
1460
|
+
"query": query,
|
|
1461
|
+
"uds": uds,
|
|
1462
|
+
"lrad": lrad,
|
|
1463
|
+
"ltype": ltype,
|
|
1464
|
+
"location": location,
|
|
1465
|
+
"uule": uule,
|
|
1466
|
+
"google_domain": google_domain,
|
|
1467
|
+
"gl": gl,
|
|
1468
|
+
"hl": hl,
|
|
1469
|
+
"cr": cr,
|
|
1470
|
+
"lr": lr,
|
|
1471
|
+
"next_page_token": next_page_token,
|
|
1472
|
+
"fields": fields,
|
|
1473
|
+
"is_async": is_async,
|
|
1474
|
+
"soft_fail": soft_fail,
|
|
1475
|
+
},
|
|
1476
|
+
request_options,
|
|
1477
|
+
),
|
|
1478
|
+
)
|
|
1479
|
+
|
|
1480
|
+
async def google_maps(
|
|
1481
|
+
self,
|
|
1482
|
+
*,
|
|
1483
|
+
query: str,
|
|
1484
|
+
page: int | float | None = None,
|
|
1485
|
+
google_domain: str | None = None,
|
|
1486
|
+
gl: str | None = None,
|
|
1487
|
+
hl: str | None = None,
|
|
1488
|
+
cr: str | None = None,
|
|
1489
|
+
lr: str | None = None,
|
|
1490
|
+
ll: str | None = None,
|
|
1491
|
+
fields: str | None = None,
|
|
1492
|
+
is_async: bool | None = None,
|
|
1493
|
+
soft_fail: bool | None = None,
|
|
1494
|
+
request_options: RequestOptions | None = None,
|
|
1495
|
+
) -> JsonResponse:
|
|
1496
|
+
"""Google Maps. Search Google Maps via API and retrieve structured place results (address, website, phone). Credit cost: 1 credit per call.
|
|
1497
|
+
|
|
1498
|
+
``GET / POST /v1/google/maps``
|
|
1499
|
+
|
|
1500
|
+
Args:
|
|
1501
|
+
query: Search query for Google Maps (e.g. business type, brand, or place name).
|
|
1502
|
+
page: Page number for pagination (1 = first page).
|
|
1503
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1504
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1505
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1506
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1507
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1508
|
+
ll: Map center / geo hint in Google format (e.g. @43.5131985,1.4600501,60m). Helps focus results around a coordinate and zoom radius.
|
|
1509
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1510
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1511
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1512
|
+
"""
|
|
1513
|
+
return cast(
|
|
1514
|
+
JsonResponse,
|
|
1515
|
+
await self._call(
|
|
1516
|
+
"google_maps",
|
|
1517
|
+
{
|
|
1518
|
+
"query": query,
|
|
1519
|
+
"page": page,
|
|
1520
|
+
"google_domain": google_domain,
|
|
1521
|
+
"gl": gl,
|
|
1522
|
+
"hl": hl,
|
|
1523
|
+
"cr": cr,
|
|
1524
|
+
"lr": lr,
|
|
1525
|
+
"ll": ll,
|
|
1526
|
+
"fields": fields,
|
|
1527
|
+
"is_async": is_async,
|
|
1528
|
+
"soft_fail": soft_fail,
|
|
1529
|
+
},
|
|
1530
|
+
request_options,
|
|
1531
|
+
),
|
|
1532
|
+
)
|
|
1533
|
+
|
|
1534
|
+
async def google_news(
|
|
1535
|
+
self,
|
|
1536
|
+
*,
|
|
1537
|
+
query: str,
|
|
1538
|
+
page: int | float | None = None,
|
|
1539
|
+
num: int | float | None = None,
|
|
1540
|
+
google_domain: str | None = None,
|
|
1541
|
+
gl: str | None = None,
|
|
1542
|
+
hl: str | None = None,
|
|
1543
|
+
cr: str | None = None,
|
|
1544
|
+
lr: str | None = None,
|
|
1545
|
+
fields: str | None = None,
|
|
1546
|
+
is_async: bool | None = None,
|
|
1547
|
+
soft_fail: bool | None = None,
|
|
1548
|
+
request_options: RequestOptions | None = None,
|
|
1549
|
+
) -> JsonResponse:
|
|
1550
|
+
"""Google News. Search Google News via API and retrieve structured news results with pagination. Credit cost: 1 credit per call.
|
|
1551
|
+
|
|
1552
|
+
``GET / POST /v1/google/news``
|
|
1553
|
+
|
|
1554
|
+
Args:
|
|
1555
|
+
query: Query to search on Google News (keywords, company, topic).
|
|
1556
|
+
page: Page number for pagination (1 = first page).
|
|
1557
|
+
num: Maximum number of results per page (e.g. 10).
|
|
1558
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1559
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1560
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1561
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1562
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1563
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1564
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1565
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1566
|
+
"""
|
|
1567
|
+
return cast(
|
|
1568
|
+
JsonResponse,
|
|
1569
|
+
await self._call(
|
|
1570
|
+
"google_news",
|
|
1571
|
+
{
|
|
1572
|
+
"query": query,
|
|
1573
|
+
"page": page,
|
|
1574
|
+
"num": num,
|
|
1575
|
+
"google_domain": google_domain,
|
|
1576
|
+
"gl": gl,
|
|
1577
|
+
"hl": hl,
|
|
1578
|
+
"cr": cr,
|
|
1579
|
+
"lr": lr,
|
|
1580
|
+
"fields": fields,
|
|
1581
|
+
"is_async": is_async,
|
|
1582
|
+
"soft_fail": soft_fail,
|
|
1583
|
+
},
|
|
1584
|
+
request_options,
|
|
1585
|
+
),
|
|
1586
|
+
)
|
|
1587
|
+
|
|
1588
|
+
async def google_search(
|
|
1589
|
+
self,
|
|
1590
|
+
*,
|
|
1591
|
+
query: str,
|
|
1592
|
+
tbs: str | None = None,
|
|
1593
|
+
safe: str | None = None,
|
|
1594
|
+
location: str | None = None,
|
|
1595
|
+
uule: str | None = None,
|
|
1596
|
+
google_domain: str | None = None,
|
|
1597
|
+
gl: str | None = None,
|
|
1598
|
+
hl: str | None = None,
|
|
1599
|
+
cr: str | None = None,
|
|
1600
|
+
lr: str | None = None,
|
|
1601
|
+
page: int | float | None = None,
|
|
1602
|
+
num: int | float | None = None,
|
|
1603
|
+
fields: str | None = None,
|
|
1604
|
+
is_async: bool | None = None,
|
|
1605
|
+
soft_fail: bool | None = None,
|
|
1606
|
+
request_options: RequestOptions | None = None,
|
|
1607
|
+
) -> JsonResponse:
|
|
1608
|
+
"""Google Search. Scrape Google Search results via API and retrieve structured SERP data with pagination. Credit cost: 1 credit per call.
|
|
1609
|
+
|
|
1610
|
+
``GET / POST /v1/google/search``
|
|
1611
|
+
|
|
1612
|
+
Args:
|
|
1613
|
+
query: The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:).
|
|
1614
|
+
tbs: Advanced search filters string (e.g. time ranges: qdr:h last hour, qdr:d last day, qdr:w last week, qdr:m last month, qdr:y last year).
|
|
1615
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
1616
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
1617
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
1618
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1619
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1620
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1621
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1622
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1623
|
+
page: Page number / offset used for pagination.
|
|
1624
|
+
num: Maximum number of results to return per page (deprecated).
|
|
1625
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1626
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1627
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1628
|
+
"""
|
|
1629
|
+
return cast(
|
|
1630
|
+
JsonResponse,
|
|
1631
|
+
await self._call(
|
|
1632
|
+
"google_search",
|
|
1633
|
+
{
|
|
1634
|
+
"query": query,
|
|
1635
|
+
"tbs": tbs,
|
|
1636
|
+
"safe": safe,
|
|
1637
|
+
"location": location,
|
|
1638
|
+
"uule": uule,
|
|
1639
|
+
"google_domain": google_domain,
|
|
1640
|
+
"gl": gl,
|
|
1641
|
+
"hl": hl,
|
|
1642
|
+
"cr": cr,
|
|
1643
|
+
"lr": lr,
|
|
1644
|
+
"page": page,
|
|
1645
|
+
"num": num,
|
|
1646
|
+
"fields": fields,
|
|
1647
|
+
"is_async": is_async,
|
|
1648
|
+
"soft_fail": soft_fail,
|
|
1649
|
+
},
|
|
1650
|
+
request_options,
|
|
1651
|
+
),
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
async def google_search_ai(
|
|
1655
|
+
self,
|
|
1656
|
+
*,
|
|
1657
|
+
query: str,
|
|
1658
|
+
location: str | None = None,
|
|
1659
|
+
uule: str | None = None,
|
|
1660
|
+
google_domain: str | None = None,
|
|
1661
|
+
gl: str | None = None,
|
|
1662
|
+
hl: str | None = None,
|
|
1663
|
+
cr: str | None = None,
|
|
1664
|
+
lr: str | None = None,
|
|
1665
|
+
fields: str | None = None,
|
|
1666
|
+
is_async: bool | None = None,
|
|
1667
|
+
soft_fail: bool | None = None,
|
|
1668
|
+
request_options: RequestOptions | None = None,
|
|
1669
|
+
) -> JsonResponse:
|
|
1670
|
+
"""Google AI Mode. Query Google AI Mode via API. JSON with text_blocks, references, and shopping_results. Credit cost: 3 credits per call.
|
|
1671
|
+
|
|
1672
|
+
``GET / POST /v1/google/search/ai``
|
|
1673
|
+
|
|
1674
|
+
Args:
|
|
1675
|
+
query: The question or search query you want Google AI Mode to answer (supports advanced operators like site:, inurl:, intitle:).
|
|
1676
|
+
location: Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
|
|
1677
|
+
uule: Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
|
|
1678
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1679
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1680
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1681
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1682
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1683
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1684
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1685
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1686
|
+
"""
|
|
1687
|
+
return cast(
|
|
1688
|
+
JsonResponse,
|
|
1689
|
+
await self._call(
|
|
1690
|
+
"google_search_ai",
|
|
1691
|
+
{
|
|
1692
|
+
"query": query,
|
|
1693
|
+
"location": location,
|
|
1694
|
+
"uule": uule,
|
|
1695
|
+
"google_domain": google_domain,
|
|
1696
|
+
"gl": gl,
|
|
1697
|
+
"hl": hl,
|
|
1698
|
+
"cr": cr,
|
|
1699
|
+
"lr": lr,
|
|
1700
|
+
"fields": fields,
|
|
1701
|
+
"is_async": is_async,
|
|
1702
|
+
"soft_fail": soft_fail,
|
|
1703
|
+
},
|
|
1704
|
+
request_options,
|
|
1705
|
+
),
|
|
1706
|
+
)
|
|
1707
|
+
|
|
1708
|
+
async def google_search_autocomplete(
|
|
1709
|
+
self,
|
|
1710
|
+
*,
|
|
1711
|
+
query: str,
|
|
1712
|
+
cp: int | float | None = None,
|
|
1713
|
+
google_domain: str | None = None,
|
|
1714
|
+
gl: str | None = None,
|
|
1715
|
+
hl: str | None = None,
|
|
1716
|
+
cr: str | None = None,
|
|
1717
|
+
lr: str | None = None,
|
|
1718
|
+
fields: str | None = None,
|
|
1719
|
+
is_async: bool | None = None,
|
|
1720
|
+
soft_fail: bool | None = None,
|
|
1721
|
+
request_options: RequestOptions | None = None,
|
|
1722
|
+
) -> JsonResponse:
|
|
1723
|
+
"""Google Search Autocomplete. Get Google Search autocomplete suggestions via API for a given query. Credit cost: 1 credit per call.
|
|
1724
|
+
|
|
1725
|
+
``GET / POST /v1/google/search/autocomplete``
|
|
1726
|
+
|
|
1727
|
+
Args:
|
|
1728
|
+
query: The search query for which you want to get autocomplete suggestions.
|
|
1729
|
+
cp: Cursor position in the search query where you want to get autocomplete suggestions.
|
|
1730
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1731
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1732
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1733
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1734
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1735
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1736
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1737
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1738
|
+
"""
|
|
1739
|
+
return cast(
|
|
1740
|
+
JsonResponse,
|
|
1741
|
+
await self._call(
|
|
1742
|
+
"google_search_autocomplete",
|
|
1743
|
+
{
|
|
1744
|
+
"query": query,
|
|
1745
|
+
"cp": cp,
|
|
1746
|
+
"google_domain": google_domain,
|
|
1747
|
+
"gl": gl,
|
|
1748
|
+
"hl": hl,
|
|
1749
|
+
"cr": cr,
|
|
1750
|
+
"lr": lr,
|
|
1751
|
+
"fields": fields,
|
|
1752
|
+
"is_async": is_async,
|
|
1753
|
+
"soft_fail": soft_fail,
|
|
1754
|
+
},
|
|
1755
|
+
request_options,
|
|
1756
|
+
),
|
|
1757
|
+
)
|
|
1758
|
+
|
|
1759
|
+
async def google_search_light(
|
|
1760
|
+
self,
|
|
1761
|
+
*,
|
|
1762
|
+
query: str,
|
|
1763
|
+
google_domain: str | None = None,
|
|
1764
|
+
gl: str | None = None,
|
|
1765
|
+
hl: str | None = None,
|
|
1766
|
+
cr: str | None = None,
|
|
1767
|
+
lr: str | None = None,
|
|
1768
|
+
fields: str | None = None,
|
|
1769
|
+
is_async: bool | None = None,
|
|
1770
|
+
soft_fail: bool | None = None,
|
|
1771
|
+
request_options: RequestOptions | None = None,
|
|
1772
|
+
) -> JsonResponse:
|
|
1773
|
+
"""Google Search Light. Scrape lightweight Google Search results via API: fast, cost-efficient, organic results only. Credit cost: 1 credit per call.
|
|
1774
|
+
|
|
1775
|
+
``GET / POST /v1/google/search/light``
|
|
1776
|
+
|
|
1777
|
+
Args:
|
|
1778
|
+
query: The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:).
|
|
1779
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1780
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1781
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1782
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1783
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1784
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1785
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1786
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1787
|
+
"""
|
|
1788
|
+
return cast(
|
|
1789
|
+
JsonResponse,
|
|
1790
|
+
await self._call(
|
|
1791
|
+
"google_search_light",
|
|
1792
|
+
{
|
|
1793
|
+
"query": query,
|
|
1794
|
+
"google_domain": google_domain,
|
|
1795
|
+
"gl": gl,
|
|
1796
|
+
"hl": hl,
|
|
1797
|
+
"cr": cr,
|
|
1798
|
+
"lr": lr,
|
|
1799
|
+
"fields": fields,
|
|
1800
|
+
"is_async": is_async,
|
|
1801
|
+
"soft_fail": soft_fail,
|
|
1802
|
+
},
|
|
1803
|
+
request_options,
|
|
1804
|
+
),
|
|
1805
|
+
)
|
|
1806
|
+
|
|
1807
|
+
async def google_shopping(
|
|
1808
|
+
self,
|
|
1809
|
+
*,
|
|
1810
|
+
query: str,
|
|
1811
|
+
page: int | float | None = None,
|
|
1812
|
+
location: str | None = None,
|
|
1813
|
+
uule: str | None = None,
|
|
1814
|
+
google_domain: str | None = None,
|
|
1815
|
+
gl: str | None = None,
|
|
1816
|
+
hl: str | None = None,
|
|
1817
|
+
cr: str | None = None,
|
|
1818
|
+
lr: str | None = None,
|
|
1819
|
+
safe: str | None = None,
|
|
1820
|
+
fields: str | None = None,
|
|
1821
|
+
is_async: bool | None = None,
|
|
1822
|
+
soft_fail: bool | None = None,
|
|
1823
|
+
request_options: RequestOptions | None = None,
|
|
1824
|
+
) -> JsonResponse:
|
|
1825
|
+
"""Google Shopping. Scrape Google Shopping results via API and retrieve structured product listings with prices, ratings, and merchant data. Credit cost: 1 credit per call.
|
|
1826
|
+
|
|
1827
|
+
``GET / POST /v1/google/shopping``
|
|
1828
|
+
|
|
1829
|
+
Args:
|
|
1830
|
+
query: Query to search on Google Shopping (product name, brand, category).
|
|
1831
|
+
page: Page number for pagination (1 = first page).
|
|
1832
|
+
location: Location to localize results (e.g. New York, United States). Generates a UULE parameter automatically.
|
|
1833
|
+
uule: Encoded location parameter (UULE). Use location instead if you don't have a pre-encoded value.
|
|
1834
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1835
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1836
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1837
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1838
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1839
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
1840
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1841
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1842
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1843
|
+
"""
|
|
1844
|
+
return cast(
|
|
1845
|
+
JsonResponse,
|
|
1846
|
+
await self._call(
|
|
1847
|
+
"google_shopping",
|
|
1848
|
+
{
|
|
1849
|
+
"query": query,
|
|
1850
|
+
"page": page,
|
|
1851
|
+
"location": location,
|
|
1852
|
+
"uule": uule,
|
|
1853
|
+
"google_domain": google_domain,
|
|
1854
|
+
"gl": gl,
|
|
1855
|
+
"hl": hl,
|
|
1856
|
+
"cr": cr,
|
|
1857
|
+
"lr": lr,
|
|
1858
|
+
"safe": safe,
|
|
1859
|
+
"fields": fields,
|
|
1860
|
+
"is_async": is_async,
|
|
1861
|
+
"soft_fail": soft_fail,
|
|
1862
|
+
},
|
|
1863
|
+
request_options,
|
|
1864
|
+
),
|
|
1865
|
+
)
|
|
1866
|
+
|
|
1867
|
+
async def google_videos(
|
|
1868
|
+
self,
|
|
1869
|
+
*,
|
|
1870
|
+
query: str,
|
|
1871
|
+
page: int | float,
|
|
1872
|
+
location: str | None = None,
|
|
1873
|
+
uule: str | None = None,
|
|
1874
|
+
google_domain: str | None = None,
|
|
1875
|
+
gl: str | None = None,
|
|
1876
|
+
hl: str | None = None,
|
|
1877
|
+
cr: str | None = None,
|
|
1878
|
+
lr: str | None = None,
|
|
1879
|
+
num: int | float | None = None,
|
|
1880
|
+
safe: str | None = None,
|
|
1881
|
+
fields: str | None = None,
|
|
1882
|
+
is_async: bool | None = None,
|
|
1883
|
+
soft_fail: bool | None = None,
|
|
1884
|
+
request_options: RequestOptions | None = None,
|
|
1885
|
+
) -> JsonResponse:
|
|
1886
|
+
"""Google Videos. Search Google Videos via API and retrieve structured video results with metadata. Credit cost: 1 credit per call.
|
|
1887
|
+
|
|
1888
|
+
``GET / POST /v1/google/videos``
|
|
1889
|
+
|
|
1890
|
+
Args:
|
|
1891
|
+
query: The search query you want to run on Google Videos.
|
|
1892
|
+
location: Human-readable location to originate the search from. Note: location and uule cannot be used together.
|
|
1893
|
+
uule: Google encoded location parameter. Note: uule and location cannot be used together.
|
|
1894
|
+
google_domain: Google domain to use for the search. Defaults to google.com.
|
|
1895
|
+
gl: Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).
|
|
1896
|
+
hl: Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).
|
|
1897
|
+
cr: Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).
|
|
1898
|
+
lr: Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).
|
|
1899
|
+
page: Page number for pagination (1 = first page).
|
|
1900
|
+
num: Maximum number of results per page (e.g. 10).
|
|
1901
|
+
safe: Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.
|
|
1902
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1903
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1904
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1905
|
+
"""
|
|
1906
|
+
return cast(
|
|
1907
|
+
JsonResponse,
|
|
1908
|
+
await self._call(
|
|
1909
|
+
"google_videos",
|
|
1910
|
+
{
|
|
1911
|
+
"query": query,
|
|
1912
|
+
"location": location,
|
|
1913
|
+
"uule": uule,
|
|
1914
|
+
"google_domain": google_domain,
|
|
1915
|
+
"gl": gl,
|
|
1916
|
+
"hl": hl,
|
|
1917
|
+
"cr": cr,
|
|
1918
|
+
"lr": lr,
|
|
1919
|
+
"page": page,
|
|
1920
|
+
"num": num,
|
|
1921
|
+
"safe": safe,
|
|
1922
|
+
"fields": fields,
|
|
1923
|
+
"is_async": is_async,
|
|
1924
|
+
"soft_fail": soft_fail,
|
|
1925
|
+
},
|
|
1926
|
+
request_options,
|
|
1927
|
+
),
|
|
1928
|
+
)
|
|
1929
|
+
|
|
1930
|
+
async def jobs(
|
|
1931
|
+
self,
|
|
1932
|
+
*,
|
|
1933
|
+
id: str,
|
|
1934
|
+
request_options: RequestOptions | None = None,
|
|
1935
|
+
) -> JsonResponse:
|
|
1936
|
+
"""Jobs. Poll the status, progress (0–100) and result of a job started with is_async=true. Polling is free. Poll until status is terminal: CompletedJob, Error, NotFound or BadRequest.
|
|
1937
|
+
|
|
1938
|
+
``GET /v1/jobs/{id}``
|
|
1939
|
+
|
|
1940
|
+
Args:
|
|
1941
|
+
id: The job_id returned by an endpoint called with is_async=true.
|
|
1942
|
+
"""
|
|
1943
|
+
return cast(JsonResponse, await self._call("jobs", {"id": id}, request_options))
|
|
1944
|
+
|
|
1945
|
+
async def search(
|
|
1946
|
+
self,
|
|
1947
|
+
*,
|
|
1948
|
+
query: str,
|
|
1949
|
+
engines: str | None = None,
|
|
1950
|
+
gl: str | None = None,
|
|
1951
|
+
hl: str | None = None,
|
|
1952
|
+
fields: str | None = None,
|
|
1953
|
+
is_async: bool | None = None,
|
|
1954
|
+
soft_fail: bool | None = None,
|
|
1955
|
+
request_options: RequestOptions | None = None,
|
|
1956
|
+
) -> JsonResponse:
|
|
1957
|
+
"""Search. One call walks engines in order and returns the first organic results. engines=auto tries Google, then Brave, Bing, DuckDuckGo, Yahoo, and Baidu. Omitted gl is us and omitted hl is en. There is no page parameter: the response is always pag… Credit cost: 1 credit per call.
|
|
1958
|
+
|
|
1959
|
+
``GET / POST /v1/search``
|
|
1960
|
+
|
|
1961
|
+
Args:
|
|
1962
|
+
query: Search query.
|
|
1963
|
+
engines: Engine order. Default auto tries google, brave, bing, duckduckgo, yahoo, then baidu. A comma-separated list is followed as given. ddg and duck mean duckduckgo. Unknown names are ignored.
|
|
1964
|
+
gl: Country code. Defaults to us when omitted. For example us, fr, gb, de.
|
|
1965
|
+
hl: Language code. Defaults to en when omitted. For example en, fr, de.
|
|
1966
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
1967
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
1968
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
1969
|
+
"""
|
|
1970
|
+
return cast(
|
|
1971
|
+
JsonResponse,
|
|
1972
|
+
await self._call(
|
|
1973
|
+
"search",
|
|
1974
|
+
{
|
|
1975
|
+
"query": query,
|
|
1976
|
+
"engines": engines,
|
|
1977
|
+
"gl": gl,
|
|
1978
|
+
"hl": hl,
|
|
1979
|
+
"fields": fields,
|
|
1980
|
+
"is_async": is_async,
|
|
1981
|
+
"soft_fail": soft_fail,
|
|
1982
|
+
},
|
|
1983
|
+
request_options,
|
|
1984
|
+
),
|
|
1985
|
+
)
|
|
1986
|
+
|
|
1987
|
+
async def stats(
|
|
1988
|
+
self,
|
|
1989
|
+
*,
|
|
1990
|
+
engine: str | None = None,
|
|
1991
|
+
path: str | None = None,
|
|
1992
|
+
request_options: RequestOptions | None = None,
|
|
1993
|
+
) -> JsonResponse:
|
|
1994
|
+
"""Stats. Infrastructure health for an engine or endpoint over the last hour. Not scoped to your account or tenant. Enabled per account: HTTP 403 means contact support to activate it.
|
|
1995
|
+
|
|
1996
|
+
``GET /v1/stats``
|
|
1997
|
+
|
|
1998
|
+
Args:
|
|
1999
|
+
engine: API family to check, for example google. Provide at least engine or path.
|
|
2000
|
+
path: Specific endpoint to check, for example /v1/google/search. If you also pass engine, use an endpoint from that API.
|
|
2001
|
+
"""
|
|
2002
|
+
return cast(
|
|
2003
|
+
JsonResponse,
|
|
2004
|
+
await self._call("stats", {"engine": engine, "path": path}, request_options),
|
|
2005
|
+
)
|
|
2006
|
+
|
|
2007
|
+
async def usage(
|
|
2008
|
+
self,
|
|
2009
|
+
*,
|
|
2010
|
+
request_options: RequestOptions | None = None,
|
|
2011
|
+
) -> JsonResponse:
|
|
2012
|
+
"""Usage. Retrieve real-time usage statistics and credit balance for your Autom account.
|
|
2013
|
+
|
|
2014
|
+
``GET /v1/usage``
|
|
2015
|
+
"""
|
|
2016
|
+
return cast(JsonResponse, await self._call("usage", {}, request_options))
|
|
2017
|
+
|
|
2018
|
+
async def yahoo_search(
|
|
2019
|
+
self,
|
|
2020
|
+
*,
|
|
2021
|
+
query: str,
|
|
2022
|
+
page: int | float | None = None,
|
|
2023
|
+
gl: str | None = None,
|
|
2024
|
+
hl: str | None = None,
|
|
2025
|
+
fields: str | None = None,
|
|
2026
|
+
is_async: bool | None = None,
|
|
2027
|
+
soft_fail: bool | None = None,
|
|
2028
|
+
request_options: RequestOptions | None = None,
|
|
2029
|
+
) -> JsonResponse:
|
|
2030
|
+
"""Yahoo Search. Query Yahoo via API and retrieve structured organic results with country and language. Credit cost: 1 credit per call.
|
|
2031
|
+
|
|
2032
|
+
``GET / POST /v1/yahoo/search``
|
|
2033
|
+
|
|
2034
|
+
Args:
|
|
2035
|
+
query: Search query sent to Yahoo Search.
|
|
2036
|
+
page: Page number. Page 1 is the first page of results.
|
|
2037
|
+
gl: Country code, for example us, fr, gb, de, jp.
|
|
2038
|
+
hl: Language code, for example en, fr, de, ja, zh.
|
|
2039
|
+
fields: Comma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
|
|
2040
|
+
is_async: Process the request asynchronously: the response is a job_id to poll on /v1/jobs/{id} (see waitForJob).
|
|
2041
|
+
soft_fail: Return HTTP 200 even when an error occurs; the error is then in the response body.
|
|
2042
|
+
"""
|
|
2043
|
+
return cast(
|
|
2044
|
+
JsonResponse,
|
|
2045
|
+
await self._call(
|
|
2046
|
+
"yahoo_search",
|
|
2047
|
+
{
|
|
2048
|
+
"query": query,
|
|
2049
|
+
"page": page,
|
|
2050
|
+
"gl": gl,
|
|
2051
|
+
"hl": hl,
|
|
2052
|
+
"fields": fields,
|
|
2053
|
+
"is_async": is_async,
|
|
2054
|
+
"soft_fail": soft_fail,
|
|
2055
|
+
},
|
|
2056
|
+
request_options,
|
|
2057
|
+
),
|
|
2058
|
+
)
|