API Documentation
API key
Available methods
Method | URL | Description | Settings |
---|---|---|---|
GET/POST | /api/v1/phone/validate |
Number validation | phone , country , api_key |
Parameters:
Parameter | Description | Example | Required |
---|---|---|---|
api_key |
API key | your_key |
Yes |
phone |
Phone number | +393201234567 |
Yes |
country |
Country code | IT , ["IT","US","DE"] |
No |
Working with multiple countries
The country
parameter supports several formats:
- Single country:
IT
- Multiple countries (comma):
IT,US,DE
- Multiple countries (semicolon):
IT;US;DE
- Multiple countries (space):
IT US DE
- Array of countries (POST):
["IT", "US", "DE"]
The API tries to parse the number with each country in turn until a valid result is found. This is especially useful for numbers in national format.
Response codes
Code | Description | Example |
---|---|---|
200 | Successful request |
|
400 | Invalid request (parameter error) |
|
401 | Unauthorized (invalid or missing API key) |
|
403 | Access denied (no rights or blocked) |
|
404 | Method or resource not found |
|
429 | Request limit exceeded |
|
500 | Internal server error |
|
Test API key:
If you use this key in requests, the API always returns a demo (mock) response.
Balance is not spent, real checks are not performed.
Example:
test
If you use this key in requests, the API always returns a demo (mock) response.
Balance is not spent, real checks are not performed.
Example:
curl "https://numlook.ru/api/v1/phone/validate?phone=+393201234567&api_key=test"
Usage examples
cURL commands
Number validation:
cURL
curl "https://numlook.ru/api/v1/phone/validate?phone=+393201234567&api_key=your_key"
With multiple countries:
cURL
curl "https://numlook.ru/api/v1/phone/validate?phone=3201234567&country=IT,US,DE&api_key=your_key"
POST request with country array:
cURL
curl -X POST "https://numlook.ru/api/v1/phone/validate" \
-H "Content-Type: application/json" \
-d '{
"phone": "3201234567",
"country": ["IT", "US", "DE"],
"api_key": "your_key"
}'
JavaScript (fetch)
Number validation:
JavaScript
// Number validation
fetch('https://numlook.ru/api/v1/phone/validate?phone=+393201234567&api_key=your_key')
.then(response => response.json())
.then(data => console.log(data));
With multiple countries:
JavaScript
// With multiple countries
fetch('https://numlook.ru/api/v1/phone/validate?phone=3201234567&country=IT,US,DE&api_key=your_key')
.then(response => response.json())
.then(data => console.log(data));
POST request with country array:
JavaScript
// POST request with array of countries
fetch('https://numlook.ru/api/v1/phone/validate', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '3201234567',
country: ['IT', 'US', 'DE'],
api_key: 'your_key'
})
})
.then(response => response.json())
.then(data => console.log(data));
PHP
Single number validation:
PHP
// Single number validation
$apiKey = 'your_key';
$phone = '+393201234567';
$response = file_get_contents(
"https://numlook.ru/api/v1/phone/validate?phone=" . urlencode($phone) . "&api_key=" . $apiKey
);
$data = json_decode($response, true);
var_dump($data);
With multiple countries:
PHP
// With multiple countries
$apiKey = 'your_key';
$phone = '3201234567';
$countries = 'IT,US,DE';
$response = file_get_contents(
"https://numlook.ru/api/v1/phone/validate?phone=" . urlencode($phone) . "&country=" . urlencode($countries) . "&api_key=" . $apiKey
);
$data = json_decode($response, true);
var_dump($data);
POST request with country array:
PHP
// POST request with array of countries
$apiKey = 'your_key';
$postData = json_encode([
'phone' => '3201234567',
'country' => ['IT', 'US', 'DE'],
'api_key' => $apiKey
]);
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => 'Content-Type: application/json',
'content' => $postData
]
]);
$response = file_get_contents('https://numlook.ru/api/v1/phone/validate', false, $context);
$data = json_decode($response, true);
var_dump($data);