Parameters
parameters
¶
Parameter Models for Scrape.do's Google Plugin Endpoints
Defines the pydantic models containing the parameters accepted
by the various endpoints of the Scrape.do Google Scraper API
Model Definitions
Model structure comes from the Official Documentation Page
Sections¶
Verticals
YouTube / Play Store
Additional Information¶
Localization
All Google plugins accept hl (language) and gl (country) for
localization
super=True
All google plugins use premium residential proxies by default
Parameter Types
-
Some of the models' parameters are
Literal Mappings -
See the
Enumsmodule for a more detailed explanation of what they represent
GoogleSearchParameters
¶
Bases: BaseModel
Input parameters accepted by the google/search endpoint
Localization
hl / gl
-
hl(language) andgl(country) areCONTEXThints -
Results are ranked from that locale's perspective but may still include
cross-localeresults
cr / lr
-
crandlrareSTRICTfilters -
They restrict to a
country of origin/languageand accept tokens likecountryUSandlang_enrespectively -
See the
Localization Referencefor the full allowlists -
You can also import the public
GOOGLE_LANGUAGE_RESTRICT_VALUESfrozenset for opt-in client-side validation oflr
location / uule
-
locationis a human-readable string (e.g."New York,New York, United States") -
The server
auto-encodesit to aUULEtoken and echoes both back insearch_parameters -
uuleis a pre-encoded location token -
When both
locationanduuleare set,uulewins
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Search query. |
gl |
Optional[str]
|
Country-perspective code (default |
hl |
Optional[str]
|
Interface-language code (default |
google_domain |
Optional[str]
|
Google domain override
(default |
device |
Optional[GoogleDeviceType]
|
Device class to emulate |
start |
Optional[int]
|
Non-negative result offset for pagination |
include_html |
Optional[bool]
|
Include raw HTML alongside parsed JSON |
cr |
Optional[str]
|
Strict country-of-origin filter in
|
lr |
Optional[str]
|
Strict language-of-origin filter in
|
uule |
Optional[str]
|
Pre-encoded UULE location token |
location |
Optional[str]
|
Human-readable location string. (auto-encoded to UULE server-side) |
safe |
Optional[GoogleSafeSearchType]
|
SafeSearch toggle |
time_period |
Optional[GoogleTimePeriodType]
|
Filter results to a rolling time window |
filter |
Optional[str]
|
Server-side de-duplication / similar content filter (opaque on the gateway) |
nfpr |
Optional[GoogleNFPRType]
|
Spell-correction toggle. |
GoogleSearchAiModeParameters
¶
Bases: BaseModel
Input parameters accepted by the google/search/ai-mode endpoint
Strict Subset of google/search
-
AI Modeis documented as a standalone endpoint whose accepted parameter set is astrict subsetof the SERP plugin -
SERP-only fields are rejected with
400by the engine -
Returns Google's
udm=50AI Mode response rather than the standard SERP envelope
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Search query. |
gl |
Optional[str]
|
Country-perspective code (default |
hl |
Optional[str]
|
Interface-language code (default |
google_domain |
Optional[str]
|
Google domain override
(default |
device |
Optional[GoogleDeviceType]
|
Device class to emulate |
include_html |
Optional[bool]
|
Include raw HTML alongside parsed JSON |
uule |
Optional[str]
|
Pre-encoded UULE location token |
location |
Optional[str]
|
Human-readable location string (auto-encoded to UULE server-side) |
safe |
Optional[GoogleSafeSearchType]
|
SafeSearch toggle |
GoogleMapsSearchParameters
¶
Bases: BaseModel
Input parameters accepted by the google/maps/search endpoint
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Search query |
ll |
Optional[str]
|
Lat / lng / zoom pin in
|
start |
Optional[int]
|
Page offset (multiples of 20) |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
google_domain |
Optional[str]
|
Google domain override |
GoogleMapsPlaceParameters
¶
Bases: BaseModel
Input parameters accepted by the google/maps/place endpoint
Place ID + Data CID
-
Exactly one of
place_idordata_cidMUST be set -
Setting both or neither raises
ValueError
Attributes:
| Name | Type | Description |
|---|---|---|
place_id |
Optional[str]
|
Google Place ID in |
data_cid |
Optional[str]
|
Numeric CID |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
google_domain |
Optional[str]
|
Google domain override |
GoogleMapsReviewsParameters
¶
Bases: BaseModel
Input parameters accepted by the google/maps/reviews endpoint
Data ID + Place ID
Exactly one of data_id or place_id MUST be set
Topic ID + Query
topic_id and query are mutually exclusive
Attributes:
| Name | Type | Description |
|---|---|---|
data_id |
Optional[str]
|
Place ID in |
place_id |
Optional[str]
|
Place ID in |
num |
Optional[int]
|
Reviews per page ( |
sort_by |
Optional[GoogleReviewsSortByType]
|
Sort order for the returned reviews |
topic_id |
Optional[str]
|
Filter reviews by topic ID |
query |
Optional[str]
|
Filter reviews by free-text keyword |
next_page_token |
Optional[str]
|
Cursor returned from a
previous response's |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
GoogleShoppingParameters
¶
Bases: BaseModel
Input Parameters accepted by the google/shopping endpoint
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Search query |
min_price |
Optional[int]
|
Minimum price filter |
max_price |
Optional[int]
|
Maximum price filter |
sort_by |
Optional[GoogleShoppingSortByType]
|
Sort order |
free_shipping |
Optional[bool]
|
Filter to free-shipping listings |
on_sale |
Optional[bool]
|
Filter to on-sale listings |
shoprs |
Optional[str]
|
Opaque filter token from a previous response |
device |
Optional[GoogleDeviceType]
|
Device class to emulate |
start |
Optional[int]
|
Pagination offset |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
google_domain |
Optional[str]
|
Google domain override |
location |
Optional[str]
|
Location string for localization |
uule |
Optional[str]
|
Encoded UULE location parameter |
GoogleFlightsParameters
¶
Bases: BaseModel
Input parameters accepted by the google/flights endpoint
Include / Exclude Airlines
-
include_airlinesandexclude_airlinesaremutually exclusive -
Setting both raises
ValueError
Unsupported Parameters
The following parameters are NOT supported by Scrape.do's plugin
engine and trigger a 400 response if sent, so they're intentionally
absent from the model
type=3(Multi-City)max_pricemax_durationbags
The plugin engine enforces these limits regardless of whether the
request is routed through the synchronous gateway or the Async API
Attributes:
| Name | Type | Description |
|---|---|---|
departure_id |
str
|
IATA code for departure airport(s) Comma-separated for multi-airport |
arrival_id |
str
|
IATA code for arrival airport(s). Comma-separated for multi-airport |
outbound_date |
str
|
YYYY-MM-DD outbound date |
return_date |
Optional[str]
|
YYYY-MM-DD return date for round trips |
type |
Optional[GoogleFlightsTripType]
|
Trip type. Auto-inferred when omitted |
adults |
Optional[int]
|
Number of adult passengers ( |
children |
Optional[int]
|
Number of child passengers ( |
infants_in_seat |
Optional[int]
|
Infants requiring a seat
( |
infants_on_lap |
Optional[int]
|
Infants on lap ( |
travel_class |
Optional[GoogleFlightsTravelClassType]
|
Cabin class |
stops |
Optional[GoogleFlightsStopsType]
|
Stop filter |
sort_by |
Optional[GoogleFlightsSortByType]
|
Sort order |
include_airlines |
Optional[str]
|
Comma-separated IATA codes of airlines to include |
exclude_airlines |
Optional[str]
|
Comma-separated IATA codes of airlines to exclude |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
currency |
Optional[str]
|
ISO-4217 currency code
(e.g. |
GoogleHotelsParameters
¶
Bases: BaseModel
Input parameters accepted by the google/hotels endpoint
Unsupported Parameters
-
Occupancy Parameters (
adults,children,children ages) are NOT supported byScrape.do'splugin engine -
Results always reflect
2 adults / 0 children -
These fields are intentionally absent from the model
-
The plugin engine enforces this regardless of whether the request is routed through the synchronous gateway or the
Async API
Date Order
-
check_out_dateMUST be strictly aftercheck_in_date -
Same-day or reversed ranges raise a
ValueErrorat model construction time
Price Range
-
When both
min_priceandmax_priceare set,max_priceMUST be>= min_price -
Reversed ranges raise a
ValueErrorat construction
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Hotel search query (use the simple
|
check_in_date |
date
|
ISO-8601 check-in date (accepts a
|
check_out_date |
date
|
ISO-8601 check-out date (must be after
|
sort_by |
Optional[GoogleHotelsSortByType]
|
Sort order |
min_price |
Optional[int]
|
Minimum nightly price (in requested currency) |
max_price |
Optional[int]
|
Maximum nightly price (>= |
rating |
Optional[GoogleHotelsRatingType]
|
Rating threshold |
hotel_class |
Optional[str]
|
Comma-separated star ratings
( |
brands |
Optional[str]
|
Comma-separated brand codes |
amenities |
Optional[str]
|
Comma-separated amenity codes |
property_types |
Optional[str]
|
Comma-separated property-type codes |
free_cancellation |
Optional[bool]
|
Filter to free-cancellation listings |
eco_certified |
Optional[bool]
|
Filter to eco-certified listings |
special_offers |
Optional[bool]
|
Filter to listings with special offers |
next_page_token |
Optional[str]
|
Pagination cursor from a previous response |
limit |
Optional[int]
|
Maximum properties to return per
request ( |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
currency |
Optional[str]
|
ISO-4217 currency code |
GoogleNewsParameters
¶
Bases: BaseModel
Input parameters accepted by the google/news endpoint
Driver
Exactly ONE of the following parameters MUST be provided
They are considered the driver of the request and setting zero or
more than one raises ValueError
qtopic_tokensection_tokenstory_tokenpublication_token
so
-
The
soparameter is only valid when provided along with theqorkgmiddrivers -
Pairing it with any other
driverraisesValueError
Driver Semantics
q= Keyword Searchtopic_token= Topic Streamsection_token= Section Within A Topicstory_token= Full-Coverage Story Pagepublication_token= Publisher Feedkgmid= Knowledge Graph Entity (e.g./m/02_286= New York City)
Attributes:
| Name | Type | Description |
|---|---|---|
q |
Optional[str]
|
Keyword search driver |
topic_token |
Optional[str]
|
Topic-stream driver |
section_token |
Optional[str]
|
Section-within-topic driver |
story_token |
Optional[str]
|
Full-coverage story-page driver |
publication_token |
Optional[str]
|
Publisher-feed driver |
kgmid |
Optional[str]
|
Knowledge Graph entity driver |
so |
Optional[GoogleNewsSortOrderType]
|
Sort order |
hl |
Optional[str]
|
Language code |
gl |
Optional[str]
|
Country code |
GoogleTrendsParameters
¶
Bases: BaseModel
Input Parameters accepted by the google/trends endpoint
data_type Defaults
-
When
data_typeis omitted, the gateway returns the combinedTIMESERIES + GEO_MAPpayload -
GEO_MAPis themulti-queryregional-interest breakdown -
GEO_MAP_0is thesingle-querymap
region
-
Sets the geographic resolution for the regional-interest widgets
-
Only meaningful when
data_typeselectsGEO_MAPorGEO_MAP_0
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
Search keyword |
geo |
Optional[str]
|
Location code
(e.g. |
hl |
Optional[str]
|
Language code (default |
date |
Optional[str]
|
Time-range string (default
|
tz |
Optional[int]
|
Timezone offset in minutes from UTC
(default |
data_type |
Optional[GoogleTrendsDataType]
|
Trends widget to fetch |
cat |
Optional[str]
|
Category ID |
gprop |
Optional[GoogleTrendsGPropType]
|
Google property scope |
region |
Optional[GoogleTrendsRegionType]
|
Geographic resolution for regional-interest widgets |
GoogleTrendingParameters
¶
Bases: BaseModel
Input parameters accepted by the google/trending endpoint
Real-Time Feed
-
Returns the current real-time trending searches from
Google Trends -
geois required at the parameter level OR via the top-levelGeoCodefield on the async request
Attributes:
| Name | Type | Description |
|---|---|---|
geo |
str
|
Country code (e.g. |
hl |
Optional[str]
|
Language code (default |
hours |
Optional[GoogleTrendingHoursType]
|
Time window for
the trends feed (default |
cat |
Optional[int]
|
Category ID to filter trends
(default |
sort |
Optional[GoogleTrendingSortType]
|
Sort order for
results (default |
status |
Optional[GoogleTrendingStatusType]
|
Trend-status
filter (default |
GoogleSearchAiOverviewParameters
¶
Bases: BaseModel
One request for the sync google/search/ai-overview follow-up form
SERP Deferred-State Follow-Up
-
The sync endpoint is the follow-up call made when a
google/ searchresponse includesai_overview.state == "deferred" -
The
session_keyis returned in the SERP response and must be passed unchanged -
The
session_keyhas a60-second TTL on the server side and isone-time use -
An expired or invalid key returns
404 session not found
Async API Surface
-
The
Async APIexposes a different shape for this plugin which takes theqdriver (search query) instead of a session key in order to handles both fetch hops internally -
For async-side usage see
GoogleSearchAiOverviewAsyncParameters
Attributes:
| Name | Type | Description |
|---|---|---|
session_key |
str
|
Session token captured from the SERP
response's |
hl |
Optional[str]
|
Interface-language code |
gl |
Optional[str]
|
Country-perspective code |
GoogleHotelsDetailParameters
¶
Bases: BaseModel
One request for the google/hotels/detail endpoint
Two-Step Hotel Workflow
-
detail_tokenis acquired from a priorGoogleHotelsParameterslisting response (properties[].detail_token) and must be passed unchanged -
The same
check_in_date,check_out_date, andcurrencyvalues used on the listing call should be reused here so vendor pricing matches the original results
Date Order
-
check_out_dateMUST be strictly aftercheck_in_date -
Same-day or reversed ranges raise a
ValueErrorat model construction time
Attributes:
| Name | Type | Description |
|---|---|---|
detail_token |
str
|
Opaque token returned by the listing response |
check_in_date |
date
|
ISO-8601 check-in date (accepts a
|
check_out_date |
date
|
ISO-8601 check-out date (must be after
|
currency |
Optional[str]
|
ISO-4217 currency code (default
|
gl |
Optional[str]
|
Country-perspective code (default |
hl |
Optional[str]
|
Interface-language code (default |
GoogleYouTubeParameters
¶
Bases: BaseModel
Input parameters accepted by the google/youtube endpoint
q
-
qandsearch_queryare accepted as aliases for the same driver field -
The model serializes the field as
search_queryto match the documented wire format
Attributes:
| Name | Type | Description |
|---|---|---|
q |
str
|
YouTube search query
(alias |
hl |
Optional[str]
|
Interface-language code
(e.g. |
gl |
Optional[str]
|
Country code (e.g. |
device |
Optional[GoogleDeviceType]
|
Device class to emulate |
sp |
Optional[str]
|
YouTube's opaque token. Short values control sort / result type / duration / features / upload date; long values are continuation cursors |
GooglePlayStoreParameters
¶
Bases: BaseModel
Input parameters accepted by the google/play-store endpoint
Driver
-
At least one of
q/apps_category/chartMUST be set -
Setting none raises
ValueError
age Field
-
ageis only valid whenapps_category == "FAMILY" -
Pairing it with any other category raises
ValueError
Attributes:
| Name | Type | Description |
|---|---|---|
q |
Optional[str]
|
Keyword search query |
apps_category |
Optional[str]
|
App category filter
(e.g. |
chart |
Optional[GooglePlayStoreChartType]
|
Top-charts driver |
num |
Optional[int]
|
Result count ( |
next_page_token |
Optional[str]
|
Pagination cursor |
store_device |
Optional[GooglePlayStoreDeviceType]
|
Device form-factor filter |
age |
Optional[GooglePlayStoreAgeType]
|
Age-range filter (FAMILY category only) |
hl |
Optional[str]
|
Language code (default |
gl |
Optional[str]
|
Country code (default |
GooglePlayStoreProductParameters
¶
GooglePlayStoreReviewsParameters
¶
Bases: BaseModel
Input parameters accepted by the google/play-store/reviews
endpoint
Attributes:
| Name | Type | Description |
|---|---|---|
product_id |
str
|
Play Store product ID
(e.g. |
sort_by |
Optional[int]
|
Review sort order (default |
next_page_token |
Optional[str]
|
Pagination cursor |
hl |
Optional[str]
|
Language code (default |
gl |
Optional[str]
|
Country code (default |
GoogleShoppingProductParameters
¶
Bases: BaseModel
Input parameters accepted by the google/shopping/product endpoint
Input Mode
At least one of the following input groups MUST be set
catalog_id+q(both required together)immersive_product_page_token(aliaspage_token)product_id
warning: Input Mode Constraints
- Setting `catalog_id` without `q` raises `ValueError`
- When multiple inputs are set, the gateway resolves them in
priority order. `catalog_id` > `immersive_product_page_token` >
`product_id`
Mode-Specific Optionals
load_all_storesis only valid incatalog_idmodemore_storesis only valid in token (legacy) mode
Attributes:
| Name | Type | Description |
|---|---|---|
catalog_id |
Optional[str]
|
Durable catalog identifier
(digit-only). Requires |
q |
Optional[str]
|
Search query
(required only with |
immersive_product_page_token |
Optional[str]
|
Short-lived
opaque base64 token from search results
(alias |
product_id |
Optional[str]
|
Google product catalog ID (digit-only) |
device |
Optional[GoogleShoppingProductDeviceType]
|
Device class to emulate |
google_domain |
Optional[str]
|
Google domain override
(default |
sort_by |
Optional[GoogleShoppingProductSortByType]
|
Sort order (forces HTML-fallback path) |
load_all_stores |
Optional[bool]
|
Catalog mode only |
more_stores |
Optional[bool]
|
Token mode only (legacy) |
hl |
Optional[str]
|
Language code (default |
gl |
Optional[str]
|
Country code (default |
location |
Optional[str]
|
Human-readable location string |
uule |
Optional[str]
|
Pre-encoded UULE location token |
GoogleShoppingProductStoresParameters
¶
Bases: BaseModel
Input parameters accepted by the google/shopping/product/stores
endpoint
Continuation Endpoint
-
This endpoint returns additional store offers for a product discovered via
google/shopping/product -
catalog_idmust match the catalog identifier embedded innext_page_token -
The locale (
q,gl,hl) is carried inside the token and reused server-side
Attributes:
| Name | Type | Description |
|---|---|---|
catalog_id |
str
|
Durable catalog identifier
(must match |
next_page_token |
str
|
|