The Places API (New) includes the following APIs:
This document contains an overview of these new APIs.
Place Details (New)
A place ID uniquely identifies a place in the Google Places database and on Google Maps. With a place ID, you can request details about a particular establishment or point of interest by initiating a Place Details (New) request. A Place Details (New) request returns comprehensive information about the indicated place such as its complete address, phone number, user rating, and reviews.
There are many ways to obtain a place ID. You can use:
- Text Search (New)
- Nearby Search (New)
- Geocoding API
- Routes API
- Address Validation API
- Place Autocomplete
Place Photo (New)
The Place Photo (New) API lets you add high quality photographic content to your application by giving you access to the millions of photos stored in the Google Places database. Using the Place Photo (New) API, you can access the photos and resize the image to the optimal size for your application.
All requests to the Place Photo (New) API must include a photo resource name, which uniquely identifies the photo to return. You can obtain the photo resource name by using:
To include the photo resource name in the response from a Place Details (New),
Text Search (New), or Nearby Search (New) request, make sure that you include
the photos
field in the field mask of the request.
Text Search (New) and Nearby Search (New)
The Places API includes two search APIs:
-
Lets you specify a text string on which to search for a place. For example: "Spicy Vegetarian Food in Sydney, Australia" or "Fine seafood dining near Palo Alto, CA".
You can refine the search by specifying details such as price levels, current opening status, ratings, or specific place types. You can also specify to bias the results to a specific location, or restrict the search to a specific location.
-
Lets you specify a region to search along with a list of place types. Specify the region as a circle defined by the latitude and longitude coordinates of the center point and radius in meters.
Specify one or more place types that define the characteristics of the place. For example, specify "
pizza_restaurant
" and "shopping_mall
" to search for a pizza restaurant located in a shopping mall in the specified region.
The main difference between the two searches is that Text Search (New) lets you specify an arbitrary search string while Nearby Search (New) requires a specific area in which to search.
Autocomplete (New) and session tokens
Autocomplete (New) is a web service that returns place predictions and query predictions in response to an HTTP request. In the request, specify a text search string and geographic bounds that controls the search area.
Session tokens are user-generated strings that track Autocomplete (New) calls as sessions. Autocomplete (New) uses session tokens to group the query and selection phases of a user autocomplete search into a discrete session for billing purposes.
New fields, attributes, and accessibility options
The Places API (New) includes new fields, attributes, and accessibility options to provide users with more information about a place. These aspects are described in the following sections.
Fields
The Places API (New) includes several new fields:
Field | Description |
---|---|
regularSecondaryOpeningHours |
Describes particular times for certain operations. Secondary opening 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. |
paymentOptions |
Payment options the place accepts. A place can accept more than
one payment option. If payment option data is not available, the
payment option field will be unset. Options include the following:
|
parkingOptions |
Parking options provided by the place. Options include the following:
|
subDestinations |
Unique places that are related to a particular place. For example, airport terminals are considered sub-destinations of an airport. |
fuelOptions |
The most recent information about fuel options available at a
gas station. This information is updated regularly. Options include
the following:
|
evChargeOptions |
Number of electric vehicle (EV) chargers at this station. While some EV chargers have multiple connectors, each charger can only charge one vehicle at a time; as a result, this field reflects the number of available EV chargers at a given time. |
shortFormattedAddress |
A short, human-readable address for a place. |
primaryType |
The primary type of the given result. For example, a place may
be classified as a cafe or an airport . A
place can only have a single primary type. For the complete list of
possible values, see Supported types. |
primaryTypeDisplayName |
The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Supported types. |
Attributes
The Places API (New) includes several new attributes:
Attribute | Description |
---|---|
outdoorSeating |
Place provides outdoor seating. |
liveMusic |
Place provides live music. |
menuForChildren |
Place has a children's menu. |
servesCocktails |
Place serves cocktails. |
servesDessert |
Place serves dessert. |
servesCoffee |
Place serves coffee. |
goodForChildren |
Place is good for children. |
allowsDogs |
Place allows dogs. |
restroom |
Place has a restroom. |
goodForGroups |
Place accommodates groups. |
goodForWatchingSports |
Place is suitable for watching sports. |
Accessibility options
The Places API (New) includes the following accessibility option fields:
Field | Description |
---|---|
wheelchairAccessibleParking |
Place offers wheelchair-accessible parking. |
wheelchairAccessibleEntrance |
Place has a wheelchair-accessible entrance. |
wheelchairAccessibleRestroom |
Place has a wheelchair-accessible restroom. |
wheelchairAccessibleSeating |
Place has wheelchair-accessible seating. |
Migrate to the New Places APIs
If you are an existing Places API customer and want to migrate your app to use the new APIs, see the following migration documentation:
- Migrate to Place Details (New)
- Migrate to Nearby Search (New)
- Migrate to Text Search (New)
- Migrate to Place Photo (New)
- Migrate to Autocomplete (New)