PhoneBooth API Documentation

API Version 1.3.0 (2017-01-27)

URL

https://api.phonebooth.se

Endpoints


/area_code

Retrieve information about an area code within a country context

Returns area code details with region and locality information

Supported countries:

Sweden ["se"], United States ["us"]

GET /area_code/country_code/prefix

Example query:
/area_code/se/031

Example response:

{
    "area_code": "031",
    "country": "se",
    "region": "Västra Götalands län",
    "locality": "Göteborg"
}

Error response:

 {"error":true,"error_message":"not found"}

/validate

Validates a phone number and retrieves basic details.

GET /validate/number/

The API will accept and interpret the following input formats (all whitespaces and dashes will be ignored):

["070X XX XX XX", "70X XX XX XX", "46 70X XX XX XX", "+46 70X XX XX XX", "046 070X XX XX XX", "046 70X XX XX XX"]

Example query:
/validate/031650000/

Example response:

{
    "result": "ok",
    "error": "false",
    "query": "031650000",
    "number": "031650000",
    "valid": true,
    "active": true,
    "area_code": "031",
    "type": "landline",
    "details": {
        "locality": "Göteborg",
        "region": "Västra Götalands län"
    }
}

Error response:

{
    "result": "error",
    "error": true,
    "error_message": "Parameter missing."
}

/lookup

Validates a phone number and retrieves detailed information (owner information) if possible. Otherwise same as /validate.

GET /lookup/number/

The API will accept and interpret the following input formats (all whitespaces and dashes will be ignored):

["070X XX XX XX", "70X XX XX XX", "46 70X XX XX XX", "+46 70X XX XX XX", "046 070X XX XX XX", "046 70X XX XX XX"]

Example query:
/lookup/031650000/

Example response:

{
    "result": "ok",
    "error": false,
    "number": "031650000",
    "area_code": "031",
    "suffix": "650000",
    "valid": true,
    "active": true,
    "type": "landline",
    "details": {
        "carrier": "TDC Sverige AB",
        "locality": "Göteborg",
        "region": "Västra Götalands län"
    },
    "owner_info": {
        "owner_type": "company",
        "name": "Taxi Göteborg",
        "street": "Gustaf Dalénsgatan",
        "street_no": "19",
        "zip": "41705",
        "city": "GÖteborg"
    }
}

Error response:

{
    "result": "error",
    "error": true,
    "error_message": "Parameter missing."
}

API Docs updated 2014-05-12