---
title: "POST /v1/places:searchNearby"
method: POST
path: "/v1/places:searchNearby"
tags: ["places"]
---

# POST /v1/places:searchNearby

`POST /v1/places:searchNearby`

Search for places near locations.

## Request body

- GoogleMapsPlacesV1SearchNearbyRequest — Request proto for Search Nearby.
  - `includedPrimaryTypes` string[] — Included primary Place type (e.g. "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types. A place can only have a single primary type from the supported types table associated with it. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".
  - `rankPreference` 'RANK_PREFERENCE_UNSPECIFIED' | 'DISTANCE' | 'POPULARITY' — How results will be ranked in the response.
  - `routingParameters` GoogleMapsPlacesV1RoutingParameters — Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.
    - `routeModifiers` GoogleMapsPlacesV1RouteModifiers — Encapsulates a set of optional conditions to satisfy when calculating the routes.
      - `avoidTolls` boolean — Optional. When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the `DRIVE` and `TWO_WHEELER` `TravelMode`.
      - `avoidFerries` boolean — Optional. When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the `DRIVE` and `TWO_WHEELER` `TravelMode`.
      - `avoidHighways` boolean — Optional. When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the `DRIVE` and `TWO_WHEELER` `TravelMode`.
      - `avoidIndoor` boolean — Optional. When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the `WALK` `TravelMode`.
    - `travelMode` 'TRAVEL_MODE_UNSPECIFIED' | 'DRIVE' | 'BICYCLE' | 'WALK' | 'TWO_WHEELER' — Optional. The travel mode.
    - `origin` GoogleTypeLatLng — An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
      - `latitude` number, double — The latitude in degrees. It must be in the range [-90.0, +90.0].
      - `longitude` number, double — The longitude in degrees. It must be in the range [-180.0, +180.0].
    - `routingPreference` 'ROUTING_PREFERENCE_UNSPECIFIED' | 'TRAFFIC_UNAWARE' | 'TRAFFIC_AWARE' | 'TRAFFIC_AWARE_OPTIMAL' — Optional. Specifies how to compute the routing summaries. The server attempts to use the selected routing preference to compute the route. The traffic aware routing preference is only available for the `DRIVE` or `TWO_WHEELER` `travelMode`.
  - `excludedPrimaryTypes` string[] — Excluded primary Place type (e.g. "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".
  - `regionCode` string — The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.
  - `excludedTypes` string[] — Excluded Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If the client provides both included_types (e.g. restaurant) and excluded_types (e.g. cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".
  - `languageCode` string — Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.
  - `locationRestriction` GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction — The region to search.
    - `circle` GoogleMapsPlacesV1Circle — Circle with a LatLng as center and radius.
      - `center` GoogleTypeLatLng — An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
        - `latitude` number, double — The latitude in degrees. It must be in the range [-90.0, +90.0].
        - `longitude` number, double — The longitude in degrees. It must be in the range [-180.0, +180.0].
      - `radius` number, double — Required. Radius measured in meters. The radius must be within [0.0, 50000.0].
  - `includedTypes` string[] — Included Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".
  - `maxResultCount` integer — Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
  - `includeFutureOpeningBusinesses` boolean — Optional. If true, include businesses that are not yet open but will open in the future.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/places.md) · [All operations](https://skmtc.dev/google/apis/places/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/places/revisions/c534dce48795/schema)
