PhoneBooth API Documentation

API Version 1.4.1 (2026-03-05)

URL

https://api.phonebooth.se

Endpoints


/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 (landline):
/validate/031650000/

Example response (landline):

{
    "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"
    }
}

Example response (mobile):

{
    "result": "ok",
    "error": false,
    "query": "0701234567",
    "number": "070-123 45 67",
    "valid": true,
    "active": true,
    "type": "mobile"
}

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 (landline):

{
    "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"
    }
}

Example response (mobile):

{
    "result": "ok",
    "error": false,
    "number": "070-123 45 67",
    "valid": true,
    "active": true,
    "type": "mobile",
    "details": {
        "carrier": "Tele2 Sverige AB"
    },
    "owner_info": {
        "owner_type": "no info"
    }
}

Error response:

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

Note: Owner information is provided by an external service and may not always be available.

/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:

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

Error response:

{
    "result": "error",
    "error": true,
    "error_message": "No match."
}

Rate Limiting

All endpoints are rate limited to 20 requests per minute per IP address.

When the rate limit is exceeded, the API returns HTTP 429 Too Many Requests with a Retry-After header.

Escalating Blocks

Clients that continue to send requests after being rate limited will face escalating blocks:

Level Trigger Duration
Normal Exceeding 20 requests per minute Wait for window reset (~60 seconds)
1-hour block Continued requests while rate-limited 1 hour
24-hour block Repeated violation after 1-hour block expires 24 hours
Permanent block Repeated violation after 24-hour block expires Permanent

Example rate limit response:

{
    "result": "error",
    "error_code": "-429",
    "message": "Rate limit exceeded. Maximum 20 requests per minute.",
    "retry_after": 45
}

Example block response (1-hour block):

{
    "result": "error",
    "error_code": "-429",
    "message": "Too many requests. Your IP has been temporarily blocked for 1 hour.",
    "retry_after": 3600
}

Permanently blocked IPs will not receive a retry_after field.