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

<br />

**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).

<br />

## Introduction

[Text Search (New)](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchText.md.txt)
returns information about a set of places based on a string (for example,
"pizza in New York" or "shoe stores near Ottawa" or "123 Main Street"). The
service responds with a list of places matching the text string and any location
bias that has been set.

In addition to [required parameters](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#required-parameters),
Text Search (New) supports refining queries using
[optional parameters](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#optional-parameters) for better results.

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/text-search.md.txt#try_it)

## Text Search (New) requests

A Text Search (New) request is an HTTP POST request of the following form:

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

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

```
curl -X POST -d '{
  "textQuery" : "Spicy Vegetarian Food in Sydney, Australia"
}' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H 'X-Goog-FieldMask: places.displayName,places.formattedAddress,places.priceLevel' \
'https://places.googleapis.com/v1/places:searchText'
```

## Text Search (New) responses

Text Search (New) returns a
[JSON object as a response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchText.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/text-search.md.txt#fieldmask) passed in the request specifies the list of fields returned in the `Place` object.
- The list of places returned is not guaranteed to be consistent for identical requests.

The complete JSON object is in the form:

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

> [!NOTE]
> **Note:** Text Search (New) returns a maximum of 60 results across all pages, although this limit is subject to change.

## 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 [Text Search Essentials ID Only SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_text-search-id-only-ess-sku):

    `places.attributions`   
    `places.id`   
    `places.consumerAlert`   
    `places.name`^\*^   
    `nextPageToken`  
    `places.movedPlace`   
    `places.movedPlaceId`

    ^\*^ The `places.name` field contains the place *resource name*
    in the form: `places/PLACE_ID`. Use `places.displayName` in the Pro SKU
    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).
  - The following fields trigger the [Text Search Pro SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_text-search-pro-sku):

    `places.accessibilityOptions`   
    `places.addressComponents`   
    `places.addressDescriptor`^\*^   
    `places.adrFormatAddress`   
    `places.businessStatus`   
    `places.containingPlaces`   
    `places.displayName`   
    `places.formattedAddress`   
    `places.googleMapsLinks`   
    `places.googleMapsTypeLabel`   
    `places.googleMapsUri`   
    `places.iconBackgroundColor`   
    `places.iconMaskBaseUri`   
    `places.location`   
    `places.openingDate`   
    `places.photos`   
    `places.plusCode`   
    `places.postalAddress`   
    `places.primaryType`   
    `places.primaryTypeDisplayName`   
    `places.pureServiceAreaBusiness`   
    `places.shortFormattedAddress`   
    `places.searchUri`   
    `places.subDestinations`   
    `places.timeZone`   
    `places.types`   
    `places.utcOffsetMinutes`   
    `places.viewport`  

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

    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).
  - The following fields trigger the [Text Search Enterprise SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_text-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).
  - The following fields trigger the [Text Search Enterprise + Atmosphere SKU](https://developers.google.com/maps/billing-and-pricing/sku-details/places.md.txt#places_text-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).
-

  ### textQuery

  The text string on which to search. For example, "restaurant",
  "123 Main Street", or "Best place to visit in San Francisco". The API
  returns candidate matches based
  on this string and orders the results based on their perceived relevance.

  Text Search (New) is **not** intended for ambiguous
  queries, including the following:

  | Query type | Example |
  |---|---|
  | Too many concepts or constraints, such as the names of multiple places, roads, or cities in a single query | *"Market Street San Francisco San Jose Airport"* |
  | Postal address elements not represented on Google Maps | *"C/O John Smith 123 Main Street"* *"P.O. Box 13 San Francisco"* |
  | Names of businesses, chains, or categories combined with locations where these entities are not available | *"Tesco near Dallas, Texas"* |
  | Ambiguous queries with multiple interpretations | *"Charger drop-off"* |
  | Historical names no longer in use | *"Middlesex United Kingdom"* |
  | Non-geospatial elements or intent | *"How many boats are in Ventura Harbor?"* |
  | Unofficial or vanity names | *"The Jenga"* *"The Helter Skelter"* |
  | Latitude and longitude coordinates | *"37.422131,-122.084801"* |

  > [!NOTE]
  > **Note:** For best results when searching on a phone number, include the country code followed by a space, and set the [`regionCode`](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#regioncode) parameter to correspond to the country code. Phone number formats vary by country and the API attempts to return a result for these different formats. For valid phone numbers, Places API (New) supports the [E.164 format](https://en.wikipedia.org/wiki/E.164). Alphabet characters are converted based on the [E.161 keypad
  > mapping](https://en.wikipedia.org/wiki/E.161).

## Optional parameters

-

  ### includeFutureOpeningBusinesses

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

  <br />


  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.
-

  ### includedType

  Biases the results to places matching the specified type defined by
  [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#table-a).
  You can specify only one type. For example:
  - `"includedType":"bar"`
  - `"includedType":"pharmacy"`

  > [!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.

  Text Search (New) applies type filtering for certain queries, depending on applicability. For example, type filtering may not be applied to queries for specific addresses ("123 Main Street"), but type filtering is almost always applied to categorical queries ("stores nearby" or "shopping malls").

  To apply type filtering to all queries, set [`strictTypeFiltering`](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#stricttypefiltering) to `true`.

  > [!CAUTION]
  > This parameter does not apply to hotel queries or geopolitical queries (for example, queries related to administrative areas, localities, postal codes, school districts, or countries).

-

  ### includePureServiceAreaBusinesses

  If set to `true`, the response includes businesses that visit
  or deliver to customers directly, but don't have a physical business
  location. If set to `false`, the API returns only businesses with
  a physical business location.
-

  ### 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.
-

  ### locationBias

  Specifies an area to search. This location serves as a bias which means
  results around the specified location can be returned, including results
  outside the specified area.

  You can specify `locationRestriction` or `locationBias`,
  but not both. Think of `locationRestriction` as specifying the
  region which the results must be within, and `locationBias` as
  specifying the region that the results will likely be inside or near but can
  be outside of the area.

  > [!NOTE]
  > **Note:** If you omit both `locationBias` and `locationRestriction`, then the API uses IP biasing by default. With IP biasing, the API uses the device's IP address to bias the results.

  > [!NOTE]
  > **Note:** The `locationBias` parameter can be overridden if the `textQuery` contains an explicit location such as `Market in Barcelona`. In this case, `locationBias` is ignored.

  Specify the region as a **rectangular Viewport** or as a **circle**.
  - A circle is 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.
    For example:

    ```javascript
    "locationBias": {
      "circle": {
        "center": {
          "latitude": 37.7937,
          "longitude": -122.3965
        },
        "radius": 500.0
      }
    }
    ```
  - A rectangle is a latitude-longitude viewport, represented as two
    diagonally opposite low and high points. The low point marks the southwest
    corner of the rectangle, and the high point represents the northeast
    corner of the rectangle.

    A viewport is considered a
    closed region, meaning it includes its boundary. The latitude bounds
    must range between -90 and 90 degrees inclusive, and the longitude bounds
    must range between -180 and 180 degrees inclusive:
    - If `low` = `high`, the viewport consists of that single point.
    - If `low.longitude` \> `high.longitude`, the longitude range is inverted (the viewport crosses the 180 degree longitude line).
    - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport includes all longitudes.
    - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, the longitude range is empty.
    - If `low.latitude` \> `high.latitude`, the latitude range is empty.

    Both low and high must be populated, and the represented box cannot be
    empty. An empty viewport results in an error.

    For example, this viewport fully encloses New York City:

    ```javascript
    "locationBias": {
      "rectangle": {
        "low": {
          "latitude": 40.477398,
          "longitude": -74.259087
        },
        "high": {
          "latitude": 40.91618,
          "longitude": -73.70018
        }
      }
    }
    ```
-

  ### locationRestriction

  Specifies an area to search for **categorical queries only**, which can return multiple places (for example,
  "Restaurants in New York" or "Shopping malls"). Results outside the
  specified area are not returned.

  Specify the region as a **rectangular Viewport** . For an example of
  defining the Viewport, see the description
  of [`locationBias`](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#location-bias).

  You can specify `locationRestriction` or `locationBias`,
  but not both. Think of `locationRestriction` as specifying the
  region which the results must be within, and `locationBias` as
  specifying the region that the results will likely be inside or near but can
  be outside of the area.

  > [!NOTE]
  > **Note:** If you omit both `locationBias` and `locationRestriction`, then the API uses IP biasing by default. With IP biasing, the API uses the IP address of the device to bias the results.

-

  ### evOptions

  Specifies parameters for identifying available electric vehicle (EV)
  charging connectors and charging rates.
  -

    #### connectorTypes

    Filters by the type of EV charging connector available at a place. A
    place that does not support any of the connector types will be filtered
    out.

    Supported EV charging connector types include combined (AC and DC)
    chargers, Tesla chargers, GB/T-compliant chargers (for EV fast charging in
    China), and wall outlet chargers. For more information, see the [reference
    documentation.](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchText#evoptions)
    - To filter results for a [specific supported connector](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places.md.txt#evconnectortype), set `connectorTypes` to that value. For example, to find J1772 type 1 connectors, set `connectorTypes` to `EV_CONNECTOR_TYPE_J1772`.
    - To filter results for **unsupported** connectors, set `connectorTypes` to `EV_CONNECTOR_TYPE_OTHER`.
    - To filter results for any connector type that is a wall outlet, set `connectorTypes` to `EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET`.
    - To filter results for any connector type, either set `connectorTypes` to `EV_CONNECTOR_TYPE_UNSPECIFIED` or don't set a value for `connectorTypes`.
  -

    #### minimumChargingRateKw

    Filters places by minimum EV charging rate in kilowatts (kW). Any
    places with a charging rate less than the minimum charging rate are
    filtered out. For example, to find EV chargers with charging rates that
    are at least 10 kW, you can set this parameter to "10."
-

  ### minRating

  Restricts results to only those whose average user rating is greater than
  or equal to this limit. Values must be between 0.0 and 5.0 (inclusive) in
  increments of 0.5. For example: 0, 0.5, 1.0, ... , 5.0 inclusive. Values are
  rounded up to the nearest 0.5. For example, a value of 0.6 eliminates all
  results with a rating less than 1.0.

  > [!CAUTION]
  > This parameter does not apply to hotel queries or geopolitical queries (for example, queries related to administrative areas, localities, postal codes, school districts, or countries).

-

  ### openNow

  If `true`, return only those places that are open for business
  at the time the query is sent. If `false`, return all businesses
  regardless of open status.
  Places that don't specify opening hours in the Google Places database are
  returned if you set this parameter to `false`.

  > [!CAUTION]
  > This parameter does not apply to hotel queries or geopolitical queries (for example, queries related to administrative areas, localities, postal codes, school districts, or countries).

-

  ### pageSize

  Specifies the number of results, between 1 and 20, to display on each
  page. For example, setting a `pageSize` value of 5 returns up to
  5 results on the first page. If the query can return more results, the
  response includes a `nextPageToken` that you can pass in a
  subsequent request to access the next page.

  This field replaces the deprecated `maxResultCount` field. If
  you specify both `pageSize` and `maxResultCount`, the
  API uses `pageSize` and ignores `maxResultCount`.
  **Note:** If `pageSize` is 0 or unspecified, the API returns 20 results on each page by default. If `pageSize` is greater than 20, the API returns at most 20 results on each page.
-

  ### pageToken

  Specifies the `nextPageToken` from the response body of the
  previous page.
-

  ### priceLevels

  Restrict the search to places that are marked at certain price levels.
  The default is to select all price levels.

  Price levels can be expected for places of the following types:
  - [Food and Drink](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#food-and-drink)
  - [Services](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#services)
  - [Shopping](https://developers.google.com/maps/documentation/places/web-service/place-types.md.txt#shopping)

  Places of non-supported types won't be included in the response if `priceLevels` is specified.

  Specify an array of one or more values defined by
  [`PriceLevel`](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places.md.txt#pricelevel).

  For example:

  ```javascript
  "priceLevels":["PRICE_LEVEL_INEXPENSIVE", "PRICE_LEVEL_MODERATE"]
  ```

  > [!NOTE]
  > **Note:** `PRICE_LEVEL_FREE` is not allowed in a request. It is only used to populate the response.

  > [!CAUTION]
  > This parameter does not apply to hotel queries or geopolitical queries (for example, queries related to administrative areas, localities, postal codes, school districts, or countries).

-

  ### rankPreference

  Specifies how the results are ranked in the response based on the type of
  query:
  - For a categorical query such as "Restaurants in New York City", `RELEVANCE` (rank results by search relevance) is the default. You can set `rankPreference` to `RELEVANCE` or `DISTANCE` (rank results by distance).
  - For a non-categorical query such as "Mountain View, CA", we recommend that you leave `rankPreference` unset.

  > [!CAUTION]
  > This parameter does not apply to hotel queries or geopolitical queries (for example, queries related to administrative areas, localities, postal codes, school districts, or countries).

-

  ### 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. This parameter can also have a bias effect
  on the search results. 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 when available, 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.
-

  ### strictTypeFiltering

  Used with the `includedType` parameter. When set to
  `true`, only places that match the specified types specified by
  `includedType` are returned.
  When false, the default, the response can contain places that don't match
  the specified types.

## Text Search (New) examples

### Find a place by query string

The following example shows a Text Search (New) request for
"Spicy Vegetarian Food in Sydney, Australia":

```
curl -X POST -d '{
  "textQuery" : "Spicy Vegetarian Food in Sydney, Australia"
}' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H 'X-Goog-FieldMask: places.displayName,places.formattedAddress' \
'https://places.googleapis.com/v1/places:searchText'
```

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

```json
{
  "places": [
    {
      "formattedAddress": "367 Pitt St, Sydney NSW 2000, Australia",
      "displayName": {
        "text": "Mother Chu's Vegetarian Kitchen",
        "languageCode": "en"
      }
    },
    {
      "formattedAddress": "175 First Ave, Five Dock NSW 2046, Australia",
      "displayName": {
        "text": "Veggo Sizzle - Vegan & Vegetarian Restaurant, Five Dock, Sydney",
        "languageCode": "en"
      }
    },
    ...
  ]
}
```

Add more data types to the field mask to return additional information.
For example, add `places.types,places.websiteUri` to include the
restaurant type and web address in the
[response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchText.md.txt#response-body):

```
curl -X POST -d '{
  "textQuery" : "Spicy Vegetarian Food in Sydney, Australia"
}' \
-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:searchText'
```

The response is now in the form:

```json
{
  "places": [
    {
      "types": [
        "vegetarian_restaurant",
        "vegan_restaurant",
        "chinese_restaurant",
        "restaurant",
        "food",
        "point_of_interest",
        "establishment"
      ],
      "formattedAddress": "367 Pitt St, Sydney NSW 2000, Australia",
      "websiteUri": "http://www.motherchusvegetarian.com.au/",
      "displayName": {
        "text": "Mother Chu's Vegetarian Kitchen",
        "languageCode": "en"
      }
    },
    {
      "types": [
        "vegan_restaurant",
        "thai_restaurant",
        "vegetarian_restaurant",
        "indian_restaurant",
        "italian_restaurant",
        "american_restaurant",
        "restaurant",
        "food",
        "point_of_interest",
        "establishment"
      ],
      "formattedAddress": "175 First Ave, Five Dock NSW 2046, Australia",
      "websiteUri": "http://www.veggosizzle.com.au/",
      "displayName": {
        "text": "Veggo Sizzle - Vegan & Vegetarian Restaurant, Five Dock, Sydney",
        "languageCode": "en"
      }
    },
    ...
  ]
}
```

### Filter places by price level

Use the `priceLevel` option to filter the results to restaurants
defined as inexpensive or moderately expensive:

```
curl -X POST -d '{
  "textQuery" : "Spicy Vegetarian Food in Sydney, Australia",
  "priceLevels":["PRICE_LEVEL_INEXPENSIVE", "PRICE_LEVEL_MODERATE"]
}' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H 'X-Goog-FieldMask: places.displayName,places.formattedAddress,places.priceLevel' \
'https://places.googleapis.com/v1/places:searchText'
```

This example also uses the `X-Goog-FieldMask` header to add the
`places.priceLevel` data field to the
[response](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/searchText.md.txt#response-body)
so it is in the form:

```json
{
  "places": [
    {
      "formattedAddress": "367 Pitt St, Sydney NSW 2000, Australia",
      "priceLevel": "PRICE_LEVEL_MODERATE",
      "displayName": {
        "text": "Mother Chu's Vegetarian Kitchen",
        "languageCode": "en"
      }
    },
    {
      "formattedAddress": "115 King St, Newtown NSW 2042, Australia",
      "priceLevel": "PRICE_LEVEL_MODERATE",
      "displayName": {
        "text": "Green Mushroom",
        "languageCode": "en"
      }
    },
    ...
  ]
}
```

Add additional options to refine your search, such as `includedType`,
`minRating`, `rankPreference`, `openNow`,
and other parameters described in
[Optional parameters](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt#optional-parameters).

> [!NOTE]
> **Note:**These refinement parameters only apply to queries such as "Restaurants in New York City" where the parameters help to reduce the number of search results based on the specified option. Applying these parameters to other type of queries---for example, to geographical queries such as "Mountain View, CA" or "New York City"---can actually result in filtering out meaningful results or reducing the number of meaningful results.

### Restrict search to a specified area

Use `locationRestriction` or `locationBias`,
but not both, to restrict a search to an area. Think of `locationRestriction`
as specifying the region which the results must be within, and `locationBias`
as specifying the region that the results must be near but can be outside of
the area.

> [!NOTE]
> **Note:** When using `locationRestriction`, you can only specify the region as a **rectangular Viewport** . When using `locationBias`, you can specify the region as a **rectangular Viewport** or as a **circle**.

#### Restrict area using locationRestriction

Use the `locationRestriction` parameter to restrict query results to a
specified region. In your request body, specify the `low` and
`high` latitude and longitude values that define the region
boundary.

The following example shows a Text Search (New) request for "vegetarian
food" in New York City. This request only returns the first 10 results for
places that are open.

```
curl -X POST -d '{
  "textQuery" : "vegetarian food",
  "pageSize" : "10",
  "locationRestriction": {
    "rectangle": {
      "low": {
        "latitude": 40.477398,
        "longitude": -74.259087
      },
      "high": {
        "latitude": 40.91618,
        "longitude": -73.70018
      }
    }
  }
}' \
  -H 'Content-Type: application/json' \
  -H 'X-Goog-Api-Key: API_KEY' \
  -H 'X-Goog-FieldMask: places.id,places.formattedAddress' \
  'https://places.googleapis.com/v1/places:searchText'
```

#### Bias to an area using locationBias

The following example shows a Text Search (New) request for
"vegetarian food" biased to a location within 500 meters of a point in
downtown San Francisco. This request only returns the first 10 results for
places that are open.

```
curl -X POST -d '{
  "textQuery" : "vegetarian food",
  "openNow": true,
  "pageSize": 10,
  "locationBias": {
    "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' \
'https://places.googleapis.com/v1/places:searchText'
```

### Search for EV chargers with a minimum charging rate

Use `minimumChargingRateKw` and `connectorTypes` to
search for places with available chargers that are compatible with your EV.

The following example shows a request for Tesla and J1772 type 1 EV charging
connectors with a minimum charging rate of 10 kW in Mountain View, CA. Only four
results are returned.

```
curl -X POST -d '{
    "textQuery": "EV Charging Station Mountain View",
    "pageSize": 4,
    "evOptions": {
      "minimumChargingRateKw": 10,
      "connectorTypes": ["EV_CONNECTOR_TYPE_J1772","EV_CONNECTOR_TYPE_TESLA"]
    }
  }' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H "X-Goog-FieldMask: places.displayName,places.evChargeOptions" \
'https://places.googleapis.com/v1/places:searchText'
```

The request returns the following response:

```json
{
  "places": [
    {
      "displayName": {
        "text": "EVgo Charging Station",
        "languageCode": "en"
      },
      "evChargeOptions": {
        "connectorCount": 16,
        "connectorAggregation": [
          {
            "type": "EV_CONNECTOR_TYPE_CHADEMO",
            "maxChargeRateKw": 100,
            "count": 8,
            "availableCount": 5,
            "outOfServiceCount": 0,
            "availabilityLastUpdateTime": "2024-01-10T19:10:00Z"
          },
          {
            "type": "EV_CONNECTOR_TYPE_CCS_COMBO_1",
            "maxChargeRateKw": 100,
            "count": 2,
            "availableCount": 2,
            "outOfServiceCount": 0,
            "availabilityLastUpdateTime": "2024-01-10T19:10:00Z"
          },
          ...
        ]
      }
    },
    {
      "displayName": {
        "text": "EVgo Charging Station",
        "languageCode": "en"
      },
      "evChargeOptions": {
        "connectorCount": 6,
        "connectorAggregation": [
          {
            "type": "EV_CONNECTOR_TYPE_CCS_COMBO_1",
            "maxChargeRateKw": 100,
            "count": 4,
            "availableCount": 3,
            "outOfServiceCount": 0,
            "availabilityLastUpdateTime": "2024-01-10T19:10:00Z"
          },
          {
            "type": "EV_CONNECTOR_TYPE_CCS_COMBO_1",
            "maxChargeRateKw": 350,
            "count": 2,
            "availableCount": 0,
            "outOfServiceCount": 2,
            "availabilityLastUpdateTime": "2024-01-10T19:10:00Z"
          }
        ]
      }
    },
    ...
  ]
}
```

### Search for service area businesses

Use the `includePureServiceAreaBusinesses` parameter to search for
businesses without a physical service address (for example, a mobile cleaning
service or a food truck).

The following example shows a request for plumbers in San Francisco:

```
curl -X POST -d '{
  "textQuery" : "plumber San Francisco",
  "includePureServiceAreaBusinesses": true
}' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H 'X-Goog-FieldMask: places.displayName,places.formattedAddress' \
'https://places.googleapis.com/v1/places:searchText'
```

In the response, businesses without a physical service address don't include
the `formattedAddress` field:

```json
{
  "places": [
    {
      "formattedAddress": "3450 Sacramento St #204, San Francisco, CA 94118, USA",
      "displayName": {
        "text": "Advanced Plumbing & Drain",
        "languageCode": "en"
      }
    },
    {
      "displayName": {
        "text": "Starboy Plumbing Inc.",
        "languageCode": "en"
      }
    },
    ...
  ]
}
```

### Specify a number of results to return per page

Use the `pageSize` parameter to specify a number of results to
return per page. The `nextPageToken` parameter in the response body
provides a token that can be used in subsequent calls to access the next page of
results.

The following example shows a request for "pizza in New York" limited to 5
results per page:

```
 curl -X POST -d '{
  "textQuery": "pizza in New York",
  "pageSize": 5
  }' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H "X-Goog-FieldMask: places.id,nextPageToken" \
'https://places.googleapis.com/v1/places:searchText'
```

```json
{
  "places": [
    {
      "id": "ChIJifIePKtZwokRVZ-UdRGkZzs"
    },
    {
      "id": "ChIJPxPd_P1YwokRfzLhSiACEoU"
    },
    ...
  ],
  "nextPageToken": "AeCrKXsZWzNVbPzO-MRWPu52jWO_Xx8aKwOQ69_Je3DxRpfdjClq8Ekwh3UcF2h2Jn75kL6PtWLGV4ecQri-GEUKN_OFpJkdVc-JL4Q"
}
```

To access the next page of results, use `pageToken` to pass in the
`nextPageToken` in the request body:

```
 curl -X POST -d '{
  "textQuery": "pizza in New York",
  "pageSize": 5,
  "pageToken": "AeCrKXsZWzNVbPzO-MRWPu52jWO_Xx8aKwOQ69_Je3DxRpfdjClq8Ekwh3UcF2h2Jn75kL6PtWLGV4ecQri-GEUKN_OFpJkdVc-JL4Q"
  }' \
-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \
-H "X-Goog-FieldMask: places.id,nextPageToken" \
'https://places.googleapis.com/v1/places:searchText'
```

```json
{
  "places": [
    {
      "id": "ChIJL-LN1N1ZwokR8K2jACu6Ydw"
    },
    {
      "id": "ChIJjaD94kFZwokR-20CXqlpy_4"
    },
    ...
  ],
  "nextPageToken": "AeCrKXvPd6uUy-oj96W2OaqEe2pUD8QTxOM8-sKfUcFsC9t2Wey5qivrKGoGSxcZnyc7RPmaFfAktslrKbUh31ZDTkL0upRmaxA7c_c"
}
```

> [!NOTE]
> **Note:** All parameters other than `maxResultCount`, `pageSize`, and `pageToken` must be the same as the previous request. Otherwise, the API returns an `INVALID_ARGUMENT` error.

### 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 are billed at [SKU: Places API Text Search
> Pro](https://developers.google.com/maps/billing-and-pricing/sku-details/places#places_text-search-pro-sku).

The following example shows a Text 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 '{
  "textQuery": "clothes",
  "maxResultCount": 5,
  "locationBias": {
    "circle": {
      "center": {
        "latitude": 37.321328,
        "longitude": -121.946275
      }
    }
  },
  "rankPreference":"RANK_PREFERENCE_UNSPECIFIED"
}' \
-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:searchText
```

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": "Urban Outfitters",
        "languageCode": "en"
      },
      "addressDescriptor": {
        "landmarks": [
          {
            "name": "places/ChIJVVVVUB7Lj4ARXyb4HFVDV8s",
            "placeId": "ChIJVVVVUB7Lj4ARXyb4HFVDV8s",
            "displayName": {
              "text": "Westfield Valley Fair",
              "languageCode": "en"
            },
            "types": [
              "clothing_store",
              "department_store",
              "establishment",
              "food",
              "movie_theater",
              "point_of_interest",
              "restaurant",
              "shoe_store",
              "shopping_mall",
              "store"
            ],
            "spatialRelationship": "WITHIN",
            "straightLineDistanceMeters": 133.72855
          },
          {
            "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": 250.99161
          },
          ...
        ],
        "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"
          },
          ...
        ]
      }
    },
    ...
  ]
}
```

### Find businesses opening in the future

The following example shows a Text 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 '{
  "textQuery": "Roberts Greenhouse and Tree Farm",
  "includeFutureOpeningBusinesses": true,
  "maxResultCount": 20,
  "locationBias": {
    "circle": {
      "center": {"latitude": 44.9755100, "longitude": -116.2842180},
      "radius": 20
    }
  }
}' \
"https://places.googleapis.com/v1/places:searchText"
```

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 Text Search (New) to find transit stations. 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 "Grand Central Station":

```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 '{
  "textQuery": "Grand Central Station"
}' \
"https://places.googleapis.com/v1/places:searchText"
```

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": "ChIJhRwB-yFawokRi0AhGH87UTc",
      "displayName": {
        "text": "Grand Central",
        "languageCode": "en"
      },
      "transitStation": {
        "displayName": {
          "text": "Grand Central",
          "languageCode": "en"
        },
        "agencies": [
          {
            "displayName": {
              "text": "Metro-North Railroad",
              "languageCode": "en"
            },
            "url": "http://www.mta.info/mnr",
            "lines": [
              {
                "id": "ChIJOXpD29y2wokRryDO0CocwK0",
                "vehicleType": "HEAVY_RAIL",
                "displayName": {
                  "text": "Harlem",
                  "languageCode": "en"
                },
                "textColor": "#FFFFFF",
                "backgroundColor": "#0061AA",
                "vehicleIcon": {
                  "url": "https://maps.gstatic.com/mapfiles/transit/iw2/svg/rail2.svg"
                },
                "alerts": [
                  {
                    "effect": "OTHER",
                    "texts": [
                      {
                        "headline": {
                          "text": "Information",
                          "languageCode": "en"
                        },
                        "summary": {
                          "text": "Temporary platforms are in place at Botanical Garden, Williams Bridge, and Woodlawn for northbound travel. Build in extra travel time to reach the platform.",
                          "languageCode": "en"
                        },
                        "fullDescription": {
                          "text": "What's Happening? We are renovating some Harlem Line stations in the Bronx. Learn more about the project here.",
                          "languageCode": "en"
                        }
                      }
                    ],
                    "detailsUrls": [
                      {
                        "url": "https://new.mta.info/"
                      }
                    ],
                    "cause": "OTHER_CAUSE",
                    "startTime": "2026-04-16T04:00:00Z",
                    "endTime": "2026-12-01T04:45:00Z",
                    "attribution": {
                      "link": {
                        "text": "new.mta.info",
                        "url": "https://new.mta.info/"
                      }
                    },
                    "createTime": "2026-05-15T22:39:30Z",
                    "severityLevel": "INFO"
                  }
                ]
              },
              ...
            ]
          },
          ...
        ]
        "stops": [
          {
            "id": "ChIJOfdrigFZwokRJPllLwfPrJY",
            "location": {
              "latitude": 40.752823,
              "longitude": -73.977195999999992
            },
            "wheelchairAccessibleEntrance": true
          }
        ],
        "departureBoards": [
          {
            "displayType": "TIME_CENTRIC",
            "rows": [
              {
                "departures": [
                  {
                    "timedDeparture": {
                      "scheduledTime": "2026-05-15T22:42:00Z",
                      "timingType": "SCHEDULED",
                      "predictedTime": "2026-05-15T22:42:00Z",
                      "updateTime": "2026-05-15T22:38:50Z"
                    },
                    "originallyScheduledStopId": "ChIJOfdrigFZwokRJPllLwfPrJY",
                    "lineId": "ChIJAfBuQhwg6IkRYnFpClHxFrM"
                  }
                ]
              },
              ...
            ]
          }
        ]
      }
    },
    {
      "id": "ChIJ_4EAi-pZwokRWe5T1JmmWmc",
      "displayName": {
        "text": "Grand Central Station",
        "languageCode": "en"
      }
    }
  ]
}
```

### 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 Text Search (New) request for "San Francisco International Airport" 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 '{
  "textQuery": "San Francisco International Airport",
  "pageSize": 1
}' \
"https://places.googleapis.com/v1/places:searchText"
```

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.

<br />

<br />