Retrieve points of interest (sights / tourist spots) places / countries using google places api

I want to get points of interest of a place / country via google places api say "points of interest in London". I want the results to be the same as google google, as [here] [1. I used something like this

'https://maps.googleapis.com/maps/api/place/radarsearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&rankby=prominence&key=API_KEY')

where lat, long is the corresponding latitude, longitude of this place / country.

But the resulting json file does not extract the points of interest of this place, but simply displays neighboring places.

I also tried this

'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&&rankby=prominence&key=API_KEY'

who ended up in the same results

is it possible to do this without using the radius parameter

Please help me

+5
source share
2 answers

Try this google api url. You reach the point of interest / Attractions / Attractions (For example: New York . You must use CITY NAME with the keyword Point of Interest

 https://maps.googleapis.com/maps/api/place/textsearch/json?query=new+york+city+point+of+interest&language=en&key=API_KEY 

These API results match the results of the following google search results.

https://www.google.com/search?sclient=psy-ab&site=&source=hp&btnG=Search&q=New+York+point+of+interest

+8
source

It looks like you can search for an API that displays Google search results, and there is one: Google Custom Search https://developers.google.com/custom-search/docs/overview

You can use nearby search or radar if you are looking for more specific supported types: https://developers.google.com/places/supported_types#table1

+1
source

Source: https://habr.com/ru/post/951009/


All Articles