Grabbing data from google places api -
i need grab business locations in city of miami google places. problem limit 60 results per request. there anyway around this? thought limiting search downwards more , doing more requests i'm kind of stuck there how this. ideas?
here documentation of google places api searching places. can read in bottom "the maximum number of results can returned 60.".
so have create more 1 request results.
as want location of business, utilize radar search allows search 200 places @ once, less detail (location included in response) typically returned text search or nearby search request.
so have create calls in format:
https://maps.googleapis.com/maps/api/place/radarsearch/json?location=25.789097,-80.204044&radius=5000&types=movie_theater&key=addyourownkeyhere where can read more parameter types here. remember utilize own api key
this phone call homecoming 200 places, location, in cirlce radius 5000 meters around location( here 25.789097,-80.204044).
so first phone call should location=25.789097,-80.204044(miami center) , radius lets 500 meters.
the sec phone call should location point outside first circle , in way cirlce not overlap previous 1 , radius 500 meters.
and go on way.
you have set circles dont overlap each other , cover desired area want in miami.
if want info google place should utilize call:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=25.789097,-80.204044&radius=500&key=addyourownkeyhere which returns 20 results though, in same way explained before.
google-maps google-places-api
No comments:
Post a Comment