Whats the difference between a nearby Search and a text Search in Google Places API?
For example, a nearby Search for cafe within a radius of 1km returns only 1 result using https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-41.319282,174.818717
&radius=1000
&sensor=true
&types=cafe
&key=your_api_key
while text Search for cafe within a radius of 1km returns 20 results using https://maps.googleapis.com/maps/api/place/textsearch/json?location=-41.319282,174.818717
&radius=1000
&sensor=true
&query=cafe
&key=your_api_key
.
Changing types to type in the nearby search also returns 20 results which are also different to the result found using the text search above. ie https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-41.319282,174.818717
&radius=1000
&sensor=true
&type=cafe
&key=your_api_key
When you do a search for cafe on google maps android app using the location given above, the result you get is the same as the result you get by using the text search above.
For convenience, the above clickable links
are below.
https://maps.googleapis.com/maps/api/place/textsearch/json?location=-41.319282,174.818717&radius=1000&sensor=true&query=cafe&key=
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-41.319282,174.818717&radius=1000&sensor=true&type=cafe&key=
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-41.319282,174.818717&radius=1000&sensor=true&types=cafe&key=