Module google_maps::places::place_search
source · Expand description
The Place Search service lets you search for place information using a variety of categories, including establishments, prominent points of interest, and geographic locations. You can search for places either by proximity or a text string. A Place Search returns a list of places along with summary information about each place; additional information is available via a Place Details query.
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. 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, the Places SDK for iOS, and the Places Library, Maps JavaScript API.
Compare search types
There are three search endpoints available with different characteristics. The following table highlights some of these differences.
Type | Field selection | Text search | Ambiguous text | Location filter | Additional filters |
---|---|---|---|---|---|
Find Place | ✔️ | ✔️ input | ✔️ | ✔️ | ❌ |
Nearby Search | ❌ | ✔️ keyword | ❌ | ✔️ | ✔️ |
Text Search | ❌ | ✔️ query | ✔️ | ✔️ | ✔️ |
Field selection
There is no way to constrain Nearby Search or Text Search to only return specific fields. To keep from requesting (and paying for) data that you don’t need, use a Find Place request instead.
Ambiguous text
Find Place and Text Search are optimized for matching ambiguous text across a number of fields while Nearby Search is constrained to strict matches on a subset of fields.
Additional filters
Nearby Search and Text Search allow additional parameters to filter results,
(e.g. minprice
, maxprice
, opennow
, and type
).