Select platform: [Android](https://developers.google.com/maps/documentation/places/android-sdk/nearby-search.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/places/ios-sdk/nearby-search.md.txt "View this page for the iOS platform docs.") [JavaScript](https://developers.google.com/maps/documentation/javascript/nearby-search.md.txt "View this page for the JavaScript platform docs.") [Web Service](https://developers.google.com/maps/documentation/places/web-service/nearby-search.md.txt "View this page for the Web Service platform docs.") **European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt).

> [!NOTE]
> **Important:** Using data returned by this endpoint is subject to applicable [policies and attributions for Places API](https://developers.google.com/maps/documentation/places/web-service/policies.md.txt).

## Introduction

A [Nearby Search (New)](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchNearby.md.txt)
request takes one or more place types, and returns a list of matching places within the
specified area. A field mask specifying one or more data types
is required. Nearby Search (New) only supports POST requests.

The APIs Explorer lets you make live requests so that you can get familiar with
the API and the API options:
[Try it!](https://developers.google.com/maps/documentation/places/web-service/nearby-search.md.txt#try_it)

Try the [interactive
demo](https://places-search-405409.ue.r.appspot.com/) to see Nearby Search (New) results displayed on a map.

## Nearby Search (New) requests

A Nearby Search (New) request is an HTTP POST request to a URL in the
form:

```
https://places.googleapis.com/v1/places:searchNearby
```

Pass all parameters in the JSON request body or in headers as part of the
POST request. For example:

```curl
curl -X POST -d '{
  "includedTypes": ["restaurant"],
  "maxResultCount": 10,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965},
      "radius": 500.0
    }
  }
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName" \
https://places.googleapis.com/v1/places:searchNearby
```

## Nearby Search (New) responses

Nearby Search (New) returns a
[JSON object as a response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchNearby.md.txt#response-body). In the response:

- The `places` array contains all matching places.
- Each place in the array is represented by a [`Place`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places.md.txt) object. The `Place` object contains detailed information about a single place.
- The [FieldMask](https://developers.google.com/maps/documentation/places/web-service/nearby-search.md.txt#fieldmask) passed in the request specifies the list of fields returned in the `Place` object.

The complete JSON object is in the form:

```
{
  "places": [
    {
      object (Place)
    }
  ]
}
```

## Required parameters

-

  ### FieldMask

  Specify the list of fields to return in the response by creating a
  [response field mask](https://developers.google.com/maps/documentation/places/web-service/choose-fields.md.txt).
  Pass the response field mask to the method by using the URL parameter
  `$fields` or `fields`, or by using the HTTP header
  `X-Goog-FieldMask`. There is no default list of returned fields in the response.
  If you omit the field mask, the method returns an error.

  Field masking is a good design practice to ensure that you don't request
  unnecessary data, which helps to avoid unnecessary processing time and
  billing charges.

  Specify a comma-separated list of place data types to return. For example,
  to retrieve the display name and the address of the place.

  ```javascript
  X-Goog-FieldMask: places.displayName,places.formattedAddress
  ```

  > [!NOTE]
  > **Note:**Spaces are not allowed anywhere in the field list.

  Use `*` to retrieve all fields.

  ```javascript
  X-Goog-FieldMask: *
  ```

  > [!NOTE]
  > While the wildcard (\*) is fine to use in development, Google discourages the use of the wildcard response field mask in production because of the large amount of data that can be returned.

  > [!NOTE]
  > Further guidance for using `places.iconMaskBaseUri` and `places.iconBackgroundColor` can be found in [Place Icons](https://developers.google.com/maps/documentation/places/web-service/icons.md.txt) section.

  Specify one or more of the following fields:
  - The following fields trigger the [Nearby Search Pro SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_nearbysearch-pro-sku):


    `places.accessibilityOptions`   

    `places.addressComponents`   

    `places.addressDescriptor`^\*^   

    `places.adrFormatAddress`   

    `places.attributions`   

    `places.businessStatus`   

    `places.consumerAlert`   

    `places.containingPlaces`   

    `places.displayName`   

    `places.formattedAddress`   

    `places.googleMapsLinks`   

    `places.googleMapsTypeLabel`   

    `places.googleMapsUri`   

    `places.iconBackgroundColor`   

    `places.iconMaskBaseUri`   

    `places.id`   

    `places.location`   

    `places.name`^\*\*^   

    `places.movedPlace`   

    `places.movedPlaceId`   

    `places.openingDate`   

    `places.photos`   

    `places.plusCode`   

    `places.postalAddress`   

    `places.primaryType`   

    `places.primaryTypeDisplayName`   

    `places.pureServiceAreaBusiness`   

    `places.shortFormattedAddress`   

    `places.subDestinations`   

    `places.timeZone`   

    `places.types`   

    `places.utcOffsetMinutes`   

    `places.viewport`  


    ^\*^ Address descriptors are generally available for customers in India and are experimental elsewhere.  


    ^\*\*^ The `places.name` field contains the place *resource name*
    in the form: `places/PLACE_ID`. Use `places.displayName`
    to access the text name of the place.


    For a complete list of fields and their associated SKUs, see [Place Data Fields (New)](https://developers.google.com/maps/documentation/places/web-service/data-fields.md.txt).

    <br />

  - The following fields trigger the [Nearby Search Enterprise SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_nearby-search-ent-sku):


    `places.currentOpeningHours`   

    `places.currentSecondaryOpeningHours`   

    `places.internationalPhoneNumber`   

    `places.nationalPhoneNumber`   

    `places.priceLevel`   

    `places.priceRange`   

    `places.rating`   

    `places.regularOpeningHours`   

    `places.regularSecondaryOpeningHours`   

    `places.transitStation`   

    `places.userRatingCount`   

    `places.websiteUri`


    For a complete list of fields and their associated SKUs, see [Place Data Fields (New)](https://developers.google.com/maps/documentation/places/web-service/data-fields.md.txt).

    <br />

  - The following fields trigger the [Nearby Search Enterprise + Atmosphere SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_nearby-search-ent-plus-sku):


    `places.allowsDogs`   

    `places.curbsidePickup`   

    `places.delivery`   

    `places.dineIn`   

    `places.editorialSummary`   

    `places.evChargeAmenitySummary`   

    `places.evChargeOptions`   

    `places.fuelOptions`   

    `places.generativeSummary`   

    `places.goodForChildren`   

    `places.goodForGroups`   

    `places.goodForWatchingSports`   

    `places.liveMusic`   

    `places.menuForChildren`   

    `places.neighborhoodSummary`   

    `places.parkingOptions`   

    `places.paymentOptions`   

    `places.outdoorSeating`   

    `places.reservable`   

    `places.restroom`   

    `places.reviews`   

    `places.reviewSummary`   

    `routingSummaries`^\*^  

    `places.servesBeer`   

    `places.servesBreakfast`   

    `places.servesBrunch`   

    `places.servesCocktails`   

    `places.servesCoffee`   

    `places.servesDessert`   

    `places.servesDinner`   

    `places.servesLunch`   

    `places.servesVegetarianFood`   

    `places.servesWine`   

    `places.takeout`  


    ^\*^ Text Search and Nearby Search only


    For a complete list of fields and their associated SKUs, see [Place Data Fields (New)](https://developers.google.com/maps/documentation/places/web-service/data-fields.md.txt).

    <br />

-

  ### locationRestriction

  The region to search specified as a circle, defined by center point and radius in meters.
  The radius must be between 0.0 and 50000.0, inclusive. The default radius is 0.0. You must
  set it in your request to a value greater than 0.0.

  For example:

  ```javascript
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965
      },
      "radius": 500.0
    }
  }
  ```

## Optional parameters

-

  ### includeFutureOpeningBusinesses

  If `true`, returns businesses that are expected
  to open in the future. Defaults to `false`.  


  To retrieve the business status, include
  `places.businessStatus` in your request field mask. To retrieve the anticipated
  opening date of the business, include `places.openingDate` in your request field
  mask.
-

  ### includedTypes/excludedTypes, includedPrimaryTypes/excludedPrimaryTypes

  Lets you specify a list of types from types
  [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) used to filter
  the search results. Up to 50 types can be specified in each type restriction category.

  > [!NOTE]
  > **Note:** The values in [Table B](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-b) are only returned in the response. You cannot use values in [Table B](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-b) as a filter.

  A place can only have a **single primary type** from types
  [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) associated with
  it. For example, the primary type might be
  `"mexican_restaurant"` or `"steak_house"`. Use
  `includedPrimaryTypes` and `excludedPrimaryTypes` to filter the results on
  a place's primary type.

  A place can also have **multiple type values** from types
  [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a)
  associated with it. For example a restaurant might have the following types:
  `"seafood_restaurant"`, `"restaurant"`, `"food"`,
  `"point_of_interest"`, `"establishment"`. Use `includedTypes`
  and `excludedTypes` to filter the results on the list of types associated with
  a place.

  When you specify a general primary type, such as `"restaurant"` or
  `"hotel"`, the response can contain places with a more specific primary type than
  the one specified. For example, you specify to include a primary type of
  `"restaurant"`. The response can then contain places with a primary type of
  `"restaurant"`, but the response can also contain places with a more specific
  primary type, such as `"chinese_restaurant"` or `"seafood_restaurant"`.

  If a search is specified with multiple type restrictions, only places
  that satisfy all of the restrictions are returned. For example, if you specify
  `{"includedTypes": ["restaurant"], "excludedPrimaryTypes": ["steak_house"]}`, the
  returned places provide `"restaurant"` related services but do not operate primarily
  as a `"steak_house"`.

  > [!NOTE]
  > If you omit `includedTypes`, `excludedTypes`, `includedPrimaryTypes`, and `excludedPrimaryTypes` from the request, the search returns places for all types from within the location restriction bounds.

  #### includedTypes

  A comma-separated list of the place types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) to search for.
  If this parameter is omitted, places of all types are returned.

  #### excludedTypes

  A comma-separated list of place types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) to exclude from a
  search.

  If you specify both the `includedTypes` ( such as `"school"`) and the
  `excludedTypes` (such as `"primary_school"`) in the request, then the
  response includes places that are categorized as `"school"` but not as
  `"primary_school"`. The response includes places that match **at least one** of
  the `includedTypes` and **none of** the `excludedTypes`.

  If there are any conflicting types, such as a type appearing in both `includedTypes`
  and `excludedTypes`, an `INVALID_REQUEST` error is returned.

  #### includedPrimaryTypes

  A comma-separated list of primary place types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) to include
  in a search.

  #### excludedPrimaryTypes

  A comma-separated list of primary place types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a) to exclude
  from a search.


  If there are any conflicting primary types, such as a type appearing in both
  `includedPrimaryTypes` and `excludedPrimaryTypes`, an
  `INVALID_ARGUMENT` error is returned.
-

  ### languageCode

  The language in which to return results.
  - See the list of [supported languages](https://developers.google.com/maps/faq.md.txt#languagesupport). Google often updates the supported languages, so this list may not be exhaustive.
  - If `languageCode` is not supplied, the API defaults to `en`. If you specify an invalid language code, the API returns an `INVALID_ARGUMENT` error.
  - The API does its best to provide a street address that is readable for both the user and locals. To achieve that goal, it returns street addresses in the local language, transliterated to a script readable by the user if necessary, observing the preferred language. All other addresses are returned in the preferred language. Address components are all returned in the same language, which is chosen from the first component.
  - If a name is not available in the preferred language, the API uses the closest match.
  - The preferred language has a small influence on the set of results that the API chooses to return, and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, such as the abbreviations for street types, or synonyms that may be valid in one language but not in another.
-

  ### maxResultCount

  Specifies the maximum number of place results to return. Must be between
  1 and 20 (default) inclusive.
-

  ### rankPreference

  The type of ranking to use. If this parameter is omitted, results are ranked by popularity.
  May be one of the following:
  - `POPULARITY` (default) Sorts results based on their popularity.
  - `DISTANCE` Sorts results in ascending order by their distance from the specified location.
-

  ### regionCode

  The region code used to format the response, specified as a
  [two-character CLDR code](https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html) value. There is no default value.

  If the country name of the `formattedAddress` field in the response matches the
  `regionCode`, the country code is omitted from `formattedAddress`.
  This parameter has no effect on `adrFormatAddress`, which always includes the country
  name, or on `shortFormattedAddress`, which never includes it.

  Most CLDR codes are identical to
  ISO 3166-1 codes,
  with some notable exceptions. For example, the United Kingdom's ccTLD is
  "uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the
  entity of "The United Kingdom of Great Britain and Northern Ireland").
  The parameter can affect results based on applicable law.

## Nearby Search (New) examples

### Find places of one type

The following example shows a Nearby Search (New) request for the display
names of all restaurants within a 500-meter radius, defined by `circle`:

```curl
curl -X POST -d '{
  "includedTypes": ["restaurant"],
  "maxResultCount": 10,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965},
      "radius": 500.0
    }
  }
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName" \
https://places.googleapis.com/v1/places:searchNearby
```

Note that the `X-Goog-FieldMask` header specifies that the response
contains the following data fields: `places.displayName`.
The [response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchNearby.md.txt#response-body)
is then in the form:

```json
{
  "places": [
    {
      "displayName": {
        "text": "La Mar Cocina Peruana",
        "languageCode": "en"
      }
    },
    {
      "displayName": {
        "text": "Kokkari Estiatorio",
        "languageCode": "en"
      }
    },
    {
      "displayName": {
        "text": "Harborview Restaurant & Bar",
        "languageCode": "en"
      }
    },
...
}
```

Add more data types to the field mask to return additional information.
For example, add `places.formattedAddress,places.types,places.websiteUri` to include the
restaurant address, type, and Web address in the response:

```curl
curl -X POST -d '{
  "includedTypes": ["restaurant"],
  "maxResultCount": 10,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965},
      "radius": 500.0
    }
  }
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName,places.formattedAddress,places.types,places.websiteUri" \
https://places.googleapis.com/v1/places:searchNearby
```

The [response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchNearby.md.txt#response-body)
is now in the form:

```json
{
  "places": [
    {
      "types": [
        "seafood_restaurant",
        "restaurant",
        "food",
        "point_of_interest",
        "establishment"
      ],
      "formattedAddress": "PIER 1 1/2 The Embarcadero N, San Francisco, CA 94105, USA",
      "websiteUri": "http://lamarsf.com/",
      "displayName": {
        "text": "La Mar Cocina Peruana",
        "languageCode": "en"
      }
    },
    {
      "types": [
        "greek_restaurant",
        "meal_takeaway",
        "restaurant",
        "food",
        "point_of_interest",
        "establishment"
      ],
      "formattedAddress": "200 Jackson St, San Francisco, CA 94111, USA",
      "websiteUri": "https://kokkari.com/",
      "displayName": {
        "text": "Kokkari Estiatorio",
        "languageCode": "en"
      }
    },
...
}
```

### Find places of multiple types

The following example shows a Nearby Search (New) request for the
display names of all convenience stores and liquor stores within a 1000-meter radius of the
specified `circle`:

```curl
curl -X POST -d '{
  "includedTypes": ["liquor_store", "convenience_store"],
  "maxResultCount": 10,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965
      },
      "radius": 1000.0
    }
  }
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName,places.primaryType,places.types" \
https://places.googleapis.com/v1/places:searchNearby
```
This example adds `places.primaryType` and `places.types` to the field mask so that the response includes type information about each place, making it easier to select the appropriate place from the results.

### Exclude a place type from a search

The following example shows a Nearby Search (New) request for all places
of type `"school"`, excluding all places of type `"primary_school"`, ranking the results
by distance:

```curl
curl -X POST -d '{
  "includedTypes": ["school"],
  "excludedTypes": ["primary_school"],
  "maxResultCount": 10,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965
      },
      "radius": 1000.0
    }
  },
  "rankPreference": "DISTANCE"
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName" \
https://places.googleapis.com/v1/places:searchNearby
```

### Search for all places near an area, ranking by distance

The following example shows a Nearby Search (New) request for places
near a point in downtown San Francisco. In this example, you include the `rankPreference`
parameter to rank the results by distance:

```curl
curl -X POST -d '{
  "maxResultCount": 10,
  "rankPreference": "DISTANCE",
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.7937,
        "longitude": -122.3965
      },
      "radius": 1000.0
    }
  }
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName" \
https://places.googleapis.com/v1/places:searchNearby
```

### Get address descriptors

Address descriptors provide relational information about a place's location, including nearby
landmarks and containing areas.

> [!NOTE]
> **Note:** Address descriptors are generally available for customers in India and are experimental elsewhere. Places API (New) requests that use only `addressDescriptor` in the field mask will be billed at [SKU: Places API Nearby Search Pro](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_nearbysearch-pro-sku).

The following example shows a Nearby Search (New) request for places near
a mall in San Jose. In this example, you include `addressDescriptors`
in the field mask:

```curl
curl -X POST -d '{
  "maxResultCount": 5,
  "locationRestriction": {
    "circle": {
      "center": {
        "latitude": 37.321328,
        "longitude": -121.946275
      },"radius": 1000
    }
  },
  "includedTypes": ["restaurant", "cafe"],
  "excludedTypes": [],
  "rankPreference":"POPULARITY"
}' \
-H 'Content-Type: application/json' \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName,places.addressDescriptor" \
https://places.googleapis.com/v1/places:searchNearby
```

The response includes the place specified in the request, a list of nearby landmarks and their
distance from the place, and a list of areas and their containment relationship to the
place:

```json
  {
    "places": [
      {
        "displayName": {
          "text": "Westfield Valley Fair",
          "languageCode": "en"
        },
        "addressDescriptor": {
          "landmarks": [
            {
              "name": "places/ChIJ62_oCR7Lj4AR_MGWkSPotD4",
              "placeId": "ChIJ62_oCR7Lj4AR_MGWkSPotD4",
              "displayName": {
                "text": "Nordstrom",
                "languageCode": "en"
              },
              "types": [
                "clothing_store",
                "department_store",
                "establishment",
                "point_of_interest",
                "shoe_store",
                "store"
              ],
              "straightLineDistanceMeters": 114.76984,
              "travelDistanceMeters": 114.261856
            },
            {
              "name": "places/ChIJgexMlR_Lj4ARiKCKuhNnjn0",
              "placeId": "ChIJgexMlR_Lj4ARiKCKuhNnjn0",
              "displayName": {
                "text": "Valley Fair Mall Eyexam of CA",
                "languageCode": "en"
              },
              "types": [
                "establishment",
                "health",
                "point_of_interest"
              ],
              "straightLineDistanceMeters": 131.62566,
              "travelDistanceMeters": 237.33253
            },
            {
              "name": "places/ChIJWWIlNx7Lj4ARpe1E0ob-_GI",
              "placeId": "ChIJWWIlNx7Lj4ARpe1E0ob-_GI",
              "displayName": {
                "text": "Din Tai Fung",
                "languageCode": "en"
              },
              "types": [
                "establishment",
                "food",
                "point_of_interest",
                "restaurant"
              ],
              "straightLineDistanceMeters": 110.0775,
              "travelDistanceMeters": 171.41951
            },
            {
              "name": "places/ChIJwyfPQx7Lj4AR7bYI2A2Yc54",
              "placeId": "ChIJwyfPQx7Lj4AR7bYI2A2Yc54",
              "displayName": {
                "text": "Abercrombie & Fitch",
                "languageCode": "en"
              },
              "types": [
                "clothing_store",
                "establishment",
                "point_of_interest",
                "shoe_store",
                "store"
              ],
              "spatialRelationship": "DOWN_THE_ROAD",
              "straightLineDistanceMeters": 53.620117,
              "travelDistanceMeters": 2.4578214
            },
            {
              "name": "places/ChIJpycNQx7Lj4ARjhXw3PrM_kU",
              "placeId": "ChIJpycNQx7Lj4ARjhXw3PrM_kU",
              "displayName": {
                "text": "Hollister Co.",
                "languageCode": "en"
              },
              "types": [
                "clothing_store",
                "establishment",
                "point_of_interest",
                "shoe_store",
                "store"
              ],
              "spatialRelationship": "DOWN_THE_ROAD",
              "straightLineDistanceMeters": 56.53726,
              "travelDistanceMeters": 15.418246
            }
          ],
          "areas": [
            {
              "name": "places/ChIJb3F-EB7Lj4ARnHApQ_Hu1gI",
              "placeId": "ChIJb3F-EB7Lj4ARnHApQ_Hu1gI",
              "displayName": {
                "text": "Westfield Valley Fair",
                "languageCode": "en"
              },
              "containment": "WITHIN"
            },
            {
              "name": "places/ChIJXYuykB_Lj4AR1Ot8nU5q26Q",
              "placeId": "ChIJXYuykB_Lj4AR1Ot8nU5q26Q",
              "displayName": {
                "text": "Valley Fair",
                "languageCode": "en"
              },
              "containment": "WITHIN"
            },
            {
              "name": "places/ChIJtYoUX2DLj4ARKoKOb1G0CpM",
              "placeId": "ChIJtYoUX2DLj4ARKoKOb1G0CpM",
              "displayName": {
                "text": "Central San Jose",
                "languageCode": "en"
              },
              "containment": "OUTSKIRTS"
            }
          ]
        }
      },
  /.../
  }
```

### Find businesses opening in the future

The following example shows a Nearby Search (New) request for businesses opening in the
future in New Meadows, Idaho:

```curl
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.id,places.displayName,places.businessStatus,places.openingDate" \
-d '{
  "includeFutureOpeningBusinesses": true,
  "maxResultCount": 20,
  "locationRestriction": {
    "circle": {
      "center": {"latitude": 44.9755100, "longitude": -116.2842180},
      "radius": 20
    }
  },
  "rankPreference": "DISTANCE"
}' \
"https://places.googleapis.com/v1/places:searchNearby"
```

The response includes businesses that will open in the future, along with their business status
and anticipated opening date:

```json
{
  "places": [
    {
      "id": "ChIJp1-VoKWJplQRMz8g-7Wa3Do",
      "businessStatus": "FUTURE_OPENING",
      "displayName": {
        "text": "Roberts Greenhouse and Tree Farm",
        "languageCode": "en"
      },
      "openingDate": {
        "year": 2026,
        "month": 4,
        "day": 15
      }
    }
  ]
}
```

### Get transit station information

You can use Nearby Search (New) to get information about transit stations within a specific radius of a given
location. The response body includes information about the station, including the station name,
affiliated transit agencies, and transit lines serving the station. Additionally, the response
includes a vehicle icon and colors that you can use to display the transit station information.

The following example shows a request for transit stations within 50 meters of midtown Manhattan:

```curl
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.id,places.displayName,places.transitStation" \
-d '{
  "includedTypes": ["transit_station"],
  "locationRestriction": {
    "circle": {
      "center": {"latitude": 40.754851, "longitude": -73.984164},
      "radius": 50.0
    }
  }
}' \
"https://places.googleapis.com/v1/places:searchNearby"
```

The response body includes information about each station within the radius, lines served by the
station, alerts issued by transit agencies at that stop, and departure information:

```json
{
  "places": [
    {
      "id": "ChIJH2EstKpZwokRCwZtYyMd5Fg",
      "displayName": {
        "text": "6 Av/W 41 St",
        "languageCode": "en"
      },
      "transitStation": {
        "displayName": {
          "text": "6 Av/W 41 St",
          "languageCode": "en"
        },
        "agencies": [
          {
            "displayName": {
              "text": "ShortLine Hudson",
              "languageCode": "en"
            },
            "url": "https://www.coachusa.com/",
            "lines": [
              {
                "id": "ChIJSQlbzvPwwokRolrIA-Kuh6o",
                "vehicleType": "BUS",
                "displayName": {
                  "text": "200 - Northern District -- Nanuet",
                  "languageCode": "en"
                },
                "shortDisplayName": {
                  "text": "ShortLine Hudson",
                  "languageCode": "en"
                },
                "textColor": "#000000",
                "backgroundColor": "#ED60A3",
                "vehicleIcon": {
                  "url": "https://maps.gstatic.com/mapfiles/transit/iw2/svg/bus2.svg"
                }
              }
            ]
          },
          {
            "displayName": {
              "text": "MTA New York City Transit",
              "languageCode": "en"
            },
            "url": "http://www.mta.info/",
            "lines": [
              {
                "id": "ChIJjUrj7PBewokR3O3S2JVpBrI",
                "vehicleType": "SUBWAY",
                "displayName": {
                  "text": "E Train (8 Av Local)",
                  "languageCode": "en"
                },
                "shortDisplayName": {
                  "text": "E Line",
                  "languageCode": "en"
                },
                "textColor": "#FFFFFF",
                "backgroundColor": "#0039A6",
                "url": "https://www.mta.info/schedules/subway/e-train",
                "icon": {
                  "url": "https://maps.gstatic.com/mapfiles/transit/iw2/svg/us-ny-mta/E.svg",
                  "nameIncluded": true
                },
                "vehicleIcon": {
                  "url": "https://maps.gstatic.com/mapfiles/transit/iw2/svg/subway2.svg"
                }
              },
              ...
            ]
          },
        "stops": [
          {
            "id": "ChIJvRnquapZwokRdUOyVwNGbe8",
            "displayName": {
              "text": "6 Av/W 41 St",
              "languageCode": "en"
            },
            "location": {
              "latitude": 40.754509,
              "longitude": -73.984216500000016
            },
            "wheelchairAccessibleEntrance": true
          }
        ],
        "departureBoards": [
          {
            "displayType": "DIRECTION_CENTRIC",
            "rows": [
              {
                "departures": [
                  {
                    "timedDeparture": {
                      "scheduledTime": "2026-05-15T22:29:51Z",
                      "timingType": "SCHEDULED"
                    },
                    "originallyScheduledStopId": "ChIJvRnquapZwokRdUOyVwNGbe8",
                    "lineId": "ChIJA1aFyaZfwokRkO5869M6UXk"
                  }
                ]
              },
              {
                "departures": [
                  {
                    "timedDeparture": {
                      "scheduledTime": "2026-05-15T22:33:55Z",
                      "timingType": "SCHEDULED"
                    },
                    "originallyScheduledStopId": "ChIJvRnquapZwokRdUOyVwNGbe8",
                    "lineId": "ChIJj3iCEwJfwokRZE2Qtnm4pPI"
                  }
                ]
              },
              ...
            ]
          }
        ]
      }
    },
    ...
    {
      {
        "id": "ChIJPyq6TZBZwokRdGoiJ5Iq_hE",
        "vehicleType": "BUS",
        "displayName": {
          "text": "W 44 St - South Ferry",
          "languageCode": "en"
        },
        "shortDisplayName": {
          "text": "M55",
          "languageCode": "en"
        },
        "textColor": "#FFFFFF",
        "backgroundColor": "#1D59B3",
        "vehicleIcon": {
          "url": "https://maps.gstatic.com/mapfiles/transit/iw2/svg/bus2.svg"
        },
        "alerts": [
          {
            "effect": "OTHER",
            "texts": [
              {
                "headline": {
                  "text": "Information",
                  "languageCode": "en"
                },
                "summary": {
                  "text": "Northbound M20 and M55 stop on State St at Bridge St is closed; use the temporary stop on State St before the intersection instead",
                  "languageCode": "en"
                },
                "fullDescription": {
                  "text": "See a map of the new stop location. What's happening? Construction",
                  "languageCode": "en"
                }
              }
            ],
            "detailsUrls": [
              {
                "url": "https://www.mta.info/"
              }
            ],
            "cause": "OTHER_CAUSE",
            "startTime": "2025-04-02T04:00:00Z",
            "endTime": "2026-06-15T00:00:00Z",
            "attribution": {
              "link": {
                "text": "www.mta.info",
                "url": "https://www.mta.info/"
              }
            },
            "createTime": "2026-05-15T22:32:00Z",
            "severityLevel": "INFO"
          }
        ]
      },
      ...
    }
    ...
  }
```

### Get entrances and navigation points

You can request entrances and navigation points for a destination. Entrances define entry and exit points for a place (for example, different gates at an airport or mall). Navigation points define road-side locations where navigation should end, which is useful for directing users to the correct side of the road or a specific drop-off point.

Navigation points return a `navigationPointToken`. You can pass this token to the Navigation SDK (available for [Android](https://developers.google.com/maps/documentation/navigation/android-sdk) or [iOS](https://developers.google.com/maps/documentation/navigation/ios-sdk)) or the [Routes API](https://developers.google.com/maps/documentation/routes) to guide drivers to that specific location. For more information, see [Navigation point tokens](https://developers.google.com/maps/documentation/geocoding/navigation-point-tokens.md.txt).

The following example shows a Nearby Search (New) request that includes `entrances` and `navigationPoints` in the field mask:

```curl
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.id,places.displayName,places.entrances,places.navigationPoints" \
-d '{
  "includedTypes": ["airport"],
  "maxResultCount": 1,
  "locationRestriction": {
    "circle": {
      "center": {"latitude": 37.6193, "longitude": -122.3816},
      "radius": 1000.0
    }
  }
}' \
"https://places.googleapis.com/v1/places:searchNearby"
```

The response includes the entrances and navigation points for the place:

```json
{
  "places": [
    {
      "id": "ChIJVVVVVYx3j4ARP-3NGldc8qQ",
      "displayName": {
        "text": "San Francisco International Airport",
        "languageCode": "en"
      },
      "entrances": [
        {
          "location": {
            "latitude": 37.6172154,
            "longitude": -122.3839724
          }
        },
        {
          "location": {
            "latitude": 37.6174073,
            "longitude": -122.384196
          }
        },
        ...
      ],
      "navigationPoints": [
        {
          "navigationPointToken": "ChIJoioBjMLOQkAR0A3yH_eYXsA...",
          "displayName": {
            "text": "International Terminal Departures Level",
            "languageCode": "en"
          },
          "location": {
            "latitude": 37.6153121,
            "longitude": -122.3900833
          },
          "travelModes": ["WALK"]
        },
        {
          "navigationPointToken": "ChIJy5JKws_OQkAROx0jNN2YXsA...",
          "displayName": {
            "text": "Domestic Garage - SFO Short Term Parking",
            "languageCode": "en"
          },
          "location": {
            "latitude": 37.6157153,
            "longitude": -122.3885012
          },
          "travelModes": ["DRIVE", "WALK"],
          "usages": ["PARKING"]
        },
        ...
      ]
    }
  ]
}
```

## Try it!

The APIs Explorer lets you make sample requests so
that you can get familiar with the API and the API options.

1. Select the API icon api
   on the right side of the page.

2. Optionally edit the request parameters.

3. Select the **Execute** button. In the dialog, choose the account
   that you want to use to make the request.

4. In the APIs Explorer panel, select the fullscreen icon
   fullscreen to expand the APIs Explorer window.