Sam
Sam

Reputation: 1269

Get all tourist locations using google places api

I need to get all the points of interest ( tourist locations ) around a person's location rank by distance. I am using this is URL to do

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.4219983,-122.084&rankby=distance&type=point_of_interest&key=

but the problem is that it is not returning any tourist location, instead, it is showing me all the places a person can visit including cafe, restaurants, clubs etc.

I only want tourist locations like for example, in case of Los Angeles, it should be Griffith Observatory, Universal Studios, Santa Monica Pier etc.

I did try textsearch api but it doesnt give me any proper result.

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

The above URL only gives around 20 results and I have to manually enter the name of the city which I don't want to do that. I want to search points of interest around a person's current location ranked by distance.

I have looked into this answer but it doesn't help.

Upvotes: 2

Views: 3494

Answers (2)

Maheshkumar.J
Maheshkumar.J

Reputation: 29

Here we can use the point of interest option for this......

https://maps.googleapis.com/maps/api/place/textsearch/json?query='PLACE_NAME'+point+of+interest&language=en&key=Your_API_KEY

Upvotes: 1

bpb101
bpb101

Reputation: 1071

As far as i am aware you cant. I would suggest using Museums, Stadiums and city_hall ect. Things that would be places of attractions and only a relatively small amount of items

Upvotes: 0

Related Questions