**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]
> This product is in [Legacy status](https://developers.google.com/maps/legacy.md.txt). As of October 2026, Places API (Legacy) can no longer be enabled for new Google Cloud projects. Existing projects remain fully supported. For new features and improved performance, [migrate to Places API
> (New)](https://developers.google.com/maps/documentation/places/web-service/legacy/migrate-overview).

**Note: Server-side
and client-side libraries**

The Places API is also available with the
[Java Client,
Python Client, Go Client and Node.js Client for Google Maps Services](https://developers.google.com/maps/documentation/places/web-service/client-library).
The Places API and the client libraries are for
use in server applications.

If you're building a client-side
application, take a look at the
[Places SDK for Android (New)](https://developers.google.com/maps/documentation/places/android-sdk), the
[Places SDK for iOS (New)](https://developers.google.com/maps/documentation/places/ios-sdk), and the
[Places Library, Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/places).

A Text Search (Legacy) 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.

Text Search (Legacy) 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 [`region`](https://developers.google.com/maps/documentation/places/web-service/legacy/search-text.md.txt#region) 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 (Legacy) 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).

The search response includes a list of places. You can send a Place Details
request for more information about any of the places in the response.

> [!WARNING]
> Nearby Search (Legacy) and Text Search (Legacy) return all available data fields for the selected place, which is a [subset
> of the supported fields](https://developers.google.com/maps/documentation/places/web-service/legacy/place-data-fields#places-api-fields-support), and [bill you
> accordingly](https://developers.google.com/maps/billing/understanding-cost-of-use#nearby-search). You can't constrain Nearby Search (Legacy) or Text Search (Legacy) to return only specific fields. To request and pay for only the data that you need, migrate to [Text Search (New)](https://developers.google.com/maps/documentation/places/web-service/text-search.md.txt) or [Nearby Search (New)](https://developers.google.com/maps/documentation/places/web-service/nearby-search.md.txt) and specify a field mask, or use a [Find Place (Legacy)
> request](https://developers.google.com/maps/documentation/places/web-service/legacy/search-find-place).

## Text Search (Legacy) requests

A Text Search (Legacy) request is an HTTP URL of the following form:

```
https://maps.googleapis.com/maps/api/place/textsearch/output?parameters
```

where `output` can be either of the following values:

- `json` (recommended) indicates output in JavaScript Object Notation (JSON)
- `xml` indicates output as XML

Certain parameters are required to initiate a search request. As is
standard in URLs, all parameters are separated using the ampersand
(`&`) character.

## Required parameters

### query


The text string on which to search, for example: "restaurant" or "123 Main
Street". This must be a place name, address, or category of
establishments. Any other types of input can generate errors and are not
guaranteed to return valid results. The Google Places service returns
candidate matches based on this string and orders the results based on
their perceived relevance.

### radius


Defines the distance (in meters) within which to return place results. You
may bias results to a specified circle by passing a
`location` and a `radius` parameter. Doing so
instructs the Places service to *prefer* showing results within
that circle; results outside of the defined area may still be displayed.


The radius will automatically be clamped to a maximum value depending on
the type of search and other parameters.

- Autocomplete: 50,000 meters
- Nearby Search:
  - with `keyword` or `name`: 50,000 meters
  - without `keyword` or `name`
    - Up to 50,000 meters, adjusted dynamically based on area density, independent of `rankby` parameter.
    - When using `rankby=distance`, the radius parameter won't be accepted, and will result in an `INVALID_REQUEST`.
- Query Autocomplete: 50,000 meters
- Text Search: 50,000 meters

## Optional parameters

### language

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 `language` is not supplied, the API attempts to use the preferred language as specified in the `Accept-Language` header.
- 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. For example, *utca* and *tér* are synonyms for street in Hungarian.

### location


The point around which to retrieve place information. This must be
specified as `latitude,longitude`.
The `location` parameter may be overridden if the `query` contains an explicit location such as `Market in Barcelona`. Using quotes around the query may also influence the weight given to the `location` and `radius`.

### maxprice


Restricts results to only those places within the specified range. Valid
values range between 0 (most affordable) to 4 (most expensive), inclusive.
The exact amount indicated by a specific value will vary from region to
region.

### minprice


Restricts results to only those places within the specified range. Valid
values range between 0 (most affordable) to 4 (most expensive), inclusive.
The exact amount indicated by a specific value will vary from region to
region.

### opennow


Returns only those places that are open for business at the time the query
is sent. Places that don't specify opening hours in the Google Places
database won't be returned if you include this parameter in your query.

### pagetoken


Returns up to 20 results from a previously run search. Setting a
`pagetoken` parameter will execute a search with the same
parameters used previously --- all parameters other than pagetoken will be
ignored.

### region


The region code, specified as a
[ccTLD ("top-level domain")](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains)
two-character value. Most ccTLD 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").

### type


Restricts the results to places matching the specified type. Only one type
may be specified. If more than one type is provided, all types following
the first entry are ignored.

- `type=hospital|pharmacy|doctor` becomes `type=hospital`
- `type=hospital,pharmacy,doctor` is ignored entirely


See the list of
[supported types](https://developers.google.com/maps/documentation/places/web-service/supported_types).
Note: Adding both `keyword` and `type` with the same value (`keyword=cafe&type=cafe` or `keyword=parking&type=parking`) can yield `ZERO_RESULTS`.

## Text Search (Legacy) examples

**Note:** In these examples, you need to replace the `key` with your
own API key in order for the request to work in your application.

### Basic example

The following example shows a search for restaurants near
Sydney.

### curl

```console
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants%20in%20Sydney&key=YOUR_API_KEY'
```

### HTTP

```console
https://maps.googleapis.com/maps/api/place/textsearch/json
  ?query=restaurants%20in%20Sydney
  &key=YOUR_API_KEY
```

### Incomplete address example

The following example shows a search for an incomplete address, in
this case, a street address that does not include a city or state or country.

### curl

```console
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=123%20main%20street&key=YOUR_API_KEY'
```

### HTTP

```console
https://maps.googleapis.com/maps/api/place/textsearch/json
  ?query=123%20main%20street
  &key=YOUR_API_KEY
```

### JSON

```json
{
  "html_attributions": [],
  "results":
    [
      {
        "formatted_address": "Main St, Denver, CO 80238, USA",
        "geometry":
          {
            "location": { "lat": 39.782267, "lng": -104.8919341 },
            "viewport":
              {
                "northeast":
                  { "lat": 39.78361682989273, "lng": -104.8905842701073 },
                "southwest":
                  { "lat": 39.78091717010729, "lng": -104.8932839298927 },
              },
          },
        "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png",
        "icon_background_color": "#7B9EB0",
        "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet",
        "name": "Main St",
        "place_id": "ChIJIS85_gd7bIcRJIGEPue1cJI",
        "reference": "ChIJIS85_gd7bIcRJIGEPue1cJI",
        "types": ["route"],
      },
    ],
  "status": "OK",
}
    
```

### XML

```xml
<?xml version="1.0" encoding="UTF-8"?>
<PlaceSearchResponse>
 <status>OK</status>
 <result>
  <name>Main St</name>
  <type>route</type>
  <formatted_address>Main St, Denver, CO 80238, USA</formatted_address>
  <geometry>
   <location>
    <lat>39.7822670</lat>
    <lng>-104.8919341</lng>
   </location>
   <viewport>
    <southwest>
     <lat>39.7809172</lat>
     <lng>-104.8932839</lng>
    </southwest>
    <northeast>
     <lat>39.7836168</lat>
     <lng>-104.8905843</lng>
    </northeast>
   </viewport>
  </geometry>
  <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png</icon>
  <reference>ChIJIS85_gd7bIcRJIGEPue1cJI</reference>
  <place_id>ChIJIS85_gd7bIcRJIGEPue1cJI</place_id>
  <icon_background_color>#7B9EB0</icon_background_color>
  <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri>
 </result>
</PlaceSearchResponse>

    
```

### Location bias example

The following example shows a search for the same
incomplete address in the preceding example, and includes `location` and
`radius` parameters to bias the results to a region of interest.

### curl

```console
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=123%20main%20street&location=42.3675294%2C-71.186966&radius=10000&key=YOUR_API_KEY'
```

### HTTP

```console
https://maps.googleapis.com/maps/api/place/textsearch/json
  ?location=42.3675294%2C-71.186966
  &query=123%20main%20street
  &radius=10000
  &key=YOUR_API_KEY
```

### JSON

```json
{
  "html_attributions": [],
  "results":
    [
      {
        "formatted_address": "123 Main St, Boston, MA 02110, USA",
        "geometry":
          {
            "location": { "lat": 42.3744917, "lng": -71.0634802 },
            "viewport":
              {
                "northeast":
                  { "lat": 42.37581642989272, "lng": -71.06219107010727 },
                "southwest":
                  { "lat": 42.37311677010727, "lng": -71.06489072989272 },
              },
          },
        "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png",
        "icon_background_color": "#7B9EB0",
        "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet",
        "name": "123 Main St",
        "place_id": "ChIJd_ueCe1w44kRD_KFuN5w5nA",
        "plus_code":
          {
            "compound_code": "9WFP+QJ Boston, Massachusetts",
            "global_code": "87JC9WFP+QJ",
          },
        "reference": "ChIJd_ueCe1w44kRD_KFuN5w5nA",
        "types": ["street_address"],
      },
    ],
  "status": "OK",
}
    
```

### XML

```xml
<?xml version="1.0" encoding="UTF-8"?>
<PlaceSearchResponse>
 <status>OK</status>
 <result>
  <name>123 Main St</name>
  <type>street_address</type>
  <formatted_address>123 Main St, Boston, MA 02110, USA</formatted_address>
  <geometry>
   <location>
    <lat>42.3744917</lat>
    <lng>-71.0634802</lng>
   </location>
   <viewport>
    <southwest>
     <lat>42.3731168</lat>
     <lng>-71.0648907</lng>
    </southwest>
    <northeast>
     <lat>42.3758164</lat>
     <lng>-71.0621911</lng>
    </northeast>
   </viewport>
  </geometry>
  <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png</icon>
  <reference>ChIJd_ueCe1w44kRD_KFuN5w5nA</reference>
  <place_id>ChIJd_ueCe1w44kRD_KFuN5w5nA</place_id>
  <plus_code>
   <global_code>87JC9WFP+QJ</global_code>
   <compound_code>9WFP+QJ Boston, Massachusetts</compound_code>
  </plus_code>
  <icon_background_color>#7B9EB0</icon_background_color>
  <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri>
 </result>
</PlaceSearchResponse>

    
```

## Text Search (Legacy) responses

Search responses are returned in the format indicated by the
`output` flag within the URL request's path.

The following example shows a **Text Search (Legacy)** response.

### JSON

```json
{
  "html_attributions": [],
  "next_page_token": "Aap_uEAHsgFErpxZrytW1mgKsefD327VCf0OgNF9vpXPwTOG6AGhEZpGgMgofSzgCahevXhneCe9M9H24SOuE4ZcaE0ZR01gVykQZ6EoDnlWEQvXBXe6z0sgF5MQo7qBb6uD4VHKDLhgR59Lb86BzTHJzTzbm61OAPvyInZoaQxK8-oEf2PShZT7XRJKoF5nISbwvU_-RomwGDVi27oj0fToIyV-Vj2ftJw8ZUPbdGGCbcDolQyAwj11Dy2aaeK4SGwg2mO5Akxa7fCze2RJ0GCAvXXp7omTFDy_47OXsFgDPfzluc7mEb5VlzlIMZ0eWQ8VeNigtv-XZZG0f3HSo81Yeq3QhXedJ5oNE1XCwyMly3YVgw_h3amOzAOuDigF1pgFnfGyzxD8vr2bfbPTNvA9l7IJ8Q",
  "results":
    [
      {
        "business_status": "OPERATIONAL",
        "formatted_address": "1 Macquarie St, Sydney NSW 2000, Australia",
        "geometry":
          {
            "location": { "lat": -33.8592041, "lng": 151.2132635 },
            "viewport":
              {
                "northeast":
                  { "lat": -33.85786707010728, "lng": 151.2147093298927 },
                "southwest":
                  { "lat": -33.86056672989272, "lng": 151.2120096701072 },
              },
          },
        "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png",
        "icon_background_color": "#FF9E67",
        "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet",
        "name": "Aria Restaurant Sydney",
        "opening_hours": { "open_now": false },
        "photos":
          [
            {
              "height": 4032,
              "html_attributions":
                [
                  'Dohyun Kim',
                ],
              "photo_reference": "Aap_uED7B83PoQ1wNgzYcFZEOw1P2DqNjlaqiXxo-r4F_NaR27uV2OiIvijkI6RYyfiiHYo9UqjnZkRtZaNTk4C6Ickh3k3stsSvBU0KfLtFow-oRujSYYChYwiYhVyP27omLzQQjafhJ2N3LJbjcMxSePKXsQzYCqmOLWg0E9mSExMJ4aM",
              "width": 3024,
            },
          ],
        "place_id": "ChIJdxxU1WeuEmsR11c4fswX-Io",
        "plus_code":
          {
            "compound_code": "46R7+88 Sydney, New South Wales, Australia",
            "global_code": "4RRH46R7+88",
          },
        "price_level": 4,
        "rating": 4.5,
        "reference": "ChIJdxxU1WeuEmsR11c4fswX-Io",
        "types": ["restaurant", "point_of_interest", "food", "establishment"],
        "user_ratings_total": 1681,
      },
      {
        "business_status": "OPERATIONAL",
        "formatted_address": "15 Bligh St, Sydney NSW 2000, Australia",
        "geometry":
          {
            "location": { "lat": -33.8651396, "lng": 151.2104533 },
            "viewport":
              {
                "northeast":
                  { "lat": -33.86384167010728, "lng": 151.2118993298927 },
                "southwest":
                  { "lat": -33.86654132989272, "lng": 151.2091996701073 },
              },
          },
        "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png",
        "icon_background_color": "#FF9E67",
        "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet",
        "name": "Restaurant Hubert",
        "opening_hours": { "open_now": false },
        "photos":
          [
            {
              "height": 683,
              "html_attributions":
                [
                  'Ashley Hughes',
                ],
              "photo_reference": "Aap_uEB41WOb_Nl8I8py4D6uXoLHzVYtFZZcucYdYAN1FtzXBnAu59xXrxk5tekoktAbklwmHeSFfdnTCWgHRZ1C5Azp9AMCP9GRGV1f2Z1-5kjsVgnYPiq82JoueSUdCSQJFabyL0cagtcGaFKetVi7DmUIHDQknEPCh_cpCbdOMw4Bkq5q",
              "width": 1024,
            },
          ],
        "place_id": "ChIJF5-RdGquEmsR5rN_H74uSqQ",
        "plus_code":
          {
            "compound_code": "46M6+W5 Sydney, New South Wales, Australia",
            "global_code": "4RRH46M6+W5",
          },
        "price_level": 3,
        "rating": 4.6,
        "reference": "ChIJF5-RdGquEmsR5rN_H74uSqQ",
        "types": ["restaurant", "point_of_interest", "food", "establishment"],
        "user_ratings_total": 2393,
      },
      // ...
    ],
  "status": "OK",
}
    
```

### XML

```xml
<?xml version="1.0" encoding="UTF-8"?>
<PlaceSearchResponse>
 <status>OK</status>
 <result>
  <name>Aria Restaurant Sydney</name>
  <type>restaurant</type>
  <type>point_of_interest</type>
  <type>food</type>
  <type>establishment</type>
  <formatted_address>1 Macquarie St, Sydney NSW 2000, Australia</formatted_address>
  <geometry>
   <location>
    <lat>-33.8592041</lat>
    <lng>151.2132635</lng>
   </location>
   <viewport>
    <southwest>
     <lat>-33.8605667</lat>
     <lng>151.2120097</lng>
    </southwest>
    <northeast>
     <lat>-33.8578671</lat>
     <lng>151.2147093</lng>
    </northeast>
   </viewport>
  </geometry>
  <rating>4.5</rating>
  <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png</icon>
  <reference>ChIJdxxU1WeuEmsR11c4fswX-Io</reference>
  <opening_hours>
   <open_now>false</open_now>
  </opening_hours>
  <photo>
   <photo_reference>Aap_uEDOK3C-umU4a2um8NR1G_b_MNPEG1ogm0PLp49myXaj0AD2aT60YrNlbrwnvg2VBrCmE2kBsuDmwZgXL8V-vU2ToVhNgp3A8zAjtx15slWyCxm3WCvWFEPE-_eBoj0Dlh83k_oWPN65B0blYM-qXLBY1PJZbq14gOUXabf31PSo1yA</photo_reference>
   <width>3024</width>
   <height>4032</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/112033760018394328606&quot;&gt;Dohyun Kim&lt;/a&gt;</html_attribution>
  </photo>
  <price_level>4</price_level>
  <user_ratings_total>1681</user_ratings_total>
  <place_id>ChIJdxxU1WeuEmsR11c4fswX-Io</place_id>
  <plus_code>
   <global_code>4RRH46R7+88</global_code>
   <compound_code>46R7+88 Sydney, New South Wales, Australia</compound_code>
  </plus_code>
  <icon_background_color>#FF9E67</icon_background_color>
  <business_status>OPERATIONAL</business_status>
  <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet</icon_mask_base_uri>
 </result>
 <result>
  <name>Restaurant Hubert</name>
  <type>restaurant</type>
  <type>point_of_interest</type>
  <type>food</type>
  <type>establishment</type>
  <formatted_address>15 Bligh St, Sydney NSW 2000, Australia</formatted_address>
  <geometry>
   <location>
    <lat>-33.8651396</lat>
    <lng>151.2104533</lng>
   </location>
   <viewport>
    <southwest>
     <lat>-33.8665413</lat>
     <lng>151.2091997</lng>
    </southwest>
    <northeast>
     <lat>-33.8638417</lat>
     <lng>151.2118993</lng>
    </northeast>
   </viewport>
  </geometry>
  <rating>4.6</rating>
  <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png</icon>
  <reference>ChIJF5-RdGquEmsR5rN_H74uSqQ</reference>
  <opening_hours>
   <open_now>false</open_now>
  </opening_hours>
  <photo>
   <photo_reference>Aap_uEDhALUBAcrBEprGmkq0_kj9kC4IEWod9h0PZBu-A1mXPN_ZfylpiDXRWxOtuONEFQIqjREf7C28LQDjzqVl4ZD0gZUk4Y0JHPDWaTlfVwijaPfw221p175Sk4po7rB2t7HgjQF2c5O12FYnvNzRiCrkOjr4xroJgzcnp1LV0y8w7gtb</photo_reference>
   <width>1024</width>
   <height>683</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/113719639442868633401&quot;&gt;Ashley Hughes&lt;/a&gt;</html_attribution>
  </photo>
  <price_level>3</price_level>
  <user_ratings_total>2393</user_ratings_total>
  <place_id>ChIJF5-RdGquEmsR5rN_H74uSqQ</place_id>
  <plus_code>
   <global_code>4RRH46M6+W5</global_code>
   <compound_code>46M6+W5 Sydney, New South Wales, Australia</compound_code>
  </plus_code>
  <icon_background_color>#FF9E67</icon_background_color>
  <business_status>OPERATIONAL</business_status>
  <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet</icon_mask_base_uri>
 </result>
 <!-- ... -->
 <next_page_token>Aap_uEC8n0Fzu2WsA7IqaEJty09klsnvXEYZe0aL8dIiZx3fOOfo1xYHZR00qrq-obJbYY9YRkftL-Pv__rQ-efJHSxv19gDtol2ARoY9wpi0ENg-vUAkDVt2W0mOqDy4Kjz9rm5-tzk6fhKR6r4wbLkdgXbKLuNM7KEhsjspU0RC5jQZa4FK_cM9qeUPx5IkPdAa11b9EJwKPEy-ixe77eXeRbEzDYhC5rhylkoOGbF1mHVJVxr--u-Ihe0YaFogaWDx50BcCcMN-eDetaUBJwXDnzHxtirIRF5C_yFavCzWcFn5TOC_z9Ltc-U0L5zbv3lQ7Z6kfVuOeKp4u5_lEHwfz-LuHyETKE6QwQypJUPS3AS8BFs2pYm9r_ruao6YVYsFfDGs1-9QPsVUeSjCN3NuRvbkA</next_page_token>
</PlaceSearchResponse>

    
```

### PlacesTextSearchResponse

| Field | Required | Type | Description |
|:---|---|---|---|
| #### `html_attributions` | **required** | Array\<string\> | May contain a set of attributions about this listing which must be displayed to the user (some listings may not have attribution). |
| #### `results` | **required** | Array\<[Place](https://developers.google.com/maps/documentation/places/web-service/legacy/search-text.md.txt#Place "Place")\> | Contains an array of places. Place Search requests return a subset of the fields that are returned by Place Details requests. If the field you want is not returned by Place Search, you can use Place Search to get a `place_id`, then use that Place ID to make a Place Details request. See [Place](https://developers.google.com/maps/documentation/places/web-service/legacy/search-text.md.txt#Place) for more information. |
| #### `status` | **required** | [PlacesSearchStatus](https://developers.google.com/maps/documentation/places/web-service/legacy/search-text.md.txt#PlacesSearchStatus "PlacesSearchStatus") | Contains the status of the request, and may contain debugging information to help you track down why the request failed. See [PlacesSearchStatus](https://developers.google.com/maps/documentation/places/web-service/legacy/search-text.md.txt#PlacesSearchStatus) for more information. |
| #### `error_message` | optional | string | When the service returns a status code other than `OK<`, there may be an additional `error_message` field within the response object. This field contains more detailed information about the reasons behind the given status code. This field is not always returned, and its content is subject to change. |
| #### `info_messages` | optional | Array\<string\> | When the service returns additional information about the request specification, there may be an additional `info_messages` field within the response object. This field is only returned for successful requests. It may not always be returned, and its content is subject to change. |
| #### `next_page_token` | optional | string | Contains a token that can be used to return up to 20 additional results. A next_page_token won't be returned if there are no additional results to display. The maximum number of results that can be returned is 60. There is a short delay between when a next_page_token is issued, and when it will become valid. |

### PlacesSearchStatus

Status codes returned by service.

- `OK` indicating the API request was successful.
- `ZERO_RESULTS` indicating that the search was successful but returned no results. This may occur if the search was passed a `latlng` in a remote location.
- `INVALID_REQUEST` indicating the API request was malformed, generally due to missing required query parameter (`location` or `radius`).
- `OVER_QUERY_LIMIT` indicating any of the following:
  - You have exceeded the QPS limits.
  - Billing has not been enabled on your account.
  - The monthly $200 credit, or a self-imposed usage cap, has been exceeded.
  - The provided method of payment is no longer valid (for example, a credit card has expired).

  See the [Maps FAQ](https://developers.google.com/maps/faq.md.txt#over-limit-key-error) for more information about how to resolve this error.
- `REQUEST_DENIED` indicating that your request was denied, generally because:
  - The request is missing an API key.
  - The `key` parameter is invalid.
- `UNKNOWN_ERROR` indicating an unknown error.

### Place


Place Search responses return the following subset of the
[Place](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#Place)
fields. Not all attributes are available for all place types. To retrieve
fields that Place Search doesn't return, such as
`address_components`, `formatted_phone_number`,
`reviews`, or `website`, pass the returned
`place_id` in a
[Place Details (Legacy)](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt)
request. For field availability and pricing tiers across endpoints, see
[Place
Data Fields (Legacy)](https://developers.google.com/maps/documentation/places/web-service/legacy/place-data-fields#places-api-fields).

| Field | Type | Description |
|:---|:---|:---|
| `business_status` | `string` | Indicates the operational status of the place, if it's a business: `OPERATIONAL`, `CLOSED_TEMPORARILY`, or `CLOSED_PERMANENTLY`. Omitted if no status data exists. |
| `formatted_address` | `string` | The human-readable address of this place. Returned by Text Search (Legacy) and Find Place (Legacy). Don't parse the formatted address programmatically; request [`address_components`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#Place-address_components) in Place Details (Legacy) instead. |
| `geometry` | [`Geometry`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#Place-geometry) | Contains the geocoded `location` with `lat` and `lng` coordinates, and the preferred `viewport` with `northeast` and `southwest` bounds. |
| `icon` | `string` | The URL of a suggested icon that you can display when indicating this result on a map. |
| `icon_background_color` | `string` | The default hexadecimal color code for the place's category. |
| `icon_mask_base_uri` | `string` | The base URL of a recommended icon, without the SVG or PNG file type extension. |
| `name` | `string` | The human-readable name for the returned result. For `establishment` results, this value is usually the canonicalized business name. |
| `opening_hours` | [`PlaceOpeningHours`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#PlaceOpeningHours) | Opening hours information. Place Search endpoints return only the `open_now` boolean subfield; request [`opening_hours`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#PlaceOpeningHours) in Place Details (Legacy) for `periods` and `weekday_text`. |
| `permanently_closed` | `boolean` | **Deprecated:** Use `business_status` to check the operational status of a business. |
| `photos` | `Array<PlacePhoto>` | An array of [`PlacePhoto`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#PlacePhoto) objects, each containing a `photo_reference`, `height`, `width`, and `html_attributions`. For usage details, see [Place Photos (Legacy)](https://developers.google.com/maps/documentation/places/web-service/legacy/photos.md.txt). |
| `place_id` | `string` | A textual identifier that uniquely identifies a place. Pass this ID in the `place_id` parameter of a [Place Details (Legacy)](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt) request. See the [place ID overview](https://developers.google.com/maps/documentation/places/web-service/place-id.md.txt). |
| `plus_code` | [`PlusCode`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#Place-plus_code) | An encoded location reference derived from latitude and longitude coordinates, containing a `global_code` and an optional `compound_code`. |
| `price_level` | `integer` | The price level of the place on a scale from `0` to `4`, from least expensive to most expensive. See [`price_level`](https://developers.google.com/maps/documentation/places/web-service/legacy/details.md.txt#Place-price_level). |
| `rating` | `number` | The place's rating, from `1.0` to `5.0`, based on aggregated user reviews. |
| `reference` | `string` | **Deprecated:** Use `place_id` instead. |
| `scope` | `string` | **Deprecated:** Indicates the scope of the `place_id`, which is always `GOOGLE`. Returned by Nearby Search (Legacy). |
| `types` | `Array<string>` | An array of feature types describing the given result. See [Place Types (Legacy)](https://developers.google.com/maps/documentation/places/web-service/legacy/supported_types.md.txt#table2). |
| `user_ratings_total` | `integer` | The total number of ratings, with or without review text, for this place. |
| `vicinity` | `string` | A simplified address for the place, including the street name, street number, and locality, without the state or province, postal code, or country. Returned by Nearby Search (Legacy). |

## Accessing Additional Results

By default, each response returns up to
20 `establishment` results
per query; however, each search can return as many as 60 results, split
across three pages. If your search will return more than
20, then the search response will include
an additional value --- `next_page_token`. Pass the value of
the `next_page_token` to the `pagetoken` parameter of
a new request to see the next set of results.

- If the `next_page_token` is null, or is not returned, then there are no further results.
- Retrying the request with the same `next_page_token` will return the next page of results.
- Setting `pagetoken` will cause any other parameters to be ignored.
- You can request a new page up to two times following the original query.
- Each request, including a request using `next_page_token`, counts as a single request against your usage limits and is charged separately.
- There is a delay of a few seconds between when a `next_page_token` is issued, and when it will become valid. Requesting the next page before it is available will return an `INVALID_REQUEST` response. Requests with `next_page_token` are always charged.

  > [!NOTE]
  > **Note:** The correct use of `next_page_token` is to request the next page of results only when requested by the user. We recommend that you either implement either true paging (showing 20 results at a time) or append additional places to the bottom of a results page once the user scrolls to the end.

For example, in the query below, we search for restaurants near Darling
Harbour, in Sydney Australia, and rank the results by distance. You can see
that the response contains a `next_page_token` property.

```
{
   "html_attributions" : [],
   "next_page_token" : "CpQCAgEAAFxg8o-eU7_uKn7Yqjana-HQIx1hr5BrT4zBaEko29ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk-ReY7oulyuvKSQrw1lgJElggGlo0d6indiH1U-tDwquw4tU_UXoQ_sj8OBo8XBUuWjuuFShqmLMP-0W59Vr6CaXdLrF8M3wFR4dUUhSf5UC4QCLaOMVP92lyh0OdtF_m_9Dt7lz-Wniod9zDrHeDsz_by570K3jL1VuDKTl_U1cJ0mzz_zDHGfOUf7VU1kVIs1WnM9SGvnm8YZURLTtMLMWx8-doGUE56Af_VfKjGDYW361OOIj9GmkyCFtaoCmTMIr5kgyeUSnB-IEhDlzujVrV6O9Mt7N4DagR6RGhT3g1viYLS4kO5YindU6dm3GIof1Q",
   "results" : [...]
   "status" : "OK"
}
```

To see the next set of results you can submit a new query, passing the
result of the `next_page_token` to the `pagetoken`
parameter. For example:

```
https://maps.googleapis.com/maps/api/place/nearbysearch/json?pagetoken=CpQCAgEAAFxg8o-eU7_uKn7Yqjana-HQIx1hr5BrT4zBaEko29ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk-ReY7oulyuvKSQrw1lgJElggGlo0d6indiH1U-tDwquw4tU_UXoQ_sj8OBo8XBUuWjuuFShqmLMP-0W59Vr6CaXdLrF8M3wFR4dUUhSf5UC4QCLaOMVP92lyh0OdtF_m_9Dt7lz-Wniod9zDrHeDsz_by570K3jL1VuDKTl_U1cJ0mzz_zDHGfOUf7VU1kVIs1WnM9SGvnm8YZURLTtMLMWx8-doGUE56Af_VfKjGDYW361OOIj9GmkyCFtaoCmTMIr5kgyeUSnB-IEhDlzujVrV6O9Mt7N4DagR6RGhT3g1viYLS4kO5YindU6dm3GIof1Q&key=YOUR_API_KEY
```