tags:

views:

188

answers:

3

Hi folks

I'm attempting to get a timezone of a user based on area code information that they provided. I discovered the following resource on maxmind:

http://geolite.maxmind.com/download/geoip/api/php/timezone/

I suspect that I could use this with another api that provides the state that an area code belongs to. I'm looking for a simple REST API that provides this info - or a robust scraping routine that achieve the same results.

Thanks in advance!

+3  A: 

I'd caution against this approach. A lot of my friends (those in the 18 to 30 demographic) move across the country and keep their old cell phone numbers. The area code is less and less an indication of current location and more and more an indication of where someone lived at one time. With google voice accounts people might get an area code because they like the number and have never lived there!

Will Shaver
Will - very true. The product we are building is for physical offices (doctor's offices, etc) and so their office phone is what we're using to we're hoping to extrapolate their timezone (without explicitly asking them).
niyogi
Then I'd recommend getting a list of area codes and building your own cross-reference in a table in your database. Here you go:http://www.bennetyee.org/ucsd-pages/area.html
Will Shaver
A: 

I don't know of any specific API made for this, but if you want to store the area code database locally, NANPA is in charge of managing them.

Here's a good starting point http://www.nationalnanpa.com/area_codes/index.html

scott
Scott - that seems to be a perfect starting point which I'll investigate further. In the meantime, I used Verizon's website (which has an area code form and posted to this with curl and parsed the result page for the info I needed). Super hacky and super unreliable but works (for now)...
niyogi
A: 

You wanna detect the area code and shows the time zone of that location? Go to this AreaCodeWorld website for more area code data products. It's quite accurate althought updated quarterly, but the database is covered most of the North America.

hexahow