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. API keys are managed through the Google APIs Console. You'll need your own server API key before you can begin using the API. To activate the Places API and create your key:
- Visit the Google APIs Console and log in with your Google account.
- A default project called API Project is created for you when you first log in to the APIs Console. You can use the project, or create a new one by clicking the API Project button at the top of the window and selecting Create. Google Maps API for Work customers must use the API project created for them as part of their Google Places API for Work purchase.
- Click the Services link in the left-hand navigation panel.
- Click the status switch (the on/off button) next to the Places API entry. The switch slides to ON.
- Click API Access in the left-hand navigation panel.
- Click Create new Server key.
- Enter one or more server IP addresses if you wish to restrict the servers that can send API requests.
- Click Create. Your API key appears under the heading Key for server apps (with IP locking).
Note: The Places API does not work with an Android or iOS API key.
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 APIs 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.