0

I have an URL (of a restaurant or a place), and I want to get the location (latitude and longitude) of that place using any JAVA API.

With Google Place API, this is possible only after querying the system and giving a description of places we are searching for. But all what we have as input here is the URL. This is why solutions given here and here are not responding to what I'm seeking for.

Community
  • 1
  • 1
Bill
  • 315
  • 3
  • 18
  • What sort of URL? A restaurant's website? Could you provide an example? – Matt Ball Jan 13 '14 at 23:48
  • A restaurant or a museum website. For example : http://www.myhistorymuseum.org/. – Bill Jan 13 '14 at 23:49
  • 1
    I really don't think you're going to find a location service that tracks website urls, no. – Brian Roach Jan 13 '14 at 23:50
  • So, I have to search for that place with Google Place API (find the place with the same url) and then get the location with the API? – Bill Jan 13 '14 at 23:53
  • 1
    Given that website, I could barely find their address clicking around as a human being... – Matt Ball Jan 13 '14 at 23:57
  • And if you have 1000 websites? :) – Bill Jan 13 '14 at 23:58
  • There will be URLs that don't map to a place at all, and then there will be URLs that map to multiple places (e.g. www.kfc.com). Even when you manually type a restaurant name into Google Maps, you sometimes have to tell it which one of the results you want. – shoover Jan 13 '14 at 23:59
  • @shoover: you are right! But in my case, all the URLs I have, point to one address, and refer to places in the same region. – Bill Jan 14 '14 at 00:02

1 Answers1

1

One solution could be to find the address by looking into Bottom Of home page (some sites put their address at footer) Find address from following pages linked to the main page Contact Us, About Us

None of the above approach is guaranteed to retrieve an address ...but is one step closer. Next option could be to lookup the whois to find the registered address. If you are a paid user of lookup service you may be able to lookup address for a particular registrar. But then, there are registries that keeps the address hidden (my own website has the address hidden, it shows the address of service provider).... so not always a success.

You can also lookup other services like Crunchbase, and any other directory service as a fallback.

So , let's say we assume you are able to get address of 60-70% websites with all techniques mentioned above. There are situation, where you will end up getting multiple address. You should have a logic to resolve to a particular address. Just think of getting address of Pizza Hut from pizzahut.com :-)

You can add more intelligence...but hope this is good enough to get you started on right direction.

javadevg
  • 644
  • 1
  • 7
  • 13
  • Sounds to be a bit long. Thank you anyway for the response ! I will try this :) Any further suggestions are welcome. – Bill Jan 14 '14 at 09:32