Google

Places API (New)

The Places API allows developers to access a variety of search and retrieval endpoints for a Place.

Maps & location#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The Places API allows developers to access a variety of search and retrieval endpoints for a Place.

Endpoints 4

places

  • POSTReturns predictions for the given input./v1/places:autocompleteReturns predictions for the given input.
  • POSTSearch for places near locations./v1/places:searchNearbySearch for places near locations.
  • POSTText query based place search./v1/places:searchTextText query based place search.

places.photos

  • GETGet a photo media with a photo reference string./v1/:name?maxHeightPx=0&maxWidthPx=0&skipHttpRedirect=trueGet a photo media with a photo reference string.

API details

Base URL
https://places.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 7 scopes
An API key in the key query parameter
Operations
4 operations on 4 pathsPOST 3GET 1
Main resources
places 3places.photos 1
Response formats
application/json
Description format
Google API Discovery, API version v1

How to test the Places API (New) in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Places API (New) collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 7 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Returns predictions for the given input.” (POST /v1/places:autocomplete), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Places API (New)?

The Places API allows developers to access a variety of search and retrieval endpoints for a Place. It is listed under Maps & location and has 4 endpoints.

Who publishes the Places API (New)?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Places API (New)?

Requests go to https://places.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Places API (New)?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 7 scopes; an API key in the key query parameter.

How many endpoints does the Places API (New) have?

4 operations on 4 paths (3 POST, 1 GET). The largest groups are places, places.photos.

Is forking the Places API (New) free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.