Types for Google Maps Places v1 API¶
- class google.maps.places_v1.types.Circle(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCircle 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.Int32Range(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Messageint 32 range. Both min and max are optional. If only min is set, then the range only has a lower bound. If only max is set, then range only has an upper bound. At least one of min and max must be set. Values are inclusive.
- class google.maps.places_v1.types.Place(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAll the information representing a Place.
- 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”.
- Type
MutableSequence[str]
- international_phone_number¶
A human-readable phone number for the place, in international format.
- Type
- address_components¶
Repeated components for each locality level.
- 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.
- 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.
- Type
MutableSequence[google.maps.places_v1.types.Place.Review]
- 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.
- Type
- adr_format_address¶
The place’s address in adr microformat: http://microformats.org/wiki/adr.
- Type
- business_status¶
The business status for the place.
- 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]
- icon_mask_base_uri¶
A truncated URL to an v2 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
- wheelchair_accessible_entrance¶
Specifies if the place has an entrance that is wheelchair-accessible.
This field is a member of oneof
_wheelchair_accessible_entrance.- 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]
- 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.
- class AddressComponent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe 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 Attribution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInformation about data providers of this place.
- class BusinessStatus(value)[source]¶
Bases:
proto.enums.EnumBusiness 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 EditorialSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageContains a summary of the place.
- overview¶
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
- class OpeningHours(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInformation about business hour of the place.
- open_now¶
Is this place open right now? Always present unless we lack time-of-day or timezone data for these opening hours.
- 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.OpeningHoursPeriod]
- 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_hour_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]
- class OpeningHoursPeriod(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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 OpeningHoursPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageStatus 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_deprecated¶
Date of the endpoint expressed in
RFC3339format in the local timezone for the place. For example 2010-12-31.- 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 * 7hours from midnight of the day of the request are returned.- Type
- class SecondaryHourType(value)[source]¶
Bases:
proto.enums.EnumA type used to identify the type of secondary hours.
- Values:
- SECONDARY_HOUR_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.MessageStructured 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 PlusCode(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessagePlus 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 Review(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInformation about a review of the place.
- publish_time¶
Timestamp for the review, expressed in seconds since epoch.
- 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_language_code¶
A BCP-47 language code indicating the original language of the review. If the review has been translated, then original_language != language. This field contains the main language tag only, and not the secondary tag indicating country or region. For example, all the English reviews are tagged as ‘en’, and not ‘en-AU’ or ‘en-UK’ and so on.This field is empty if there is only a rating with no review text.
- Type
- translated¶
A boolean value indicating if the review was translated from the original language it was written in. If a review has been translated, corresponding to a value of true, Google recommends that you indicate this to your users. For example, you can add the following string, “Translated by Google”, to the review.
- Type
- class google.maps.places_v1.types.PriceLevel(value)[source]¶
Bases:
proto.enums.EnumPrice level of the place.
- Values:
- PRICE_LEVEL_UNSPECIFIED (0):
Place price level is unspecified or unknown.
- FREE (1):
No description available.
- INEXPENSIVE (2):
Place provides inexpensive services.
- MODERATE (3):
Place provides moderately priced services.
- EXPENSIVE (4):
Place provides expensive services.
- VERY_EXPENSIVE (5):
Place provides very expensive services.
- class google.maps.places_v1.types.SearchTextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest data structure 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. It is used to display the place details, like region-specific place name, if available.
For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.
Note that 3-digit region codes are not currently supported.
- Type
- rank_preference¶
How results will be ranked in the response.
- location¶
The region to search. Setting location would usually yields better results. Recommended to set. This location serves as a bias unless strict_restriction is set to true, which turns the location to a strict restriction.
Deprecated. Use LocationRestriction or LocationBias instead.
- included_type¶
The requested place type. Full list of types supported: https://developers.google.com/places/supported_types. Only support one included type.
- Type
- open_now¶
Used to restrict the search to places that are open at a specific time. open_now marks if a business is currently open.
- Type
- price_range¶
[Deprecated!]Used to restrict the search to places that are within a certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or set a maximum of 4 has no effect on the search results. Min price is default to 0 and max price is default to 4. Default value will be used if either min or max is unset.
- min_rating¶
Filter out results whose average user rating is strictly less than this limit. A valid value must be an float between 0 and 5 (inclusively) at a 0.5 cadence i.e.
[0, 0.5, 1.0, ... , 5.0]inclusively. This is to keep parity with LocalRefinement_UserRating. 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. 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.
- class Location(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe region to search. Deprecated. Use LocationRestriction or LocationBias instead.
- class LocationBias(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe 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.
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.MessageThe region to search. This location serves as a restriction which means results outside given location will not be returned.
- class RankPreference(value)[source]¶
Bases:
proto.enums.EnumHow results will be ranked in the response.
- Values:
- RANK_PREFERENCE_UNSPECIFIED (0):
RankPreference value not set. Will default to DISTANCE.
- DISTANCE (1):
Ranks results by distance.
- RELEVANCE (2):
Ranks results by relevance. Sort order determined by normal ranking stack. See SortRefinement::RELEVANCE.
- class google.maps.places_v1.types.SearchTextResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse proto for SearchText.
- places¶
A list of places that meet the user’s text search criteria.
- Type
MutableSequence[google.maps.places_v1.types.Place]