places

POST /v1/places:searchText

Changed on

Text query based place search.

Request

  • Base URL
    https://places.googleapis.com
  • URL
    https://places.googleapis.com/v1/places:searchText
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/maps-platform.places
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/maps-platform.places
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/maps-platform.places.textsearch
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/maps-platform.places.textsearch

Request body

includeFutureOpeningBusinessesboolean

Optional. If true, include businesses that are not yet open but will open in the future.

includePureServiceAreaBusinessesboolean

Optional. Include pure service area businesses if the field is set to true. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps. Places will not return fields including location, plus_code, and other location related fields for these businesses.

includedTypestring

The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only support one included type.

languageCodestring

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.

maxResultCountinteger

Deprecated: Use page_size instead. The maximum number of results per page that can be returned. If the number of available results is larger than max_result_count, a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be coerced to 20. Negative values will return an INVALID_ARGUMENT error. If both max_result_count and page_size are specified, max_result_count will be ignored.

minRatingnumber double

Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating.

openNowboolean

Used to restrict the search to places that are currently open. The default is false.

pageSizeinteger

Optional. The maximum number of results per page that can be returned. If the number of available results is larger than page_size, a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be set to 20. Negative values will return an INVALID_ARGUMENT error. If both max_result_count and page_size are specified, max_result_count will be ignored.

pageTokenstring

Optional. A page token, received from a previous TextSearch call. Provide this to retrieve the subsequent page. When paginating, all parameters other than page_token, page_size, and max_result_count provided to TextSearch must match the initial call that provided the page token. Otherwise an INVALID_ARGUMENT error is returned.

priceLevelsstring[]

Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels.

rankPreference'RANK_PREFERENCE_UNSPECIFIED' | 'DISTANCE' | 'RELEVANCE'

How results will be ranked in the response.

regionCodestring

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.

strictTypeFilteringboolean

Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false.

textQuerystring

Required. The text query for textual search.

Response

Successful response

nextPageTokenstring

A token that can be sent as page_token to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.

searchUristring

A link allows the user to search with the same text query as specified in the request on Google Maps.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/maps-platform.places.textsearch was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/maps-platform.places.textsearch was removed from the endpoint's security scheme Oauth2c

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/maps-platform.places.textsearch was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/maps-platform.places.textsearch was removed from the endpoint's security scheme Oauth2c