When searching for business it’s often the case that you have very fine grained requirements. You don’t just want a restaurant, you want a Mexican restaurant. You don’t just want a clothes shop, you want a vintage clothes shop. You don’t just a want a bar, you want a bar that offers live music.Rank by distance
The Google Places API offers filtering over 100 different types, including
bar. As rich as this type scheme is, it can not cover the infinite range of fine grained requirements that you or your users might have.
For these situations the Places API now offers keyword search, which searches places based on an arbitrary text string. Results are matched against all the information that Google has about a business, including country specific categories, cuisine, and Google review content.
Keyword searches can also be combined with type filters. For example, you could add a type filter of ‘bar’ to a keyword search for ‘wine’ to ensure your search results include only drinking establishments, and not wine merchants.
To help with these use case the Places API can now rank results strictly by distance. In order to rank results by distance you must use some form of query or filter on the search. This can be a name filter, a type filter, or a keyword search. When results are ranked by distance it is not necessary to provide a search radius as the Places API will try to return the 20 closest results within reasonable distance.
These new features are a direct result of feedback from Places API developers. If you would like to help us improve the Places API further, please submit ideas for new features using the Maps API Issue Tracker. For assistance using these features, or any other aspect of the Places API, you can find us on Stack Overflow.