Saul Dolgin
Saul Dolgin

Reputation: 8814

How to geocode a phone number in the United States?

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).

Upvotes: 5

Views: 6091

Answers (5)

Saul Dolgin
Saul Dolgin

Reputation: 8814

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

Option 1 (web service subscription):

Service Objects DOTS GeoPhone [edit: link is no good now] 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 [edit: link is no good now] 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.

Upvotes: 2

user860803
user860803

Reputation: 21

Using the Google Geocoding API and the list on the side of allareacodes.com, I created this json for a hacker project:

http://pintweets.com/area_codes.json [edit: link is no good now]

Clearly, this is not court-admissible evidence, but it should work for certain purposes.

Upvotes: 2

user2113156
user2113156

Reputation: 61

[EveryoneAPI][1] [edit: link now goes to a new site not related] will do exactly what you're looking for.

You can limit your query to location-only by adding "data=location" to your HTTP request, and you'll get back something like this:

"location": {
  "city": "Birmingham",
  "geo": {
    "latitude": "33.51685254860801",
    "longitude": "-86.81075983815001"
  },
  "state": "AL",
  "zip": "35203"
}

Disclaimer: I am the CEO of Telo. [1]: https://www.everyoneapi.com/

Upvotes: 1

Licky Lindsay
Licky Lindsay

Reputation: 1056

There are websites that do this, for example http://www.thedirectory.org [edit: link is no good now]. 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.

Upvotes: 2

Steve B.
Steve B.

Reputation: 57325

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.

Upvotes: 0

Related Questions