Place Data | Maps JavaScript API | Google for Developers
Place class
google.maps.places.Place
class
This class implements
PlaceOptions.
Access by calling const {Place} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constructor | |
|---|---|
Place |
Parameters:
|
Static Methods | |
|---|---|
searchByText |
Parameters:
Text query based place search. |
searchNearby |
Parameters:
Search for nearby places. |
Properties | |
|---|---|
accessibilityOptions |
Type: Accessibility options of this Place. |
addressComponents |
Type: The collection of address components for this Place’s location. Empty object if there is no known address data. |
adrFormatAddress |
Type: The representation of the Place’s address in the adr microformat. |
allowsDogs |
Type: |
attributions |
Type: Data providers that must be shown for the Place. |
businessStatus |
Type: The location's operational status. |
consumerAlert |
Type: The consumer alert for this place. |
displayName |
Type: The location's display name. |
displayNameLanguageCode |
Type: The language of the location's display name. |
editorialSummary |
Type: The editorial summary for this place. |
editorialSummaryLanguageCode |
Type: The language of the editorial summary for this place. |
evChargeAmenitySummary |
Type: The EVChargeAmenitySummary for this place. |
evChargeOptions |
Type: EV Charge options provided by the place. |
formattedAddress |
Type: The location’s full address. |
fuelOptions |
Type: Fuel options provided by the place. |
generativeSummary |
Type: The GenerativeSummary for this place. |
googleMapsLinks |
Type: Links to trigger different Google Maps actions. |
googleMapsURI |
Type: URL of the official Google page for this place. This is the Google-owned page that contains the best available information about the Place. |
hasCurbsidePickup |
Type: Whether a place has curbside pickup. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
hasDelivery |
Type: Whether a place has delivery. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
hasDineIn |
Type: Whether a place has dine in. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
hasLiveMusic |
Type: |
hasMenuForChildren |
Type: |
hasOutdoorSeating |
Type: |
hasRestroom |
Type: |
hasTakeout |
Type: Whether a place has takeout. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
iconBackgroundColor |
Type: The default HEX color code for the place's category. |
id |
Type: The unique place id. |
internationalPhoneNumber |
Type: The Place’s phone number in international format. International format includes the country code, and is prefixed with the plus (+) sign. |
isGoodForChildren |
Type: |
isGoodForGroups |
Type: |
isGoodForWatchingSports |
Type: |
isReservable |
Type: Whether a place is reservable. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
location |
Type: The Place’s position. |
nationalPhoneNumber |
Type: The Place’s phone number, formatted according to the number's regional convention. |
neighborhoodSummary |
Type: The NeighborhoodSummary for this place. |
parkingOptions |
Type: Options of parking provided by the place. |
paymentOptions |
Type: Payment options provided by the place. |
photos |
Photos of this Place. The collection will contain up to ten |
plusCode |
Type: |
postalAddress |
Type: |
priceLevel |
Type: The price level of the Place. This property can return any of the following values
|
priceRange |
Type: The price range for this Place. |
primaryType |
Type: The location's primary type. |
primaryTypeDisplayName |
Type: The location's primary type display name. |
primaryTypeDisplayNameLanguageCode |
Type: The language of the location's primary type display name. |
rating |
Type: A rating, between 1.0 to 5.0, based on user reviews of this Place. |
regularOpeningHours |
Type: |
requestedLanguage |
Type: The requested language for this place. |
requestedRegion |
Type: The requested region for this place. |
resourceName |
Type: The unique place resource name. |
reviews |
A list of reviews for this Place. |
reviewSummary |
Type: The ReviewSummary for this place. |
servesBeer |
Type: Whether a place serves beer. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesBreakfast |
Type: Whether a place serves breakfast. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesBrunch |
Type: Whether a place serves brunch. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesCocktails |
Type: |
servesCoffee |
Type: |
servesDessert |
Type: |
servesDinner |
Type: Whether a place serves dinner. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesLunch |
Type: Whether a place serves lunch. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesVegetarianFood |
Type: Whether a place serves vegetarian food. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
servesWine |
Type: Whether a place serves wine. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. Returns 'undefined' if this field has not yet been requested. |
shortFormattedAddress |
Type: The location’s short address. |
subDestinations |
The list of sub-destinations for this place. Sub-destinations are specific places associated with a main place. These provide more specific destinations for users who are searching within a large or complex place, like an airport, national park, university, or stadium. |
svgIconMaskURI |
Type: URI to the svg image mask resource that can be used to represent a place’s category. |
types |
Type: An array of types for this Place (for example, |
userRatingCount |
Type: The number of user ratings which contributed to this Place’s |
utcOffsetMinutes |
Type: The offset from UTC of the Place’s current timezone, in minutes. For example, Austrialian Eastern Standard Time (GMT+10) in daylight savings is 11 hours ahead of UTC, so the |
viewport |
Type: The preferred viewport when displaying this Place on a map. |
websiteURI |
Type: The authoritative website for this Place, such as a business' homepage. |
|
Type: |
|
Type: |
Methods | |
|---|---|
fetchFields |
Parameters:
|
|
Parameters:
Calculates the |
|
Parameters:
Return Value: Check if the place is open at the given |
toJSON |
Parameters: None Return Value: |
PlaceOptions interface
google.maps.places.PlaceOptions
interface
Options for constructing a Place.
Properties | |
|---|---|
id optional |
Type: The unique place id. |
requestedLanguage optional |
Type: A language identifier for the language in which details should be returned. See the list of supported languages. |
requestedRegion optional |
Type: A region code of the user's region. This can affect which photos may be returned, and possibly other things. The region code accepts a ccTLD ("top-level domain") two-character value. Most ccTLD codes are identical to ISO 3166-1 codes, with some notable exceptions. For example, the United Kingdom's ccTLD is "uk" ( |
resourceName optional |
Type: The unique place resource name. |
AccessibilityOptions class
google.maps.places.AccessibilityOptions
class
Access by calling const {AccessibilityOptions} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
hasWheelchairAccessibleEntrance |
Type: Whether a place has a wheelchair accessible entrance. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasWheelchairAccessibleParking |
Type: Whether a place has wheelchair accessible parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasWheelchairAccessibleRestroom |
Type: Whether a place has a wheelchair accessible restroom. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasWheelchairAccessibleSeating |
Type: Whether a place offers wheelchair accessible seating. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
AddressComponent class
google.maps.places.AddressComponent
class
Address component for the Place's location.
Access by calling const {AddressComponent} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
longText |
Type: The full text of the address component. |
shortText |
Type: The abbreviated, short text of the given address component. |
types |
Type: An array of strings denoting the type of this address component. A list of valid types can be found here. |
Attribution class
google.maps.places.Attribution
class
Information about a data provider for a Place.
Access by calling const {Attribution} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
provider |
Type: Name of the Place's data provider. |
providerURI |
Type: URI to the Place's data provider. |
google.maps.places.AuthorAttribution
class
Information about the author of user-generated content.
Access by calling const {AuthorAttribution} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
displayName |
Type: Author's name for this result. |
photoURI |
Type: Author's photo URI for this result. This may not always be available. |
uri |
Type: Author's profile URI for this result. |
ConnectorAggregation class
google.maps.places.ConnectorAggregation
class
EV charging information, aggregated for connectors of the same type and the same charge rate.
Access by calling const {ConnectorAggregation} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
availabilityLastUpdateTime |
Type: The time when the connector availability information in this aggregation was last updated. |
availableCount |
Type: Number of connectors in this aggregation that are currently available. |
count |
Type: Number of connectors in this aggregation. |
maxChargeRateKw |
Type: The static max charging rate in kw of each connector of the aggregation. |
outOfServiceCount |
Type: Number of connectors in this aggregation that are currently out of service. |
type |
Type: The connector type of this aggregation. |
ConsumerAlert class
google.maps.places.ConsumerAlert
class
The consumer alert message. All text are rendered in the language specified by the languageCode field.
Access by calling const {ConsumerAlert} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
details |
Type: The details of the consumer alert message. |
languageCode |
Type: The language code of the consumer alert message. |
overview |
Type: The overview of the consumer alert message. |
ConsumerAlertDetails class
google.maps.places.ConsumerAlertDetails
class
Details of the consumer alert message.
Access by calling const {ConsumerAlertDetails} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
aboutLinkTitle |
Type: The title to show for a link to provide more information. |
aboutLinkURI |
Type: The URI for a link to provide more information. |
description |
Type: The description of the consumer alert message. |
title |
Type: The title to show together with the detailed description. |
ContentBlock class
google.maps.places.ContentBlock
class
ContentBlock describes the content of a summary and where it came from.
Access by calling const {ContentBlock} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
content |
Type: Content related to the topic. |
contentLanguageCode |
Type: Language code of the content. |
referencedPlaces |
A list of |
EVChargeAmenitySummary class
google.maps.places.EVChargeAmenitySummary
class
AI-generated summary of amenities near the EV charging station. This only applies to places with type electric_vehicle_charging_station.
Access by calling const {EVChargeAmenitySummary} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
coffee |
Type: A summary of the nearby coffee options. |
disclosureText |
Type: The text for the disclosure relating to this summary. |
disclosureTextLanguageCode |
Type: The language code of the disclosure text. |
flagContentURI |
Type: A URI to report a problem with the summary. |
overview |
Type: An overview of the available amenities. |
restaurant |
Type: A summary of the nearby restaurants. |
store |
Type: A summary of nearby stores. |
EVChargeOptions class
google.maps.places.EVChargeOptions
class
Information about the EV charging station hosted in the place.
Access by calling const {EVChargeOptions} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
connectorAggregations |
Type: A list of EV charging connector aggregations that contain connectors of the same type and same charge rate. |
connectorCount |
Type: Number of connectors at this station. Because some ports can have multiple connectors but only be able to charge one car at a time, the number of connectors may be greater than the total number of cars which can charge simultaneously. |
EVConnectorType constants
google.maps.places.EVConnectorType
constants
EV charging connector types.
Access by calling const {EVConnectorType} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constants | |
|---|---|
CCS_COMBO_1 |
Combined Charging System (AC and DC). Based on SAE Type-1 J-1772 connector. |
CCS_COMBO_2 |
Combined Charging System (AC and DC). Based on Type-2 Mennekes connector. |
CHADEMO |
CHAdeMO type connector. |
J1772 |
J1772 type 1 connector. |
NACS |
The North American Charging System (NACS), standardized as SAE J3400. |
OTHER |
Other connector types. |
TESLA |
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. |
TYPE_2 |
IEC 62196 type 2 connector. Often referred to as MENNEKES. |
UNSPECIFIED_GB_T |
GB/T type corresponds to the GB/T standard in China. This type covers all GB_T types. |
UNSPECIFIED_WALL_OUTLET |
Unspecified wall outlet. |
EVSearchOptions interface
google.maps.places.EVSearchOptions
interface
EV-related options that can be specified for a place search request.
Properties | |
|---|---|
connectorTypes optional |
Type: The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out. |
minimumChargingRateKw optional |
Type: Minimum required charging rate in kilowatts. A place with a charging rate less than the specified rate is filtered out. |
FetchFieldsRequest interface
google.maps.places.FetchFieldsRequest
interface
Options for fetching Place fields.
Properties | |
|---|---|
fields |
Type: List of fields to be fetched. |
FuelOptions class
google.maps.places.FuelOptions
class
The most recent information about fuel options in a gas station. This information is updated regularly.
Access by calling const {FuelOptions} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
fuelPrices |
A list of fuel prices for each type of fuel this station has, one entry per fuel type. |
FuelPrice class
google.maps.places.FuelPrice
class
Fuel price information for a given type of fuel.
Access by calling const {FuelPrice} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
price |
Type: The price of the fuel. |
type |
Type: The type of fuel. |
updateTime |
Type: The time the fuel price was last updated. |
FuelType constants
google.maps.places.FuelType
constants
Types of fuel.
Access by calling const {FuelType} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constants | |
|---|---|
BIO_DIESEL |
Bio-diesel. |
DIESEL |
Diesel fuel. |
DIESEL_PLUS |
Diesel plus fuel. |
E100 |
E 100. |
E80 |
E 80. |
E85 |
E 85. |
LPG |
LPG. |
METHANE |
Methane. |
MIDGRADE |
Midgrade. |
PREMIUM |
Premium. |
REGULAR_UNLEADED |
Regular unleaded. |
SP100 |
SP 100. |
SP91 |
SP 91. |
SP91_E10 |
SP 91 E10. |
SP92 |
SP 92. |
SP95 |
SP 95. |
SP95_E10 |
SP95 E10. |
SP98 |
SP 98. |
SP99 |
SP 99. |
TRUCK_DIESEL |
Truck diesel. |
GenerativeSummary class
google.maps.places.GenerativeSummary
class
AI-generated summary of the place.
Access by calling const {GenerativeSummary} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
disclosureText |
Type: The text for the disclosure relating to this summary. |
disclosureTextLanguageCode |
Type: The language code of the disclosure text. |
flagContentURI |
Type: A URI to report a problem with the summary. |
overview |
Type: The overview of the place. |
overviewLanguageCode |
Type: The language code of the overview. |
GoogleMapsLinks class
google.maps.places.GoogleMapsLinks
class
Links to trigger different Google Maps actions.
Access by calling const {GoogleMapsLinks} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
directionsURI |
Type: A link to show the directions to the place on Google Maps. The link only populates the destination location and uses the default travel mode |
photosURI |
Type: A link to show the photos for the place on Google Maps. |
placeURI |
Type: A link to show the place on Google Maps. |
reviewsURI |
Type: A link to show the reviews for the place on Google Maps. |
writeAReviewURI |
Type: A link to write a review for the place on Google Maps. |
Money class
google.maps.places.Money
class
A representation of an amount of money with its currency type.
Access by calling const {Money} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
currencyCode |
Type: The three-letter currency code, defined in ISO 4217. |
nanos |
Type: Number of nano (10^-9) units of the amount. |
units |
Type: The whole units of the amount. For example, if |
Methods | |
|---|---|
toString |
Parameters: None Return Value: Returns a human-readable representation of the amount of money with its currency symbol. |
NeighborhoodSummary class
google.maps.places.NeighborhoodSummary
class
AI-generated summary of points of interest near the place.
Access by calling const {NeighborhoodSummary} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
description |
Type: A detailed description of the neighborhood. |
disclosureText |
Type: The text for the disclosure relating to this summary. |
disclosureTextLanguageCode |
Type: The language code of the disclosure text. |
flagContentURI |
Type: A URI to report a problem with the summary. |
overview |
Type: An overview of the neighborhood. |
OpeningHours class
google.maps.places.OpeningHours
class
Information about business hours of a Place.
Access by calling const {OpeningHours} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
periods |
Type: Opening periods covering each day of the week, starting from Sunday, in chronological order. Does not include days where the Place is not open. |
weekdayDescriptions |
Type: An array of seven strings representing the formatted opening hours for each day of the week. The Places Service will format and localize the opening hours appropriately for the current language. The ordering of the elements in this array depends on the language. Some languages start the week on Monday, while others start on Sunday. |
OpeningHoursPoint class
google.maps.places.OpeningHoursPoint
class
A point where the Place changes its opening status.
Access by calling const {OpeningHoursPoint} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
day |
Type: The day of the week, as a number in the range [0, 6], starting on Sunday. For example, 2 means Tuesday. |
hour |
Type: The hour of the OpeningHoursPoint.time as a number, in the range [0, 23]. This will be reported in the Place’s time zone. |
minute |
Type: The minute of the OpeningHoursPoint.time as a number, in the range [0, 59]. This will be reported in the Place’s time zone. |
ParkingOptions class
google.maps.places.ParkingOptions
class
Access by calling const {ParkingOptions} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
hasFreeGarageParking |
Type: Whether a place offers free garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasFreeParkingLot |
Type: Whether a place offers free parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasFreeStreetParking |
Type: Whether a place offers free street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasPaidGarageParking |
Type: Whether a place offers paid garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasPaidParkingLot |
Type: Whether a place offers paid parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasPaidStreetParking |
Type: Whether a place offers paid street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
hasValetParking |
Type: Whether a place offers valet parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
PaymentOptions class
google.maps.places.PaymentOptions
class
Access by calling const {PaymentOptions} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
acceptsCashOnly |
Type: Whether a place only accepts payment via cash. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
acceptsCreditCards |
Type: Whether a place accepts payment via credit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
acceptsDebitCards |
Type: Whether a place accepts payment via debit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
acceptsNFC |
Type: Whether a place accepts payment via NFC. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. |
Photo class
google.maps.places.Photo
class
Information about a photo of a Place.
Access by calling const {Photo} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
authorAttributions |
Type: Attribution text to be displayed for this photo. |
flagContentURI |
Type: A link where user can flag a problem with the photo. |
googleMapsURI |
Type: A link to show the photo on Google Maps. |
heightPx |
Type: The height of the photo in pixels. |
widthPx |
Type: The width of the photo in pixels. |
Methods | |
|---|---|
getURI |
Parameters:
Return Value: Returns the image URL corresponding to the specified options. |
PlusCode class
google.maps.places.PlusCode
class
Plus code for the Place. See https://plus.codes/ for more information.
Access by calling const {PlusCode} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
compoundCode |
Type: A plus code with a 1/8000th of a degree by 1/8000th of a degree area where the first four characters (the area code) are dropped and replaced with a locality description. For example, "9G8F+5W Zurich, Switzerland". |
globalCode |
Type: A plus code with a 1/8000th of a degree by 1/8000th of a degree area. For example, "8FVC9G8F+5W". |
PostalAddress class
google.maps.places.PostalAddress
class
Represents a postal address (e.g. for a postal service to deliver items to). Note: PostalAddress is used by the JavaScript API to instantiate objects that represent data returned by the Web Service.
This class implements
PostalAddressLiteral.
Access by calling const {PostalAddress} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
addressLines |
Type: Unstructured address lines describing the lower levels of an address. |
administrativeArea |
Type: The highest administrative subdivision which is used for postal addresses of a country or region. |
languageCode |
Type: BCP-47 language code of the contents of this address. Examples: "zh-Hant", "ja", "ja-Latn", "en". |
locality |
Type: Generally refers to the city/town portion of the address. |
organization |
Type: The name of the organization at the address. |
postalCode |
Type: Postal code of the address. |
recipients |
Type: The recipient at the address. |
regionCode |
Type: CLDR region code of the country/region of the address. Example: "CH" for Switzerland. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. |
sortingCode |
Type: Sorting code of the address. |
sublocality |
Type: Sublocality of the address such as neighborhoods, boroughs, or districts. |
PriceLevel constants
google.maps.places.PriceLevel
constants
Price level for a Place.
Access by calling const {PriceLevel} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constants | |
|---|---|
EXPENSIVE |
|
FREE |
|
INEXPENSIVE |
|
MODERATE |
|
VERY_EXPENSIVE |
|
PriceRange class
google.maps.places.PriceRange
class
The price range associated with a Place. endPrice could be unset, which indicates a range without upper bound (e.g. "More than $100").
Access by calling const {PriceRange} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
endPrice |
Type: The upper end of the price range (inclusive). Price should be lower than this amount. |
startPrice |
Type: The low end of the price range (inclusive). Price should be at or above this amount. |
Review class
google.maps.places.Review
class
Information about a review of a Place.
Access by calling const {Review} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
authorAttribution |
Type: The reviewer. |
flagContentURI |
Type: A link where user can flag a problem with the review. |
googleMapsURI |
Type: A link to show the review on Google Maps. |
originalText |
Type: The review text in its original language. |
originalTextLanguageCode |
Type: An IETF language code indicating the original language of the review. |
publishTime |
Type: |
rating |
Type: The rating of this review, a number between 1.0 and 5.0 (inclusive). |
relativePublishTimeDescription |
Type: A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. For example `"a month ago"'. |
text |
Type: The localized text of the review. |
textLanguageCode |
Type: An IETF language code indicating the localized language of the review. |
visitDateMonth |
Type: The month of the date when the review author visited the place. This field is 0-based; 0 is January, and 11 is December. |
visitDateYear |
Type: The year of the date when the review author visited the place. |
ReviewSummary class
google.maps.places.ReviewSummary
class
AI-generated summary of the place user reviews.
Access by calling const {ReviewSummary} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Properties | |
|---|---|
disclosureText |
Type: The text for the disclosure relating to this summary. |
disclosureTextLanguageCode |
Type: The language code of the disclosure text. |
flagContentURI |
Type: A URI to report a problem with the summary. |
reviewsURI |
Type: A URI to show reviews of this place on Google Maps. |
text |
Type: The summary of user reviews. |
textLanguageCode |
Type: The language code of the summary of user reviews. |
SearchByTextRequest interface
google.maps.places.SearchByTextRequest
interface
Request interface for Place.searchByText.
Properties | |
|---|---|
fields |
Type: Fields to be included in the response, which will be billed for. If |
evSearchOptions optional |
Type: EV-related options that can be specified for a place search request. |
includedType optional |
Type: The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only one included type is supported. See |
isOpenNow optional |
Type: Default: Used to restrict the search to places that are currently open. |
language optional |
Type: Place details will be displayed with the preferred language if available. Will default to the browser's language preference. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport. |
locationBias optional |
Type: The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with locationRestriction. |
locationRestriction optional |
Type: 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 locationBias. |
maxResultCount optional |
Type: Maximum number of results to return. It must be between 1 and 20, inclusively. |
minRating optional |
Type: 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. The input rating will be rounded 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. |
priceLevels optional |
Type: Used to restrict the search to places that are marked as certain price levels. Any combinations of price levels can be chosen. Defaults to all price levels. |
|
Type: |
|
Type: |
rankPreference optional |
Type: Default: How results will be ranked in the response. |
region optional |
Type: 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. |
textQuery optional |
Type: Required when you do not use |
useStrictTypeFiltering optional |
Type: Default: Used to set strict type filtering for |
google.maps.places.SearchByTextRankPreference
constants
RankPreference enum for SearchByTextRequest.
Access by calling const {SearchByTextRankPreference} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constants | |
|---|---|
DISTANCE |
Ranks results by distance. |
RELEVANCE |
Ranks results by relevance. |
SearchNearbyRequest interface
google.maps.places.SearchNearbyRequest
interface
Request interface for Place.searchNearby. For more information on the request, see Places API reference.
Properties | |
|---|---|
fields |
Type: Fields to be included in the response, which will be billed for. If |
locationRestriction |
Type: The region to search, specified as a circle with center and radius. Results outside given location are not returned. |
excludedPrimaryTypes optional |
Type: Excluded primary place types. See the full list of types supported. A place can only have a single primary type. Up to 50 types may be specified. If you specify the same type in both |
excludedTypes optional |
Type: Excluded place types. See the full list of types supported. A place can have many different place types. Up to 50 types may be specified. If you specify the same type in both |
includedPrimaryTypes optional |
Type: Included primary place types. See the full list of types supported. A place can only have a single primary type. Up to 50 types may be specified. If you specify the same type in both |
includedTypes optional |
Type: Included place types. See the full list of types supported. A place can have many different place types. Up to 50 types may be specified. If you specify the same type in both |
language optional |
Type: Place details will be displayed with the preferred language if available. Will default to the browser's language preference. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport. |
maxResultCount optional |
Type: Maximum number of results to return. For acceptable values and default, see Places API reference. |
rankPreference optional |
Type: Default: How results will be ranked in the response. |
region optional |
Type: 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. |
SearchNearbyRankPreference constants
google.maps.places.SearchNearbyRankPreference
constants
RankPreference enum for SearchNearbyRequest.
Access by calling const {SearchNearbyRankPreference} = await google.maps.importLibrary("places").
See Libraries in the Maps JavaScript API.
Constants | |
|---|---|
DISTANCE |
Ranks results by distance. |
POPULARITY |
Ranks results by popularity. |