views:

497

answers:

3

I am looking for a way to get the latitude and longitude coordinates of any area code + prefix land line phone in the United States. Does anyone know of a data provider or service that could be used to do this?

EDIT: I understand that the location of cell phones or VOIP lines probably cannot be geocoded and this is fine by me. I am only interested in POTS phone numbers. Although, it would be nice to be able to identify the type of phone service based on the prefix (if this is even possible).

A: 

There's publicly available geocode data for zipcodes (although the location they give is the geocode for the corresponding post office), so you might be able to build a correspondence that way (although you'd have to pick the specific zip more or less at random, as there are many more zips than area codes).

However there's going to be some built in error. Some numbers (e.g. 800 numbers) don't have a specific location by design. Same with cell numbers. In NY, in any case, there are cell #'s that start with the same areacode as NY-located phone #'s (e.g. 718, 212). I'm not sure if the carriers are required to provide those #'s in a way that corresponds with the customers billing address, either, so you might get a situation where most of the 212 #'s are NYC but some are cell phones in Wichita.

Steve B.
Also I believe some VOIP services can assign any area code that the customer wants, regardless of physical location.
Licky Lindsay
A zip database is better than nothing, but it's only half a solution; Saul's trying to zero-in using the prefix, not just the area code. I don't know if that info is available in a zip DB -- it wasn't when I was looking at them, but that was six years ago.
BlairHippo
Steve B. - Unless the publicly available geocode data for zipcodes includes area codes, I don't know how it would help me. Also, I am aware that the location of cell phones, VOIP phones, etc could not be realistically geocoded (which is why I stated "land line") in the question. I will try and revise to be more clear about the type of phone numbers I am trying to work with.
Saul Dolgin
The database I was working with six years ago did indeed include area code data. (Granted, that DB wasn't free, but it was pretty cheap.) Just wasn't any prefix data, and the amount of terrain covered by a single area code can be kinda freakin' huge.
BlairHippo
+2  A: 

There are websites that do this, for example http://www.thedirectory.org. I have no idea if they have anything like a RESTful api you could use, although I guess you could always screenscrape them. Presumably the raw data that they're using should be something you could obtain yourself, possibly from the phone company.

Licky Lindsay
This is helpful, thank you. Unfortunately, I will have to keep looking. According to the FAQ at http://www.thedirectory.org they limit the number of lookups to 50 in a 48 hour period and do not provide or sell the database in any other form. :(
Saul Dolgin
+1  A: 

I found a few options that do the trick for a reasonable price:

Option 1 (web service subscription):

Service Objects DOTS GeoPhone web service should do the trick nicely. It even seems to provide the "telephone service type" information that I was hoping for.

Option 2 (database subscription):

AreaCodeWorld™ Platinum Edition is a database product that can be purchased on a one-time basis or via annual subscription. The data spec includes all North American area codes and prefixes along with latitude & longitude coordinates.

Saul Dolgin