Why use the Places API
Create location-aware features to make detailed location data available to your users. The data available through the Places API is built on one of the most accurate, up-to-date, and comprehensive place models of the real world. Here are example use cases for applications:
- Display condo rentals within major metropolitan areas with results targeted specifically to cities.
- Include place details in a pickup or delivery status update.
- Display a list of parks in an area along with user-submitted photos and reviews.
- Provide people planning trips with contact information, reviews, and price levels for establishments along the way.
What can you do with the Places API
You can use the Places API to include the following features in your applications:
- Provide place search results from different types of users queries, such as text input, nearby locations, and ambiguous or categorical user queries.
- Enable autocomplete features for different search types, either specific text queries or categorical queries.
- Refine the type of details returned about a place, such as operating hours, a summary, user reviews, and a photo.
- Add high-quality photos to locations served by your application.
Many Google Maps Platform APIs support place IDs, where the place ID uniquely identifies a place in the Google Places database and on Google Maps. There are many ways to obtain a place ID, including from the Places API, but also from the Geocoding API, Routes API, and Address Validation API.
Once you have a place ID, you can use the Places API to request more details about a particular establishment or point of interest, such as its complete address, phone number, user rating, and reviews.
How the Places API (New) works
Places API (New) accepts requests as a standard URL with a specific
service endpoint, such as /places
or places:searchText
and returns a JSON response. Places API (New) supports authorization by
API key and OAuth token.
The following example makes a Place Details (New) request to return the address components for a
place ID using an API key:
https://places.googleapis.com/v1/places/GyuEmsRBfy61i59si0?fields=addressComponents &key= YOUR_API_KEY
How to use the Places API
The steps below cover a typical use case scenario for using the Places API service. As you build out your solution, you can use additional endpoints, such as Nearby Search (New) and Place Photo (New).1 | Get set up | Start with Set up your Google Cloud project and complete the setup instructions that follow and then learn how to use your API key. |
2 | Try a basic text search | Issue a text search by using Text Search (New). |
3 | Use the place ID for more details | Many Google Maps Platform APIs return a place ID as part of a response. Use place IDs to get Place Details (New). |
4 | Get a photo for a place | The Place Photo (New) service gives you access to the millions of photos stored in the Places database. Use Place Photo (New) to access photos for a place. |