Docs › API reference › Phone verification
HLR lookup
The home location register (HLR) is a central database with details of every mobile subscriber on the global mobile network. Use this API to confirm in real time that a mobile number is live and registered, and to find the carrier name, ported number status and current device status.
Note
This API has non-deterministic latency that depends on outside factors. The average is 1 to 5 seconds.
POST
https://api.screenlyyid.com/api/v1/hlr-lookupHeaders#
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your ScreenlyyID API key |
x-correlation-id | string (uuid) | No | Correlation ID for this customer check |
Request body#
| Field | Type | Required | Description |
|---|---|---|---|
PhoneNumber | string | No | |
CountryCode | string | No |
Responses#
| Status | Description |
|---|---|
200 | Successful response |
Response body (200)#
| Field | Type | Required | Description |
|---|---|---|---|
Country | string | No | |
IsPorted | boolean | Yes | |
CountryCode | string | No | |
Mnc | string | No | |
NumberType | string | No | |
InternationalNumber | string | No | |
OriginNetwork | string | No | |
RoamingCountryCode | string | No | |
Imsi | string | No | |
LocalNumber | string | No | |
Mcc | string | No | |
HlrStatus | string | No | |
HlrValid | boolean | Yes | |
CurrentNetwork | string | No | |
Msin | string | No | |
IsRoaming | boolean | Yes | |
Location | string | No | |
Msc | string | No | |
CurrencyCode | string | No | |
InternationalCallingCode | string | No | |
NumberValid | boolean | Yes | |
PortedNetwork | string | No | |
IsMobile | boolean | Yes | |
CountryCode3 | string | No |
Code samples#
curl --request POST \
--url 'https://api.screenlyyid.com/api/v1/hlr-lookup' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-correlation-id: YOUR_CORRELATION_ID' \
--header 'Content-Type: application/json' \
--data '{
"PhoneNumber": "+61412345678",
"CountryCode": "AU"
}'const body = {
"PhoneNumber": "+61412345678",
"CountryCode": "AU"
};
const response = await fetch(
"https://api.screenlyyid.com/api/v1/hlr-lookup",
{
"method": "POST",
"headers": {
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID",
"Content-Type": "application/json"
},
"body": JSON.stringify(body)
}
);
const result = await response.json();import requests
payload = {
"PhoneNumber": "+61412345678",
"CountryCode": "AU"
}
response = requests.post(
'https://api.screenlyyid.com/api/v1/hlr-lookup',
headers={
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID"
},
json=payload
)
result = response.json()using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
client.DefaultRequestHeaders.Add("x-correlation-id", "YOUR_CORRELATION_ID");
var json = @"{
""PhoneNumber"": ""+61412345678"",
""CountryCode"": ""AU""
}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.screenlyyid.com/api/v1/hlr-lookup", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();