Text Search
POST https://places.googleapis.com/v1/places:searchText
A Text Search (New) 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.
The service is especially useful for making ambiguous address queries in an automated system, and non-address components of the string may match businesses as well as addresses. Examples of ambiguous address queries are poorly-formatted addresses or requests that include non-address components such as business names. Requests like the first two examples in the following table may return zero results unless a location — such as region, location restriction, or location bias — is set.
| 10 High Street, UK
or 123 Main Street, US
| Multiple High Street
s in the UK; multiple Main Street
s in the US. Query doesn't return desirable results unless a location restriction is set. |
| ChainRestaurant New York
| Multiple ChainRestaurant
locations in New York; no street address or even street name. |
| 10 High Street, Escher UK
or 123 Main Street, Pleasanton US
| Only one High Street
in the UK city of Escher; only one Main Street
in the US city of Pleasanton CA. |
| UniqueRestaurantName New York
| Only one establishment with this name in New York; no street address needed to differentiate. |
| pizza restaurants in New York
| This query contains its location restriction, and pizza restaurants
is a well-defined place type. It returns multiple results. |
| +1 514-670-8700
| This query contains a phone number. It returns multiple results for places associated with that phone number.
Note: For best results when searching on a phone number, include the country code followed by a space, and set the regionCode
parameter to correspond to the country code. |
Request Body
{"textQuery"=>"Spicy Vegetarian Food in Washington, DC"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
X-Goog-FieldMask | string | ||
X-Goog-Api-Key | string |