Question

I have a bunch of restaurants in an Excel. All these restaurants have Lat/Long co-ordinates. Sadly in this Excel their phone number is missing. If I want to book a reservation at a particular restaurant, I'll have to find out manually.

Is there some service which legally allows me to return the address along with phone number given Lat/Long which I can automate? Does Google Maps do this? Some links & guidance appreciated here.

Was it helpful?

Solution

Getting the address of a lat/lon pair is called reverse geocoding, and there are websites who can give an address. For example the webservice at geonames.org is offering this. I don't know the possibilities with google maps. But this blogpost says it is possible.

But you won't get a phone number this way.

OTHER TIPS

Take a look at the Google Places API. You can find by loc/lat and obtain the name and the phone number, among other interesting things, if I'm not wrong.

Note: the Places API may only be used in conjunction with displaying results on a Google map; using Place data without displaying a map for which Place data was requested is prohibited.

I usually head on over to programmableweb.com when I need an API to perform these kinds of lookups.

If I can't find what I'm looking for there I'll probably write a scraper and point it to a site that would have the data I need (in this scenario, possibly Yellow Pages)

You didn't specify any particular programming languages so I'd recommend YQL as an easy entry yet powerful tool for data scraping.

Alternativley, Perl is a great language for scraping and for the major frameworks like .NET and Java you should find class libraries that make this kind of task a lot more straightforward (e.g. HtmlAgilityPack)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top