📖 Quick Start
1. Get your free API Key
Use the form above or call:
curl -X POST https://phone-validator-api-2izk.onrender.com/registrar \
-H "Content-Type: application/json" \
-d '{"email": "you@email.com", "nome": "Your Name"}'
2. Validate a number
cURL
curl -X POST https://phone-validator-api-2izk.onrender.com/validar \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"numero": "+258 84 123 4567"}'
Python
import requests
url = "https://phone-validator-api-2izk.onrender.com/validar"
headers = {
"X-API-Key": "your-api-key",
"Content-Type": "application/json"
}
data = {"numero": "+258 84 123 4567"}
response = requests.post(url, json=data, headers=headers)
print(response.json())
JavaScript (Node.js)
const response = await fetch(
"https://phone-validator-api-2izk.onrender.com/validar",
{
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({ numero: "+258 84 123 4567" })
}
);
const data = await response.json();
console.log(data);
PHP
<?php
$url = "https://phone-validator-api-2izk.onrender.com/validar";
$data = json_encode(["numero" => "+258 84 123 4567"]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: your-api-key",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
3. Response example
{
"numero_original": "+258 84 123 4567",
"numero_normalizado": "+258841234567",
"pais": "Moçambique",
"codigo_pais": "+258",
"operadora": "Vodacom",
"tipo": "celular",
"valido": true
}
✅ Features
✔ 25 African & Lusophone countries
✔ Carrier detection (Vodacom, MTN, Safaricom, etc.)
✔ Line type (mobile, landline, toll-free)
✔ Number normalization (E.164 format)
✔ Automatic country detection
✔ REST API with JSON responses