The phonelookup endpoint validates and formats landline or mobile phone numbers, returning carrier, location, and type information, with optional activity status.
phonelookup to validate a phone number and retrieve
its carrier, type, and location in a single JSON response.
Looking for the legacy XML/form-based integration instead?
See
Classic Phone API (/TEL/) →
phonelookup
Request
Both GET and POST are supported.
Code examples
Valid mobile number
Send all parameters in the request body using
Content-Type: application/x-www-form-urlencoded.
The server address remains in the URL.
Code examples
Valid mobile number
Parameters
| Parameter | Description | Mand / Opt |
|---|---|---|
| Number | Phone number to validate. | Mandatory |
| Country | ISO 3-letter country code. | Mandatory |
| Licence | Your DQE licence key. Contact support if you do not yet have one. | Mandatory |
| Format | Desired output format. See the format values table below. | Optional |
| Activity |
Y if you want to get the activity
of the phone number.
|
Optional |
| TimeOut |
Maximum query time for verification, in seconds.
Example: 0.5 for 500 ms.
|
Optional |
| Separator |
Separator character used in the formatted phone
number. Accepted values: - and ..
Only works on formats that use spaces (1, 2,
3, 4, 6)
|
Optional |
Format values
The following values apply to the Format parameter
in both GET and POST requests.
| Value | Description | Examples (Germany / France / USA) |
|---|---|---|
| 0 | National format without spaces | 0301234567 / 0123456789 / (202)555-0123 |
| 1 | National format with country-specific digit grouping | 030 1234567 / 01 23 45 67 89 / (202) 555-0123 |
| 2 | International format with country-specific digit grouping | +49 30 1234567 / +33 1 23 45 67 89 / +1 202-555-0123 |
| 3 | International format with space between country code and subscriber number | +49 301234567 / +33 123456789 / +1 2025550123 |
| 4 | International format with trunk prefix and compact subscriber number | +49 (0)301234567 / +33 (0)123456789 / +1 (0)2025550123 |
| 5 | International format without spaces | +49301234567 / +33123456789 / +12025550123 |
| 6 | International format with trunk prefix and country-specific digit grouping | +49 (0) 30 1234567 / +33 (0) 1 23 45 67 89 / +1 (0) (202) 555-0123 |
| 7 | National format with dot-separated country-specific digit grouping | 030.1234567 / 01.23.45.67.89 / (202).555-0123 |
| 8 | International format with dot-separated country-specific digit grouping | +49.30.1234567 / +33.1.23.45.67.89 / +1.202-555-0123 |
| 9 | International format without spaces and without leading plus sign | 49301234567 / 33123456789 / 1202-555-0123 |
Response
On success, the API returns a JSON object containing the number of results and an array of validated phone numbers.
IdError carries
the detailed validation outcome (0: invalid
or non-existing, 1: valid and attributed,
2: valid syntax only, not attributed) — see
the full list in the
API Response Codes reference.
| Key | Description | Type |
|---|---|---|
| Found | Number of phone numbers returned. | Integer |
| Phones | Array of validation results, one entry per phone number submitted. | Array |
| IdError | Validation return code. See the API Response Codes reference. | String |
| Ported |
Y if the number has been ported;
empty when not available.
|
String |
| InputNumber | Phone number as submitted in the request. | String |
| Carrier | Current carrier of the phone number. | String |
| Location | Geographic location associated with the phone number. | String |
| OldCarrier | Previous carrier of the phone number, when known. | String |
| NumberFormatted | Phone number formatted according to the selected format. | String |
| Type |
MOBILE or FIXED_LINE
or Empty.
|
String |
Response example
Valid mobile number
Errors
| HTTP | Error type | Response body |
|---|---|---|
| 400 |
Missing or empty mandatory parameter (e.g. Number)
|
{"status": 400, "message": "Missing parameters",
"details": "Number", "error": "bad request"}
|
| 401 | Invalid or unauthorized licence key |
{"status": 401, "message": "Your licence
is not allowed to cover this functionnality",
"details": "deded", "error": "unauthorized_client"}
|
Test the API
Click the button below to test this endpoint live in your browser.
Open console
See also
Related to