AreaGeode is a area code geolocation library and web service.
AreaGeode provides geolocation data based on a telephone area code. Support is provided for US and Canada area codes.
This is handy for things such as:
- Given a phone number, get a rough idea of where it is located
- Given a phone number, get the state or province where it is located
- Given a state or province, get a list of the area codes
- Given a city, get a list of the area codes
- Given a phone number, get the range of timezones where the number resides
Timezones are presented as the eastern most and western most for the area code. If they are the same, the area code resides in a single timezone.
Using AreaGeode
AreaGeode is available online at https://areageode.sancsoft.net/.
Sample Request
Here’s a sample request to get the location for the Sanctuary Software phone number by supplying the 330 area code.
curl https://areageode.sancsoft.net/api/AreaGeode/330
Sample Response
The JSON response includes the state, country, coordinates of the geographical center, and time applicable timezones.
{
"areaCode": 330,
"stateAbbr": "OH",
"latitude": 41.063504444444,
"longitude": -81.314626111111,
"stateName": "Ohio",
"countryAbbr": "US",
"timezoneEast": "Eastern Standard Time",
"timezoneWest": "Eastern Standard Time"
}
Swagger
The API is documented via Swagger with online support for exercising the API at https://areageode.sancsoft.net/swagger/.
Source Code
Source code is available on Github at https://github.com/sancsoft/areageode. The code is provided under the MIT license.