The Google Places API is a service that returns information about Places — defined within this API as establishments, geographic locations, or prominent points of interest — using HTTP requests.
Introducing the API
The following place requests are available:
- Place Searches return a list of Places based on a user's location or search string.
- Place Details requests return more detailed information about a specific Place, including user reviews.
- Place Add allow you to supplement the data in Google's Places database with data from your application.
- Place Photos gives you access to the millions of Place related photos stored in Google's Place database.
- Place Autocomplete can be used to automatically fill in the name and/or address of a place as you type.
- Query Autocomplete can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type.
Each of the services is accessed as an HTTP request, and returns either an JSON or XML response. All requests to a Places service must use the https:// protocol, and include an API key.
The Places API uses a place ID to uniquely identify a place. For details about the format and usage of this identifier across the Places and other APIs, see the place ID documentation.
The Google Places API uses an API key to identify your application. You'll need your own server key before you can begin using the API. Follow these steps to create or modify a project for your app in the Google Developers Console and enable the Google Places API.
- Go to the Google Developers Console.
- Select a project, or create a new one.
- In the sidebar on the left, expand APIs & auth. Next, click APIs. In the list of APIs, make sure all of the APIs you are using show a status of ON.
- In the sidebar on the left, select Credentials.
- If your project doesn't already have a key for server applications, create an API key by selecting Create New Key and then selecting Server key.
- To prevent quota theft, restrict your key so that requests are only allowed from your servers' source IP addresses.
Do not use this key outside of your server code. For example, do not embed it in a web page or in a mobile application.
Places API Enterprise Customers
Some features of the Places API — such as review summaries, and certain request filters — requires additional licensing, available as part of a Places API enterprise license.
You can verify that your account has been enabled for Places API enterprise features as follows:
- Visit the Google Developers Console and log in with your Google Account.
- Select the project that was created for you when you signed up.
The project name will start with Google Maps API for Work.
- Click the Services link from the left-hand menu.
- The Places API - Zagat Content service should be enabled. Note that only the initial owner of the project will be able to see the Places API - Zagat Content service.
- The Places API service should be disabled.
Usage Limits and Requirements
All applications that use the Google Places API or Google Place Autocomplete must adhere to the requirements described in the Developer Policies and the Google Maps APIs Terms of Service. The Google Places API and Google Place Autocomplete share a usage quota as described in the Usage Limits and Billing documentation.