5

At one point I had an idea for a localized web site specifically focusing on a single city. I spoke to several people within that city's government, and it was clear that there was no one single place that kept easily accessible and update-to-date contact information on all the businesses legally operating in the city limits. The closest I came was the chamber of commerce listed all members on their Web site, but these were members only.

Patrick Hoefler
  • 5,790
  • 4
  • 31
  • 47
user2206
  • 51
  • 2

3 Answers3

4

I would look into Google Places API for this. You have to register for an API key and the quota is limited to 100,000 requests a day (plus some multipliers on some requests), but it's a rather verbose database.

Example:

Here is a request URL to get all "food" places within 500m of the specified latitude-longitude that has the word "harbour" in it:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AddYourOwnKeyHere

The response is JSON so you will need to do a little parsing unless you use their JavaScript API or use some other wrapper.

If you're using Java, I actually developed my own Java wrapper around this API which I believe successfully maps the API 1 to 1 if it fits your purposes: https://github.com/windy1/google-places-api-java

With this library you can just do something like:

GooglePlaces client = new GooglePlaces("apiKey");
List<Place> places = client.getNearbyPlaces(lat, lng, radius, GooglePlaces.MAXIMUM_RESULTS);
for (Place place : places) {
    System.out.println(place.getName());
    System.out.println(place.getAddress());
}

Hope this helps!

Windwaker
  • 41
  • 2
2

If the city or county has an open portal it is likely they will have a business license dataset. Otherwise, I would contact the "Revenue/Licensing" department for the City and request a copy in electronic format.

I have a catalog of government open data portals at this link. There are 38 US Cities in the list:

http://www.opengeocode.org/opendata/opendata.php

Andrew - OpenGeoCode
  • 8,657
  • 17
  • 28
-1

You can use the search endpoints of foursquare api to get contact details of the venues from foursquare search.

James Risner
  • 278
  • 1
  • 3
  • 9
  • 1
    Could you provide more detail on how to use Foursquare to get contact info of only legally-operating businesses? – RCA Mar 07 '14 at 23:25
  • You can use the search endpoints of foursquare api to get contact details of the venues - https://developer.foursquare.com/docs/venues/search – surana90 Mar 11 '14 at 18:15