// get /v1/phone-validator
API Validation de Téléphone
Validez les numéros de téléphone en temps réel vérification du format, détection du type, identification du pays et de l'opérateur via notre API RESTful.
// console api
- valid
- true
- intl_format
- +1 650-555-0132
- line_type
- MOBILE
- carrier
- AT&T
- country_code
- US
- region.name
- California
- timezones
- 1 item
// 01 · requête
Phone Validator tient en une requête HTTPS
Envoyez les paramètres avec votre clé et votre secret. Chaque SDK, la CLI et le serveur MCP effectuent ce même appel.
/phone-validatorParamètrephoneobligatoire- The number, ideally in E.164
country_codeUS- Country, when the number has no prefix
curl "https://api.tomba.io/v1/phone-validator?phone=%2B16505550132" \
-H "X-Tomba-Key: $TOMBA_API_KEY" \
-H "X-Tomba-Secret: $TOMBA_SECRET_KEY"const res = await fetch("https://api.tomba.io/v1/phone-validator?phone=%2B16505550132", {
headers: {
"X-Tomba-Key": process.env.TOMBA_API_KEY,
"X-Tomba-Secret": process.env.TOMBA_SECRET_KEY
}
});
const { data } = await res.json();import os, requests
res = requests.get(
"https://api.tomba.io/v1/phone-validator?phone=%2B16505550132",
headers={
"X-Tomba-Key": os.environ["TOMBA_API_KEY"],
"X-Tomba-Secret": os.environ["TOMBA_SECRET_KEY"],
},
)
data = res.json()["data"]// 02 · réponse
Ce qui est renvoyé
Du JSON, identique dans tous les langages. Les champs que Tomba ne connaît pas valent null, jamais une supposition.
/phone-validatorChampdataobject | array- The number's details; an empty array, with phone repeating your input, when it isn't valid
data.validboolean | null- Whether the number is a valid phone number
data.intl_format, data.e164_format, data.local_formatstring | null- The number in international, E.164 and national formats
data.country_codestring | null- Country of the number (ISO code)
data.line_typestring | null- MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE…
data.carrierstring | null- The network operator
data.region, data.timezonesobject | null, array | null- Where the number is registered, and its time zones
{
"data": {
"valid": true,
"local_format": "(650) 555-0132",
"intl_format": "+1 650-555-0132",
"e164_format": "+16505550132",
"rfc3966_format": "tel:+1-650-555-0132",
"country_code": "US",
"line_type": "MOBILE",
"carrier": "AT&T",
"region": {
"name": "California",
"code": "CA"
},
"timezones": [
"America/Los_Angeles"
]
}
}// 03 · coût et limites
Ce que coûte un appel
Un appel n'est facturé que dans la condition ci-dessous. Les limites de débit dépendent de votre offre.
// coût
1search credit
Facturé quand: Every successful response, including one with no data.
Les erreurs, les réponses 429 et 451, ainsi que la même requête répétée dans votre fenêtre d'utilisation ne coûtent rien.
Comment fonctionnent les crédits// limites de débit
Requêtes par seconde / minute / jour| Free | Basic | Growth | Pro | |
|---|---|---|---|---|
| Search, finder, similar, technology | 1 / 2 / 5 | 3 / 50 / 500 | 5 / 80 / 1,000 | 8 / 150 / 4,000 |
| Email verifier | 1 / 2 / 10 | 2 / 40 / 500 | 3 / 60 / 1,000 | 5 / 100 / 4,000 |
Pro Plus, Scale and credit packs of 50,000 or more: no limit on these endpoints. Enterprise: no per-second or per-minute limit, 100,000 requests a day. Daily limits reset at 00:00 UTC. Limites de débit