Google Places API - Part 2

A follow up from my previous post. After some digging and experimentation, was finally able to come up with a way to mass search coordinates of a specific location type (i.e shopping malls across KL).

Basically there are a couple of services that you could use, depending on the output that you want. More on that here. So based on the guide, I know that what I need would probably be more or less covered with Radar and Nearby - since I basically need the coordinates and on a mass scale.

In essence (since the full description is available on their website and I'd rather not overcomplicate things) the Radar Search service can give you up to 200 search results at a go, given a coordinate to start with. Sounds good - yes. So I gave the example a go. But they can only give you the coordinates in the result list - without the name of the place. You also get a place id for each those coordinate, but I somehow wasn't able to use that id and retrieve the place's name - so I suppose I was back to square one.

Next comes Nearby Search. At first I wasn't really keen on using this, since it basically can only give me 20 search at a go, and a total of 60 results after the pagination. It's not too shabby I suppose - but I'm a greedy person, and I want more!. :)

The return from the request seem to be adequate - I can get the coordinates, get the name of the place and then some other info as well (which I wasn't really interested about, but anyways...). But then I thought, if each request can give me up 60 results - I wonder what would happen if I shoot up several requests at the same time?

So that's what I basically did. I configured several request across some distance and ran script again.

Voila!

For each of those requests I can get up to 60 results, names and coordinates.
Note: You can't simply filter out the location types as you want. Check what Google actually support after the jump. 
Below are links to my Github pages for a demo. Source is available in my github.


1. Google Radar Search
Exploring the Google Places API and how it can be used to derive coordinates of places of interest.

2. Google Nearby Search
Exploring the Google Places API and how it can be used to derive coordinates of places of interest. While it can only return 60 results per request, you can always send multiple request across several coordinates to get more results across larger area.

Comments

Popular posts from this blog

HIVE: Both Left and Right Aliases Encountered in Join

A Basic Recipe for Machine Learning

Changing Windows Account password using Outlook