Place

Place class

google.maps.places.Place class

Access by callingconst {Place} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

Place
Place(options)
Parameters:
searchByText
searchByText(request)
Parameters:
Return Value:Promise<{places:Array<Place>}>
Text query based place search.
searchNearby
searchNearby(request)
Parameters:
Return Value:Promise<{places:Array<Place>}>
Search for nearby places.
accessibilityOptions
Accessibility options of this Place.undefinedif the accessibility options data have not been called for from the server.
addressComponents
Type:Array<AddressComponent>optional
The collection of address components for this Place’s location. Empty object if there is no known address data.undefinedif the address data has not been called for from the server.
adrFormatAddress
Type:stringoptional
The representation of the Place’s address in theadr microformat.
allowsDogs
Type:booleanoptional
attributions
Type:Array<Attribution>optional
Attribution text to be displayed for this Place result.
businessStatus
Type:BusinessStatusoptional
The location's operational status.nullif there is no known status.undefinedif the status data has not been loaded from the server.
displayName
Type:stringoptional
The location's display name.nullif there is no name.undefinedif the name data has not been loaded from the server.
displayNameLanguageCode
Type:stringoptional
The language of the location's display name.nullif there is no name.undefinedif the name data has not been loaded from the server.
editorialSummary
Type:stringoptional
The editorial summary for this place.nullif there is no editorial summary.undefinedif this field has not yet been requested.
editorialSummaryLanguageCode
Type:stringoptional
The language of the editorial summary for this place.nullif there is no editorial summary.undefinedif this field has not yet been requested.
evChargeOptions
Type:EVChargeOptionsoptional
EV Charge options provided by the place.undefinedif the EV charge options have not been called for from the server.
formattedAddress
Type:stringoptional
The locations’s full address.
fuelOptions
Type:FuelOptionsoptional
Fuel options provided by the place.undefinedif the fuel options have not been called for from the server.
googleMapsURI
Type:stringoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
hasMenuForChildren
Type:booleanoptional
hasOutdoorSeating
Type:booleanoptional
hasRestroom
Type:booleanoptional
hasTakeout
Type:booleanoptional
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.
hasWiFi
Type:booleanoptional
iconBackgroundColor
Type:stringoptional
The default HEX color code for the place's category.
id
Type:string
The unique place id.
internationalPhoneNumber
Type:stringoptional
The Place’s phone number in international format. International format includes the country code, and is prefixed with the plus (+) sign.
isGoodForChildren
Type:booleanoptional
isGoodForGroups
Type:booleanoptional
isGoodForWatchingSports
Type:booleanoptional
isReservable
Type:booleanoptional
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:LatLngoptional
The Place’s position.
nationalPhoneNumber
Type:stringoptional
The Place’s phone number, formatted according to thenumber's regional convention.
parkingOptions
Type:ParkingOptionsoptional
Options of parking provided by the place.undefinedif the parking options data have not been called for from the server.
paymentOptions
Type:PaymentOptionsoptional
Payment options provided by the place.undefinedif the payment options data have not been called for from the server.
photos
Type:Array<Photo>optional
Photos of this Place. The collection will contain up to tenPhotoobjects.
plusCode
Type:PlusCodeoptional
priceLevel
Type:PriceLeveloptional
The price level of the Place. This property can return any of the following values
  • Free
  • Inexpensive
  • Moderate
  • Expensive
  • Very Expensive
primaryType
Type:stringoptional
The location's primary type.nullif there is no type.undefinedif the type data has not been loaded from the server.
primaryTypeDisplayName
Type:stringoptional
The location's primary type display name.nullif there is no type.undefinedif the type data has not been loaded from the server.
primaryTypeDisplayNameLanguageCode
Type:stringoptional
The language of the location's primary type display name.nullif there is no type.undefinedif the type data has not been loaded from the server.
rating
Type:numberoptional
A rating, between 1.0 to 5.0, based on user reviews of this Place.
regularOpeningHours
Type:OpeningHoursoptional
requestedLanguage
Type:stringoptional
The requested language for this place.
requestedRegion
Type:stringoptional
The requested region for this place.
reviews
Type:Array<Review>optional
A list of reviews for this Place.
servesBeer
Type:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
servesCoffee
Type:booleanoptional
servesDessert
Type:booleanoptional
servesDinner
Type:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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.
svgIconMaskURI
Type:stringoptional
URI to the svg image mask resource that can be used to represent a place’s category.
types
Type:Array<string>optional
An array oftypes for this Place(for example,[ "political", "locality" ]or[ "restaurant", "establishment" ]).
userRatingCount
Type:numberoptional
The number of user ratings which contributed to this Place’sPlace.rating.
utcOffsetMinutes
Type:numberoptional
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 theutc_offset_minuteswill be660.For timezones behind UTC, the offset is negative. For example, theutc_offset_minutesis-60for Cape Verde.
viewport
Type:LatLngBoundsoptional
The preferred viewport when displaying this Place on a map.
websiteURI
Type:stringoptional
The authoritative website for this Place, such as a business' homepage.
openingHours
Type:OpeningHoursoptional
fetchFields
fetchFields(options)
Parameters:
Return Value:Promise<{place:Place}>
BetagetNextOpeningTime
getNextOpeningTime([date])
Parameters:
Return Value:Promise<Dateoptional>
Calculates the Date representing the next OpeningHoursTime. Returns undefined if the data is insufficient to calculate the result, or this place is not operational.
BetaisOpen
isOpen([date])
Parameters:
  • date:DateoptionalDefaults to now.
Return Value:Promise<booleanoptional>
Check if the place is open at the given datetime. Resolves withundefinedif the known data for the location is insufficient to calculate this, e.g. if the opening hours are unregistered.
toJSON
toJSON()
Parameters:None
Return Value:Objecta JSON object with all the requested Place properties.

PlaceOptions interface

google.maps.places.PlaceOptions interface

Options for constructing a Place.

id
Type:string
The unique place id.
requestedLanguageoptional
Type:stringoptional
A language identifier for the language in which details should be returned. See thelist of supported languages.
requestedRegionoptional
Type:stringoptional
A region code of the user's region. This can affect which photos may be returned, and possibly other things. The region code accepts accTLD ( "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" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the entity of "The United Kingdom of Great Britain and Northern Ireland" ).

AccessibilityOptions class

google.maps.places.AccessibilityOptions class

Access by callingconst {AccessibilityOptions} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

hasWheelchairAccessibleEntrance
Type:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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

Access by callingconst {AddressComponent} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

longText
Type:stringoptional
The full text of the address component.
shortText
Type:stringoptional
The abbreviated, short text of the given address component.
types
Type:Array<string>
An array of strings denoting the type of this address component. A list of valid types can be foundhere.

Attribution class

google.maps.places.Attribution class

Access by callingconst {Attribution} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

provider
Type:stringoptional
Attribution text to be displayed for this Place result.
providerURI
Type:stringoptional

AuthorAttribution class

google.maps.places.AuthorAttribution class

Access by callingconst {AuthorAttribution} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

displayName
Type:string
Author's name for this result.
photoURI
Type:stringoptional
Author's photo URI for this result. This may not always be available.
uri
Type:stringoptional
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 callingconst {ConnectorAggregation} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

availabilityLastUpdateTime
Type:Dateoptional
The time when the connector availability information in this aggregation was last updated.
availableCount
Type:numberoptional
Number of connectors in this aggregation that are currently available.
count
Type:number
Number of connectors in this aggregation.
maxChargeRateKw
Type:number
The static max charging rate in kw of each connector of the aggregation.
outOfServiceCount
Type:numberoptional
Number of connectors in this aggregation that are currently out of service.
type
Type:EVConnectorTypeoptional
The connector type of this aggregation.

EVChargeOptions class

google.maps.places.EVChargeOptions class

Information about the EV charging station hosted in the place.

Access by callingconst {EVChargeOptions} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

connectorAggregations
A list of EV charging connector aggregations that contain connectors of the same type and same charge rate.
connectorCount
Type:number
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 callingconst {EVConnectorType} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

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.
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.

connectorTypesoptional
Type:Array<EVConnectorType>optional
The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out.
minimumChargingRateKwoptional
Type:numberoptional
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.

fields
Type:Array<string>
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 callingconst {FuelOptions} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

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 callingconst {FuelPrice} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

price
Type:Moneyoptional
The price of the fuel.
type
Type:FuelTypeoptional
The type of fuel.
updateTime
Type:Dateoptional
The time the fuel price was last updated.

FuelType constants

google.maps.places.FuelType constants

Types of fuel.

Access by callingconst {FuelType} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

BIO_DIESEL Bio-diesel.
DIESEL Diesel fuel.
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.

Money class

google.maps.places.Money class

A representation of an amount of money with its currency type.

Access by callingconst {Money} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

currencyCode
Type:string
The three-letter currency code, defined in ISO 4217.
nanos
Type:number
Number of nano (10^-9) units of the amount.
units
Type:number
The whole units of the amount. For example, ifMoney.currencyCodeis "USD", then 1 unit is 1 US dollar.
toString
toString()
Parameters:None
Return Value:string
Returns a human-readable representation of the amount of money with its currency symbol.

OpeningHours class

google.maps.places.OpeningHours class

Access by callingconst {OpeningHours} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

periods
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:Array<string>
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.

OpeningHoursPeriod class

google.maps.places.OpeningHoursPeriod class

Access by callingconst {OpeningHoursPeriod} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

close
Type:OpeningHoursPointoptional
The closing time for the Place.
open
The opening time for the Place.

OpeningHoursPoint class

google.maps.places.OpeningHoursPoint class

Access by callingconst {OpeningHoursPoint} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

day
Type:number
The day of the week, as a number in the range [0, 6], starting on Sunday. For example, 2 means Tuesday.
hour
Type:number
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:number
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 callingconst {ParkingOptions} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

hasFreeGarageParking
Type:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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 callingconst {PaymentOptions} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

acceptsCashOnly
Type:booleanoptional
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:booleanoptional
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:booleanoptional
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:booleanoptional
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

Access by callingconst {Photo} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

authorAttributions
Attribution text to be displayed for this photo.
heightPx
Type:number
The height of the photo in pixels.
widthPx
Type:number
The width of the photo in pixels.
getURI
getURI([options])
Parameters:
Return Value:string
Returns the image URL corresponding to the specified options.

PlusCode class

google.maps.places.PlusCode class

Access by callingconst {PlusCode} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

compoundCode
Type:stringoptional
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:stringoptional
A plus code with a 1/8000th of a degree by 1/8000th of a degree area. For example, "8FVC9G8F+5W".

PriceLevel constants

google.maps.places.PriceLevel constants

Price level enum for Place objects.

Access by callingconst {PriceLevel} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

EXPENSIVE
FREE
INEXPENSIVE
MODERATE
VERY_EXPENSIVE

Review class

google.maps.places.Review class

Access by callingconst {Review} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

authorAttribution
Type:AuthorAttributionoptional
The reviewer.
publishTime
Type:Dateoptional
rating
Type:numberoptional
The rating of this review, a number between 1.0 and 5.0 (inclusive).
relativePublishTimeDescription
Type:stringoptional
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:stringoptional
The text of a review.
textLanguageCode
Type:stringoptional
An IETF language code indicating the language in which this review is written. Note that this code includes only the main language tag without any secondary tag indicating country or region. For example, all the English reviews are tagged as'en'rather than 'en-AU' or 'en-UK'.

SearchByTextRequest interface

google.maps.places.SearchByTextRequest interface

Request interface forPlace.searchByText.

fields
Type:Array<string>
Fields to be included in the response,which will be billed for.If['*']is passed in, all available fields will be returned and billed for (this is not recommended for production deployments). You can request any property in thePlaceclass as a field.
evSearchOptionsoptional
Type:EVSearchOptionsoptional
EV-related options that can be specified for a place search request.
includedTypeoptional
Type:stringoptional
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. SeeSearchByTextRequest.useStrictTypeFiltering
isOpenNowoptional
Type:booleanoptional
Default:false
Used to restrict the search to places that are currently open.
languageoptional
Type:stringoptional
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.
locationBiasoptional
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.
locationRestrictionoptional
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.
maxResultCountoptional
Type:numberoptional
Maximum number of results to return. It must be between 1 and 20, inclusively.
minRatingoptional
Type:numberoptional
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.
priceLevelsoptional
Type:Array<PriceLevel>optional
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.
queryoptional
Type:stringoptional
BetarankByoptional
rankPreferenceoptional
Default:SearchByTextRankPreference.RELEVANCE
How results will be ranked in the response.
regionoptional
Type:stringoptional
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, seehttps://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.Note that 3-digit region codes are not currently supported.
textQueryoptional
Type:stringoptional
Required. The text query for textual search.
useStrictTypeFilteringoptional
Type:booleanoptional
Default:false
Used to set strict type filtering forSearchByTextRequest.includedType.If set to true, only results of the same type will be returned.

SearchByTextRankPreference constants

google.maps.places.SearchByTextRankPreference constants

RankPreference enum for SearchByTextRequest.

Access by callingconst {SearchByTextRankPreference} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

DISTANCE Ranks results by distance.
RELEVANCE Ranks results by relevance.

SearchNearbyRequest interface

google.maps.places.SearchNearbyRequest interface

Request interface forPlace.searchNearby.For more information on the request, seePlaces API reference.

fields
Type:Array<string>
Fields to be included in the response,which will be billed for.If['*']is passed in, all available fields will be returned and billed for (this is not recommended for production deployments). You can request any property in thePlaceclass as a field.
locationRestriction
The region to search, specified as a circle with center and radius. Results outside given location are not returned.
excludedPrimaryTypesoptional
Type:Array<string>optional
Excluded primary place type. See thefull 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 bothincludedandexcludedlists, an INVALID_ARGUMENT error is returned.
excludedTypesoptional
Type:Array<string>optional
Excluded place type. See thefull 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 bothincludedandexcludedlists, an INVALID_ARGUMENT error is returned.
includedPrimaryTypesoptional
Type:Array<string>optional
Included primary place type. See thefull 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 bothincludedandexcludedlists, an INVALID_ARGUMENT error is returned.
includedTypesoptional
Type:Array<string>optional
Included place type. See thefull 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 bothincludedandexcludedlists, an INVALID_ARGUMENT error is returned.
languageoptional
Type:stringoptional
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.
maxResultCountoptional
Type:numberoptional
Maximum number of results to return. It must be between 1 and 20, inclusively.
rankPreferenceoptional
Default:SearchNearbyRankPreference.DISTANCE
How results will be ranked in the response.
regionoptional
Type:stringoptional
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, seehttps://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 callingconst {SearchNearbyRankPreference} = await google.maps.importLibrary( "places" ).SeeLibraries in the Maps JavaScript API.

DISTANCE Ranks results by distance.
POPULARITY Ranks results by popularity.