The Places API (New) provides improved performance and a new pricing model, making it worthwhile to update apps that use Places API. For more details on comparing features, seeChoose your API.
Use this guide to understand key differences in Places API (New) compared to Places API, along with how to handle necessary changes.
Enable Places API (New)
To use the features of Places API (New), you must first enable Places API (New)in your Google Cloud project. For more information, seeSet up your Google Cloud project.
You then must ensure that you have addedPlaces API (New)to the API key used by your app. For more information, seeUse API Keys.
General changes
Some general changes that apply to multiple APIs include:
- All new APIs support both API keys andOAuth tokens as the authentication mechanism.
- Only JSON is supported as a response format.
- Field masking is required by Place Details (New), Nearby Search (New), and Text Search (New) to specify which fields you want returned in the response. For more information, see FieldMask.
- TheNearby Search (New) andText Search (New) APIs now return the full place details to match the place details returned byPlace Details (New).
- The JSON response format for the Place Details (New), Nearby Search (New), andText Search (New) APIs has changed from the format of the existing APIs. For more details, see Migrate the Places API response.
API-specific changes
This section includes the following migration guides for each API: