---
updatedAt: 2025-02-12T22:19:27.000Z
agentTools:
  projectIndex: https://developers.melroselabs.com/llms.txt
---

# Lookup telephone number

Get location information on a telephone number (mobile or fixed line)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Location API",
    "description": "The Location API is used for retrieving information on IP addresses, mobile numbers and other subjects. API keys for including as the x-api-key header in requests can be obtained at <a href=\"https://melroselabs.com\">https://melroselabs.com</a>. The Location API is part of the <a href=\"https://melroselabs.com/services/identity-and-location/\">Identity and Location</a> service from Melrose Labs.<br/><br/><strong>IP Address Lookup</strong><br/><br/>The geographic location associated with an IP address can be looked-up. This information is typically used when verifying the location of a user of a service to help identify fraudulent activity or to aid with presenting the correct website or content based on the user's location.<br/><br/><strong>Telephone Number Lookup</strong><br/><br/>Mobile and fixed-line telephone numbers can be looked-up using the API in order to determine the country and network for the user's home network and where they are currently located (if not currently on their home network). This information is typically used when optimising routing of voice calls and SMS, however can be used as part of anti-fraud checks and for other purposes.<br/><br/?>For a fixed-line telephone number the country and network to which the number belongs is returned by the API. For fixed-line and mobile numbers, the network returned by the API may be the network to which the local numbering authority originally allocated the number, rather than the network which the number may have been ported.<br/><br/>The HTTPS REST API is described below, however an ENUM service will be available in the future.<br/><br/>",
    "contact": {
      "name": "Melrose Labs - Technical Support",
      "email": "support@melroselabs.com"
    },
    "version": "2023-08-09T14:23:39Z"
  },
  "servers": [
    {
      "url": "https://api.melroselabs.com/{basePath}",
      "variables": {
        "basePath": {
          "default": "/location"
        }
      }
    }
  ],
  "paths": {
    "/telno/{telephoneno}": {
      "get": {
        "tags": [
          "Phone Numbers"
        ],
        "summary": "Lookup telephone number",
        "description": "Get location information on a telephone number (mobile or fixed line)",
        "parameters": [
          {
            "name": "telephoneno",
            "in": "path",
            "description": "Telephone number (mobile or fixed-line)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful telephone number lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationTelNo"
                }
              }
            }
          },
          "400": {
            "description": "Unsuccessful lookup of telephone number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorTelNo"
                }
              }
            }
          },
          "404": {
            "description": "Unsuccessful lookup of telephone number (number issue)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorTelNo"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LocationTelNo": {
        "title": "LocationTelNo Schema",
        "required": [
          "number",
          "subject"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "description": "Telephone number"
          },
          "number": {
            "required": [
              "country"
            ],
            "type": "object",
            "properties": {
              "country": {
                "type": "string",
                "description": "Country digits"
              },
              "ndc": {
                "type": "string",
                "description": "Network prefix digits"
              },
              "subscriber": {
                "type": "string",
                "description": "Subscriber digits"
              }
            },
            "description": "Telephone number split into components"
          },
          "geo": {
            "$ref": "#/components/schemas/LocationTelNoGeo"
          },
          "network": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of network"
              },
              "mccmnc": {
                "type": "array",
                "description": "List of MCC-MNCs of network",
                "items": {
                  "type": "string",
                  "description": "MCC-MNC of network"
                }
              },
              "geoHome": {
                "$ref": "#/components/schemas/LocationTelNoGeo"
              },
              "geoCurrent": {
                "$ref": "#/components/schemas/LocationTelNoGeo"
              }
            },
            "description": "Network of subscriber"
          }
        },
        "description": "Data for a telephone number"
      },
      "ErrorTelNo": {
        "title": "ErrorTelNo Schema",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error string",
            "enum": [
              "OK",
              "UNKNOWN_SUBSCRIBER",
              "CALL_BARRED",
              "ABSENT_SUBSCRIBER",
              "TIMEOUT",
              "REQUEST_THROTTLED",
              "BLOCKED",
              "FAILURE",
              "NO_NUMBER_DATA"
            ]
          }
        }
      },
      "LocationTelNoGeo": {
        "type": "object",
        "properties": {
          "country_name": {
            "type": "string",
            "description": "Country ISO 3166/MA (truncated where necessary)"
          },
          "country_code": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "Country code ISO 3166-1 alpha-2"
          },
          "continent": {
            "type": "string",
            "description": "Continent name",
            "enum": [
              "Africa",
              "Asia",
              "Europe",
              "North America",
              "South America",
              "Antarctica",
              "Oceania"
            ]
          },
          "continent_code": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "Continent code (AF,AS,EU,NA,SA,AN,OC)",
            "enum": [
              "AF",
              "AS",
              "EU",
              "NA",
              "SA",
              "AN",
              "OC"
            ]
          }
        },
        "description": "Geographic location"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```