Types for Google Maps Places v1 API¶
- class google.maps.places_v1.types.AuthorAttribution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about the author of the UGC data. Used in [Photo][google.maps.places.v1.Photo], and [Review][google.maps.places.v1.Review].
- display_name¶
Name of the author of the [Photo][google.maps.places.v1.Photo] or [Review][google.maps.places.v1.Review].
- Type
- uri¶
URI of the author of the [Photo][google.maps.places.v1.Photo] or [Review][google.maps.places.v1.Review].
- Type
- class google.maps.places_v1.types.AutocompletePlacesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request proto for AutocompletePlaces.
- location_bias¶
Optional. Bias results to a specified location.
At most one of
location_bias
orlocation_restriction
should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal.
- location_restriction¶
Optional. Restrict results to a specified location.
At most one of
location_bias
orlocation_restriction
should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal.
- included_primary_types¶
Optional. Included primary Place type (for example, “restaurant” or “gas_station”) in Place Types (https://developers.google.com/maps/documentation/places/web-service/place-types), or only
(regions)
, or only(cities)
. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.- Type
MutableSequence[str]
- included_region_codes¶
Optional. Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both
location_restriction
andincluded_region_codes
are set, the results will be located in the area of intersection.- Type
MutableSequence[str]
- language_code¶
Optional. The language in which to return results. Defaults to en-US. The results may be in mixed languages if the language used in
input
is different fromlanguage_code
or if the returned Place does not have a translation from the local language tolanguage_code
.- Type
- region_code¶
Optional. The region code, specified as a CLDR two-character region code. This affects address formatting, result ranking, and may influence what results are returned. This does not restrict results to the specified region. To restrict results to a region, use
region_code_restriction
.- Type
- origin¶
Optional. The origin point from which to calculate geodesic distance to the destination (returned as
distance_meters
). If this value is omitted, geodesic distance will not be returned.- Type
google.type.latlng_pb2.LatLng
- input_offset¶
Optional. A zero-based Unicode character offset of
input
indicating the cursor position ininput
. The cursor position may influence what predictions are returned.If empty, defaults to the length of
input
.- Type
- include_query_predictions¶
Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.
- Type
- session_token¶
Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned.
The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the
session_token
parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately).We recommend the following guidelines:
Use session tokens for all Place Autocomplete calls.
Generate a fresh token for each session. Using a version 4 UUID is recommended.
Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project.
Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.
- Type
- include_pure_service_area_businesses¶
Optional. Include pure service area businesses if the field is set to true. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps. Places will not return fields including
location
,plus_code
, and other location related fields for these businesses.- Type
- class LocationBias(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The region to search. The results may be biased around the specified region.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- rectangle¶
A viewport defined by a northeast and a southwest corner.
This field is a member of oneof
type
.- Type
google.geo.type.types.Viewport
- class LocationRestriction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The region to search. The results will be restricted to the specified region.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- rectangle¶
A viewport defined by a northeast and a southwest corner.
This field is a member of oneof
type
.- Type
google.geo.type.types.Viewport
- class google.maps.places_v1.types.AutocompletePlacesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response proto for AutocompletePlaces.
- suggestions¶
Contains a list of suggestions, ordered in descending order of relevance.
- Type
MutableSequence[google.maps.places_v1.types.AutocompletePlacesResponse.Suggestion]
- class Suggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An Autocomplete suggestion result.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class FormattableText(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Text representing a Place or query prediction. The text may be used as is or formatted.
- matches¶
A list of string ranges identifying where the input request matched in
text
. The ranges can be used to format specific parts oftext
. The substrings may not be exact matches ofinput
if the matching was determined by criteria other than string matching (for example, spell corrections or transliterations).These values are Unicode character offsets of
text
. The ranges are guaranteed to be ordered in increasing offset values.- Type
MutableSequence[google.maps.places_v1.types.AutocompletePlacesResponse.Suggestion.StringRange]
- class PlacePrediction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Prediction results for a Place Autocomplete prediction.
- place¶
The resource name of the suggested Place. This name can be used in other APIs that accept Place names.
- Type
- place_id¶
The unique identifier of the suggested Place. This identifier can be used in other APIs that accept Place IDs.
- Type
- text¶
Contains the human-readable name for the returned result. For establishment results, this is usually the business name and address.
text
is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to usestructured_format
instead. They are two different ways to represent a Place prediction. Users should not try to parsestructured_format
intotext
or vice versa.This text may be different from the
display_name
returned by GetPlace.May be in mixed languages if the request
input
andlanguage_code
are in different languages or if the Place does not have a translation from the local language tolanguage_code
.
- structured_format¶
A breakdown of the Place prediction into main text containing the name of the Place and secondary text containing additional disambiguating features (such as a city or region).
structured_format
is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to usetext
instead. They are two different ways to represent a Place prediction. Users should not try to parsestructured_format
intotext
or vice versa.
- types¶
List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types.
A type is a categorization of a Place. Places with shared types will share similar characteristics.
- Type
MutableSequence[str]
- class QueryPrediction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Prediction results for a Query Autocomplete prediction.
- text¶
The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, Text Search).
text
is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to usestructured_format
instead. They are two different ways to represent a query prediction. Users should not try to parsestructured_format
intotext
or vice versa.May be in mixed languages if the request
input
andlanguage_code
are in different languages or if part of the query does not have a translation from the local language tolanguage_code
.
- structured_format¶
A breakdown of the query prediction into main text containing the query and secondary text containing additional disambiguating features (such as a city or region).
structured_format
is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to usetext
instead. They are two different ways to represent a query prediction. Users should not try to parsestructured_format
intotext
or vice versa.
- class StringRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Identifies a substring within a given text.
- class StructuredFormat(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains a breakdown of a Place or query prediction into main text and secondary text.
For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query.
The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.
- main_text¶
Represents the name of the Place or query.
- secondary_text¶
Represents additional disambiguating features (such as a city or region) to further identify the Place or refine the query.
- class google.maps.places_v1.types.Circle(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Circle with a LatLng as center and radius.
- center¶
Required. Center latitude and longitude.
The range of latitude must be within [-90.0, 90.0]. The range of the longitude must be within [-180.0, 180.0].
- Type
google.type.latlng_pb2.LatLng
- class google.maps.places_v1.types.ContentBlock(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A block of content that can be served individually.
- content¶
Content related to the topic.
- Type
google.type.localized_text_pb2.LocalizedText
- references¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
References that are related to this block of content.
- class google.maps.places_v1.types.ContextualContent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
Content that is contextual to the place query.
- reviews¶
List of reviews about this place, contexual to the place query.
- Type
MutableSequence[google.maps.places_v1.types.Review]
- photos¶
Information (including references) about photos of this place, contexual to the place query.
- Type
MutableSequence[google.maps.places_v1.types.Photo]
- justifications¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
Justifications for the place.
- Type
MutableSequence[google.maps.places_v1.types.ContextualContent.Justification]
- class Justification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
Justifications for the place. Justifications answers the question of why a place could interest an end user.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- review_justification¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
This field is a member of oneof
justification
.
- business_availability_attributes_justification¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
This field is a member of oneof
justification
.
- class BusinessAvailabilityAttributesJustification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details. BusinessAvailabilityAttributes justifications. This shows some attributes a business has that could interest an end user.
- class ReviewJustification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
User review justifications. This highlights a section of the user review that would interest an end user. For instance, if the search query is “firewood pizza”, the review justification highlights the text relevant to the search query.
- highlighted_text¶
- review¶
The review that the highlighted text is generated from.
- class HighlightedText(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The text highlighted by the justification. This is a subset of the review itself. The exact word to highlight is marked by the HighlightedTextRange. There could be several words in the text being highlighted.
- highlighted_text_ranges¶
The list of the ranges of the highlighted text.
- class google.maps.places_v1.types.EVChargeOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about the EV Charge Station hosted in Place. Terminology follows https://afdc.energy.gov/fuels/electricity_infrastructure.html One port could charge one car at a time. One port has one or more connectors. One station has one or more ports.
- connector_count¶
Number of connectors at this station. However, because some ports can have multiple connectors but only be able to charge one car at a time (e.g.) the number of connectors may be greater than the total number of cars which can charge simultaneously.
- Type
- connector_aggregation¶
A list of EV charging connector aggregations that contain connectors of the same type and same charge rate.
- Type
MutableSequence[google.maps.places_v1.types.EVChargeOptions.ConnectorAggregation]
- class ConnectorAggregation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
EV charging information grouped by [type, max_charge_rate_kw]. Shows EV charge aggregation of connectors that have the same type and max charge rate in kw.
- type_¶
The connector type of this aggregation.
- max_charge_rate_kw¶
The static max charging rate in kw of each connector in the aggregation.
- Type
- available_count¶
Number of connectors in this aggregation that are currently available.
This field is a member of oneof
_available_count
.- Type
- out_of_service_count¶
Number of connectors in this aggregation that are currently out of service.
This field is a member of oneof
_out_of_service_count
.- Type
- availability_last_update_time¶
The timestamp when the connector availability information in this aggregation was last updated.
- class google.maps.places_v1.types.EVConnectorType(value)[source]¶
Bases:
proto.enums.Enum
See http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 for additional information/context on EV charging connector types.
- Values:
- EV_CONNECTOR_TYPE_UNSPECIFIED (0):
Unspecified connector.
- EV_CONNECTOR_TYPE_OTHER (1):
Other connector types.
- EV_CONNECTOR_TYPE_J1772 (2):
J1772 type 1 connector.
- EV_CONNECTOR_TYPE_TYPE_2 (3):
IEC 62196 type 2 connector. Often referred to as MENNEKES.
- EV_CONNECTOR_TYPE_CHADEMO (4):
CHAdeMO type connector.
- EV_CONNECTOR_TYPE_CCS_COMBO_1 (5):
Combined Charging System (AC and DC). Based on SAE. Type-1 J-1772 connector
- EV_CONNECTOR_TYPE_CCS_COMBO_2 (6):
Combined Charging System (AC and DC). Based on Type-2 Mennekes connector
- EV_CONNECTOR_TYPE_TESLA (7):
The generic TESLA connector. This is NACS in the North America but can be non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). This value is less representative of an actual connector type, and more represents the ability to charge a Tesla brand vehicle at a Tesla owned charging station.
- EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T (8):
GB/T type corresponds to the GB/T standard in China. This type covers all GB_T types.
- EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET (9):
Unspecified wall outlet.
- class google.maps.places_v1.types.FuelOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The most recent information about fuel options in a gas station. This information is updated regularly.
- fuel_prices¶
The last known fuel price for each type of fuel this station has. There is one entry per fuel type this station has. Order is not important.
- Type
MutableSequence[google.maps.places_v1.types.FuelOptions.FuelPrice]
- class FuelPrice(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Fuel price information for a given type.
- type_¶
The type of fuel.
- price¶
The price of the fuel.
- Type
google.type.money_pb2.Money
- update_time¶
The time the fuel price was last updated.
- class FuelType(value)[source]¶
Bases:
proto.enums.Enum
Types of fuel.
- Values:
- FUEL_TYPE_UNSPECIFIED (0):
Unspecified fuel type.
- DIESEL (1):
Diesel fuel.
- REGULAR_UNLEADED (2):
Regular unleaded.
- MIDGRADE (3):
Midgrade.
- PREMIUM (4):
Premium.
- SP91 (5):
SP 91.
- SP91_E10 (6):
SP 91 E10.
- SP92 (7):
SP 92.
- SP95 (8):
SP 95.
- SP95_E10 (9):
SP95 E10.
- SP98 (10):
SP 98.
- SP99 (11):
SP 99.
- SP100 (12):
SP 100.
- LPG (13):
LPG.
- E80 (14):
E 80.
- E85 (15):
E 85.
- METHANE (16):
Methane.
- BIO_DIESEL (17):
Bio-diesel.
- TRUCK_DIESEL (18):
Truck diesel.
- class google.maps.places_v1.types.GetPhotoMediaRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request for fetching a photo of a place using a photo resource name.
- name¶
Required. The resource name of a photo media in the format:
places/{place_id}/photos/{photo_reference}/media
.The resource name of a photo as returned in a Place object’s
photos.name
field comes with the formatplaces/{place_id}/photos/{photo_reference}
. You need to append/media
at the end of the photo resource to get the photo media resource name.- Type
- max_width_px¶
Optional. Specifies the maximum desired width, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned.
At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.
- Type
- max_height_px¶
Optional. Specifies the maximum desired height, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned.
At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.
- Type
- skip_http_redirect¶
Optional. If set, skip the default HTTP redirect behavior and render a text format (for example, in JSON format for HTTP use case) response. If not set, an HTTP redirect will be issued to redirect the call to the image media. This option is ignored for non-HTTP requests.
- Type
- class google.maps.places_v1.types.GetPlaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request for fetching a Place based on its resource name, which is a string in the
places/{place_id}
format.- language_code¶
Optional. Place details will be displayed with the preferred language if available.
Current list of supported languages:
https://developers.google.com/maps/faq#languagesupport.
- Type
- region_code¶
Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
Note that 3-digit region codes are not currently supported.
- Type
- session_token¶
Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned.
The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the
session_token
parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately).We recommend the following guidelines:
Use session tokens for all Place Autocomplete calls.
Generate a fresh token for each session. Using a version 4 UUID is recommended.
Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project.
Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.
- Type
- class google.maps.places_v1.types.Photo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about a photo of a place.
- name¶
Identifier. A reference representing this place photo which may be used to look up this place photo again (also called the API “resource” name:
places/{place_id}/photos/{photo}
).- Type
- author_attributions¶
This photo’s authors.
- Type
MutableSequence[google.maps.places_v1.types.AuthorAttribution]
- class google.maps.places_v1.types.PhotoMedia(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A photo media from Places API.
- name¶
The resource name of a photo media in the format:
places/{place_id}/photos/{photo_reference}/media
.- Type
- class google.maps.places_v1.types.Place(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
All the information representing a Place.
- name¶
This Place’s resource name, in
places/{place_id}
format. Can be used to look up the Place.- Type
- display_name¶
The localized name of the place, suitable as a short human-readable description. For example, “Google Sydney”, “Starbucks”, “Pyrmont”, etc.
- Type
google.type.localized_text_pb2.LocalizedText
- types¶
A set of type tags for this result. For example, “political” and “locality”. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
- Type
MutableSequence[str]
- primary_type¶
The primary type of the given result. This type must one of the Places API supported types. For example, “restaurant”, “cafe”, “airport”, etc. A place can only have a single primary type. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
- Type
- primary_type_display_name¶
The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
- Type
google.type.localized_text_pb2.LocalizedText
- international_phone_number¶
A human-readable phone number for the place, in international format.
- Type
- address_components¶
Repeated components for each locality level. Note the following facts about the address_components[] array:
The array of address components may contain more components than the formatted_address.
The array does not necessarily include all the political entities that contain an address, apart from those included in the formatted_address. To retrieve all the political entities that contain a specific address, you should use reverse geocoding, passing the latitude/longitude of the address as a parameter to the request.
The format of the response is not guaranteed to remain the same between requests. In particular, the number of address_components varies based on the address requested and can change over time for the same address. A component can change position in the array. The type of the component can change. A particular component may be missing in a later response.
- Type
MutableSequence[google.maps.places_v1.types.Place.AddressComponent]
- plus_code¶
Plus code of the place location lat/long.
- location¶
The position of this place.
- Type
google.type.latlng_pb2.LatLng
- viewport¶
A viewport suitable for displaying the place on an average-sized map. This viewport should not be used as the physical boundary or the service area of the business.
- Type
google.geo.type.types.Viewport
- website_uri¶
The authoritative website for this place, e.g. a business’ homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain.
- Type
- reviews¶
List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.
- Type
MutableSequence[google.maps.places_v1.types.Review]
- regular_opening_hours¶
The regular hours of operation.
- utc_offset_minutes¶
Number of minutes this place’s timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes.
This field is a member of oneof
_utc_offset_minutes
.- Type
- photos¶
Information (including references) about photos of this place. A maximum of 10 photos can be returned.
- Type
MutableSequence[google.maps.places_v1.types.Photo]
- adr_format_address¶
The place’s address in adr microformat: http://microformats.org/wiki/adr.
- Type
- business_status¶
- price_level¶
Price level of the place.
- attributions¶
A set of data provider that must be shown with this result.
- Type
MutableSequence[google.maps.places_v1.types.Place.Attribution]
- user_rating_count¶
The total number of reviews (with or without text) for this place.
This field is a member of oneof
_user_rating_count
.- Type
- icon_mask_base_uri¶
A truncated URL to an icon mask. User can access different icon type by appending type suffix to the end (eg, “.svg” or “.png”).
- Type
- delivery¶
Specifies if the business supports delivery.
This field is a member of oneof
_delivery
.- Type
- dine_in¶
Specifies if the business supports indoor or outdoor seating options.
This field is a member of oneof
_dine_in
.- Type
- curbside_pickup¶
Specifies if the business supports curbside pickup.
This field is a member of oneof
_curbside_pickup
.- Type
- reservable¶
Specifies if the place supports reservations.
This field is a member of oneof
_reservable
.- Type
- serves_breakfast¶
Specifies if the place serves breakfast.
This field is a member of oneof
_serves_breakfast
.- Type
- serves_lunch¶
Specifies if the place serves lunch.
This field is a member of oneof
_serves_lunch
.- Type
- serves_dinner¶
Specifies if the place serves dinner.
This field is a member of oneof
_serves_dinner
.- Type
- serves_brunch¶
Specifies if the place serves brunch.
This field is a member of oneof
_serves_brunch
.- Type
- serves_vegetarian_food¶
Specifies if the place serves vegetarian food.
This field is a member of oneof
_serves_vegetarian_food
.- Type
- current_opening_hours¶
The hours of operation for the next seven days (including today). The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.
- current_secondary_opening_hours¶
Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.
- Type
MutableSequence[google.maps.places_v1.types.Place.OpeningHours]
- regular_secondary_opening_hours¶
Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
- Type
MutableSequence[google.maps.places_v1.types.Place.OpeningHours]
- editorial_summary¶
Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.
- Type
google.type.localized_text_pb2.LocalizedText
- outdoor_seating¶
Place provides outdoor seating.
This field is a member of oneof
_outdoor_seating
.- Type
- good_for_children¶
Place is good for children.
This field is a member of oneof
_good_for_children
.- Type
- good_for_watching_sports¶
Place is suitable for watching sports.
This field is a member of oneof
_good_for_watching_sports
.- Type
- payment_options¶
Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.
- parking_options¶
Options of parking provided by the place.
- sub_destinations¶
A list of sub destinations related to the place.
- Type
MutableSequence[google.maps.places_v1.types.Place.SubDestination]
- accessibility_options¶
Information about the accessibility options a place offers.
This field is a member of oneof
_accessibility_options
.
- fuel_options¶
The most recent information about fuel options in a gas station. This information is updated regularly.
- ev_charge_options¶
Information of ev charging options.
- generative_summary¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the place.
- area_summary¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the area that the place is in.
- containing_places¶
List of places in which the current place is located.
- Type
MutableSequence[google.maps.places_v1.types.Place.ContainingPlace]
- pure_service_area_business¶
Indicates whether the place is a pure service area business. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses may not have a physical address or location on Google Maps.
This field is a member of oneof
_pure_service_area_business
.- Type
- price_range¶
The price range associated with a Place.
- class AccessibilityOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about the accessibility options a place offers.
- wheelchair_accessible_parking¶
Place offers wheelchair accessible parking.
This field is a member of oneof
_wheelchair_accessible_parking
.- Type
- wheelchair_accessible_entrance¶
Places has wheelchair accessible entrance.
This field is a member of oneof
_wheelchair_accessible_entrance
.- Type
- class AddressComponent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The structured components that form the formatted address, if this information is available.
- long_text¶
The full text description or name of the address component. For example, an address component for the country Australia may have a long_name of “Australia”.
- Type
- short_text¶
An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short_name of “AU”.
- Type
- class AreaSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the area that the place is in.
- content_blocks¶
Content blocks that compose the area summary. Each block has a separate topic about the area.
- Type
MutableSequence[google.maps.places_v1.types.ContentBlock]
- class Attribution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about data providers of this place.
- class BusinessStatus(value)[source]¶
Bases:
proto.enums.Enum
Business status for the place.
- Values:
- BUSINESS_STATUS_UNSPECIFIED (0):
Default value. This value is unused.
- OPERATIONAL (1):
The establishment is operational, not necessarily open now.
- CLOSED_TEMPORARILY (2):
The establishment is temporarily closed.
- CLOSED_PERMANENTLY (3):
The establishment is permanently closed.
- class ContainingPlace(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Info about the place in which this place is located.
- class GenerativeSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
AI-generated summary of the place.
- overview¶
The overview of the place.
- Type
google.type.localized_text_pb2.LocalizedText
- description¶
The detailed description of the place.
- Type
google.type.localized_text_pb2.LocalizedText
- references¶
References that are used to generate the summary description.
- class OpeningHours(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about business hour of the place.
- open_now¶
Whether the opening hours period is currently active. For regular opening hours and current opening hours, this field means whether the place is open. For secondary opening hours and current secondary opening hours, this field means whether the secondary hours of this place is active.
This field is a member of oneof
_open_now
.- Type
- periods¶
The periods that this place is open during the week. The periods are in chronological order, starting with Sunday in the place-local timezone. An empty (but not absent) value indicates a place that is never open, e.g. because it is closed temporarily for renovations.
- Type
MutableSequence[google.maps.places_v1.types.Place.OpeningHours.Period]
- weekday_descriptions¶
Localized strings describing the opening hours of this place, one string for each day of the week. Will be empty if the hours are unknown or could not be converted to localized text. Example: “Sun: 18:00–06:00”.
- Type
MutableSequence[str]
- secondary_hours_type¶
A type string used to identify the type of secondary hours.
- special_days¶
Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, e.g. Christmas day. Set for current_opening_hours and current_secondary_opening_hours if there are exceptional hours.
- Type
MutableSequence[google.maps.places_v1.types.Place.OpeningHours.SpecialDay]
- next_open_time¶
The next time the current opening hours period starts up to 7 days in the future. This field is only populated if the opening hours period is not active at the time of serving the request.
- next_close_time¶
The next time the current opening hours period ends up to 7 days in the future. This field is only populated if the opening hours period is active at the time of serving the request.
- class Period(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A period the place remains in open_now status.
- open_¶
The time that the place starts to be open.
- close¶
The time that the place starts to be closed.
- class Point(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Status changing points.
- day¶
A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is Monday, etc.
This field is a member of oneof
_day
.- Type
- date¶
Date in the local timezone for the place.
- Type
google.type.date_pb2.Date
- truncated¶
Whether or not this endpoint was truncated. Truncation occurs when the real hours are outside the times we are willing to return hours between, so we truncate the hours back to these boundaries. This ensures that at most 24 * 7 hours from midnight of the day of the request are returned.
- Type
- class SecondaryHoursType(value)[source]¶
Bases:
proto.enums.Enum
A type used to identify the type of secondary hours.
- Values:
- SECONDARY_HOURS_TYPE_UNSPECIFIED (0):
Default value when secondary hour type is not specified.
- DRIVE_THROUGH (1):
The drive-through hour for banks, restaurants, or pharmacies.
- HAPPY_HOUR (2):
The happy hour.
- DELIVERY (3):
The delivery hour.
- TAKEOUT (4):
The takeout hour.
- KITCHEN (5):
The kitchen hour.
- BREAKFAST (6):
The breakfast hour.
- LUNCH (7):
The lunch hour.
- DINNER (8):
The dinner hour.
- BRUNCH (9):
The brunch hour.
- PICKUP (10):
The pickup hour.
- ACCESS (11):
The access hours for storage places.
- SENIOR_HOURS (12):
The special hours for seniors.
- ONLINE_SERVICE_HOURS (13):
The online service hours.
- class SpecialDay(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, e.g. Christmas day.
- date¶
The date of this special day.
- Type
google.type.date_pb2.Date
- class ParkingOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about parking options for the place. A parking lot could support more than one option at the same time.
- free_parking_lot¶
Place offers free parking lots.
This field is a member of oneof
_free_parking_lot
.- Type
- paid_parking_lot¶
Place offers paid parking lots.
This field is a member of oneof
_paid_parking_lot
.- Type
- free_street_parking¶
Place offers free street parking.
This field is a member of oneof
_free_street_parking
.- Type
- paid_street_parking¶
Place offers paid street parking.
This field is a member of oneof
_paid_street_parking
.- Type
- class PaymentOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Payment options the place accepts.
- accepts_credit_cards¶
Place accepts credit cards as payment.
This field is a member of oneof
_accepts_credit_cards
.- Type
- accepts_debit_cards¶
Place accepts debit cards as payment.
This field is a member of oneof
_accepts_debit_cards
.- Type
- class PlusCode(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.
- global_code¶
Place’s global (full) code, such as “9FWM33GV+HQ”, representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).
- Type
- class SubDestination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Place resource name and id of sub destinations that relate to the place. For example, different terminals are different destinations of an airport.
- class google.maps.places_v1.types.Polyline(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A route polyline. Only supports an encoded polyline, which can be passed as a string and includes compression with minimal lossiness. This is the Routes API default output.
- encoded_polyline¶
An encoded polyline, as returned by the Routes API by default. See the encoder and decoder tools.
This field is a member of oneof
polyline_type
.- Type
- class google.maps.places_v1.types.PriceLevel(value)[source]¶
Bases:
proto.enums.Enum
Price level of the place.
- Values:
- PRICE_LEVEL_UNSPECIFIED (0):
Place price level is unspecified or unknown.
- PRICE_LEVEL_FREE (1):
Place provides free services.
- PRICE_LEVEL_INEXPENSIVE (2):
Place provides inexpensive services.
- PRICE_LEVEL_MODERATE (3):
Place provides moderately priced services.
- PRICE_LEVEL_EXPENSIVE (4):
Place provides expensive services.
- PRICE_LEVEL_VERY_EXPENSIVE (5):
Place provides very expensive services.
- class google.maps.places_v1.types.PriceRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The price range associated with a Place.
end_price
could be unset, which indicates a range without upper bound (e.g. “More than $100”).- start_price¶
The low end of the price range (inclusive). Price should be at or above this amount.
- Type
google.type.money_pb2.Money
- end_price¶
The high end of the price range (exclusive). Price should be lower than this amount.
- Type
google.type.money_pb2.Money
- class google.maps.places_v1.types.References(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
Reference that the generative content is related to.
- reviews¶
Reviews that serve as references.
- Type
MutableSequence[google.maps.places_v1.types.Review]
- class google.maps.places_v1.types.Review(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about a review of a place.
- name¶
A reference representing this place review which may be used to look up this place review again (also called the API “resource” name:
places/{place_id}/reviews/{review}
).- Type
- relative_publish_time_description¶
A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.
- Type
- text¶
The localized text of the review.
- Type
google.type.localized_text_pb2.LocalizedText
- original_text¶
The review text in its original language.
- Type
google.type.localized_text_pb2.LocalizedText
- author_attribution¶
This review’s author.
- publish_time¶
Timestamp for the review.
- class google.maps.places_v1.types.RouteModifiers(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates a set of optional conditions to satisfy when calculating the routes.
- avoid_tolls¶
Optional. When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the
DRIVE
andTWO_WHEELER
[TravelMode
][google.maps.places.v1.TravelMode].- Type
- avoid_highways¶
Optional. When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the
DRIVE
andTWO_WHEELER
[TravelMode
][google.maps.places.v1.TravelMode].- Type
- avoid_ferries¶
Optional. When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the
DRIVE
andTWO_WHEELER
[TravelMode
][google.maps.places.v1.TravelMode].- Type
- class google.maps.places_v1.types.RoutingParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.
- origin¶
Optional. An explicit routing origin that overrides the origin defined in the polyline. By default, the polyline origin is used.
- Type
google.type.latlng_pb2.LatLng
- travel_mode¶
Optional. The travel mode.
- route_modifiers¶
Optional. The route modifiers.
- routing_preference¶
Optional. Specifies how to compute the routing summaries. The server attempts to use the selected routing preference to compute the route. The traffic aware routing preference is only available for the
DRIVE
orTWO_WHEELER
travelMode
.
- class google.maps.places_v1.types.RoutingPreference(value)[source]¶
Bases:
proto.enums.Enum
A set of values that specify factors to take into consideration when calculating the route.
- Values:
- ROUTING_PREFERENCE_UNSPECIFIED (0):
No routing preference specified. Default to
TRAFFIC_UNAWARE
.- TRAFFIC_UNAWARE (1):
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don’t matter or are not applicable. Using this value produces the lowest latency. Note: For [
TravelMode
][google.maps.places.v1.TravelMode]DRIVE
andTWO_WHEELER
, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.- TRAFFIC_AWARE (2):
Calculates routes taking live traffic conditions into consideration. In contrast to
TRAFFIC_AWARE_OPTIMAL
, some optimizations are applied to significantly reduce latency.- TRAFFIC_AWARE_OPTIMAL (3):
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
- class google.maps.places_v1.types.RoutingSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding
routingSummaries
in the field mask without also including either theroutingParameters.origin
parameter or thesearchAlongRouteParameters.polyline.encodedPolyline
parameter in the request causes an error.- legs¶
The legs of the trip.
When you calculate travel duration and distance from a set origin,
legs
contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route,legs
contains two legs: one from the origin to place, and one from the place to the destination.- Type
MutableSequence[google.maps.places_v1.types.RoutingSummary.Leg]
- directions_uri¶
A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including
routingParameters
andsearchAlongRouteParameters
when applicable, to generate the directions link.- Type
- class Leg(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A leg is a single portion of a journey from one location to another.
- duration¶
The time it takes to complete this leg of the trip.
- class google.maps.places_v1.types.SearchNearbyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request proto for Search Nearby.
- language_code¶
Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.
Current list of supported languages:
https://developers.google.com/maps/faq#languagesupport.
- Type
- region_code¶
The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.
For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
Note that 3-digit region codes are not currently supported.
- Type
- included_types¶
Included Place type (eg, “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
- Type
MutableSequence[str]
- excluded_types¶
Excluded Place type (eg, “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If the client provides both included_types (e.g. restaurant) and excluded_types (e.g. cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types.
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
- Type
MutableSequence[str]
- included_primary_types¶
Included primary Place type (e.g. “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types. A place can only have a single primary type from the supported types table associated with it.
Up to 50 types from Table A may be specified.
If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
- Type
MutableSequence[str]
- excluded_primary_types¶
Excluded primary Place type (e.g. “restaurant” or “gas_station”) from https://developers.google.com/maps/documentation/places/web-service/place-types.
Up to 50 types from Table A may be specified.
If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [“restaurant”], excluded_primary_types = [“restaurant”]}, the returned places provide “restaurant” related services but do not operate primarily as “restaurants”.
- Type
MutableSequence[str]
- max_result_count¶
Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
- Type
- location_restriction¶
Required. The region to search.
- rank_preference¶
How results will be ranked in the response.
- routing_parameters¶
Optional. Parameters that affect the routing to the search results.
- class LocationRestriction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The region to search.
- class RankPreference(value)[source]¶
Bases:
proto.enums.Enum
How results will be ranked in the response.
- Values:
- RANK_PREFERENCE_UNSPECIFIED (0):
RankPreference value not set. Will use rank by POPULARITY by default.
- DISTANCE (1):
Ranks results by distance.
- POPULARITY (2):
Ranks results by popularity.
- class google.maps.places_v1.types.SearchNearbyResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response proto for Search Nearby.
- places¶
A list of places that meets user’s requirements like places types, number of places and specific location restriction.
- Type
MutableSequence[google.maps.places_v1.types.Place]
- routing_summaries¶
A list of routing summaries where each entry associates to the corresponding place in the same index in the
places
field. If the routing summary is not available for one of the places, it will contain an empty entry. This list should have as many entries as the list of places if requested.- Type
MutableSequence[google.maps.places_v1.types.RoutingSummary]
- class google.maps.places_v1.types.SearchTextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request proto for SearchText.
- language_code¶
Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.
Current list of supported languages:
https://developers.google.com/maps/faq#languagesupport.
- Type
- region_code¶
The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.
For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
Note that 3-digit region codes are not currently supported.
- Type
- rank_preference¶
How results will be ranked in the response.
- included_type¶
The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only support one included type.
- Type
- open_now¶
Used to restrict the search to places that are currently open. The default is false.
- Type
- min_rating¶
Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence i.e. [0, 0.5, 1.0, … , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating.
- Type
- max_result_count¶
Maximum number of results to return. It must be between 1 and 20, inclusively. The default is 20. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
- Type
- price_levels¶
Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels.
- Type
MutableSequence[google.maps.places_v1.types.PriceLevel]
- strict_type_filtering¶
Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false.
- Type
- location_bias¶
The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction.
- location_restriction¶
The region to search. This location serves as a restriction which means results outside given location will not be returned. Cannot be set along with location_bias.
- ev_options¶
Optional. Set the searchable EV options of a place search request.
- routing_parameters¶
Optional. Additional parameters for routing to results.
- search_along_route_parameters¶
Optional. Additional parameters proto for searching along a route.
- include_pure_service_area_businesses¶
Optional. Include pure service area businesses if the field is set to true. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps. Places will not return fields including
location
,plus_code
, and other location related fields for these businesses.- Type
- class EVOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Searchable EV options of a place search request.
- minimum_charging_rate_kw¶
Optional. Minimum required charging rate in kilowatts. A place with a charging rate less than the specified rate is filtered out.
- Type
- connector_types¶
Optional. The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out.
- Type
MutableSequence[google.maps.places_v1.types.EVConnectorType]
- class LocationBias(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The region to search. This location serves as a bias which means results around given location might be returned.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- rectangle¶
A rectangle box defined by northeast and southwest corner.
rectangle.high()
must be the northeast point of the rectangle viewport.rectangle.low()
must be the southwest point of the rectangle viewport.rectangle.low().latitude()
cannot be greater thanrectangle.high().latitude()
. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.This field is a member of oneof
type
.- Type
google.geo.type.types.Viewport
- class LocationRestriction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The region to search. This location serves as a restriction which means results outside given location will not be returned.
- rectangle¶
A rectangle box defined by northeast and southwest corner.
rectangle.high()
must be the northeast point of the rectangle viewport.rectangle.low()
must be the southwest point of the rectangle viewport.rectangle.low().latitude()
cannot be greater thanrectangle.high().latitude()
. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.This field is a member of oneof
type
.- Type
google.geo.type.types.Viewport
- class RankPreference(value)[source]¶
Bases:
proto.enums.Enum
How results will be ranked in the response.
- Values:
- RANK_PREFERENCE_UNSPECIFIED (0):
For a categorical query such as “Restaurants in New York City”, RELEVANCE is the default. For non-categorical queries such as “Mountain View, CA” we recommend that you leave rankPreference unset.
- DISTANCE (1):
Ranks results by distance.
- RELEVANCE (2):
Ranks results by relevance. Sort order determined by normal ranking stack.
- class SearchAlongRouteParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies a precalculated polyline from the Routes API defining the route to search. Searching along a route is similar to using the
locationBias
orlocationRestriction
request option to bias the search results. However, while thelocationBias
andlocationRestriction
options let you specify a region to bias the search results, this option lets you bias the results along a trip route.Results are not guaranteed to be along the route provided, but rather are ranked within the search area defined by the polyline and, optionally, by the
locationBias
orlocationRestriction
based on minimal detour times from origin to destination. The results might be along an alternate route, especially if the provided polyline does not define an optimal route from origin to destination.- polyline¶
Required. The route polyline.
- class google.maps.places_v1.types.SearchTextResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response proto for SearchText.
- places¶
A list of places that meet the user’s text search criteria.
- Type
MutableSequence[google.maps.places_v1.types.Place]
- routing_summaries¶
A list of routing summaries where each entry associates to the corresponding place in the same index in the
places
field. If the routing summary is not available for one of the places, it will contain an empty entry. This list will have as many entries as the list of places if requested.- Type
MutableSequence[google.maps.places_v1.types.RoutingSummary]
- contextual_contents¶
Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.
A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the
text_query
in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list will have as many entries as the list of places if requested.- Type
MutableSequence[google.maps.places_v1.types.ContextualContent]
- class google.maps.places_v1.types.TravelMode(value)[source]¶
Bases:
proto.enums.Enum
Travel mode options. These options map to what Routes API offers.
- Values:
- TRAVEL_MODE_UNSPECIFIED (0):
No travel mode specified. Defaults to
DRIVE
.- DRIVE (1):
Travel by passenger car.
- BICYCLE (2):
Travel by bicycle. Not supported with
search_along_route_parameters
.- WALK (3):
Travel by walking. Not supported with
search_along_route_parameters
.- TWO_WHEELER (4):
Motorized two wheeled vehicles of all kinds such as scooters and motorcycles. Note that this is distinct from the
BICYCLE
travel mode which covers human-powered transport. Not supported withsearch_along_route_parameters
. Only supported in those countries listed at Countries and regions supported for two-wheeled vehicles.