{
"input": "+254 712 345 678",
"valid": true,
"possible_length": true,
"country": {
"iso": "KE",
"name": "Kenya",
"calling_code": "+254"
},
"e164": "+254712345678",
"international": "+254 712 345 678",
"national": "0712 345 678",
"national_number": "712345678",
"type": "mobile",
"mobile_check": "préfixes mobiles vérifiés",
"errors": [],
"disclaimer": "Validation sur indicatif et longueur du plan de numérotation ; n’atteste pas que la ligne est attribuée ou joignable."
}
curl --location --request GET 'https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40386/parse+a+phone+number?phone=+254 712 345 678&default_country=KE' --header 'Authorization: Bearer YOUR_API_KEY'
{
"input": "+254 712 345 678",
"valid": true,
"possible_length": true,
"country": {
"iso": "KE",
"name": "Kenya",
"calling_code": "+254"
},
"e164": "+254712345678",
"international": "+254 712 345 678",
"national": "0712 345 678",
"national_number": "712345678",
"type": "mobile",
"mobile_check": "préfixes mobiles vérifiés",
"errors": [],
"disclaimer": "Validation sur indicatif et longueur du plan de numérotation ; n’atteste pas que la ligne est attribuée ou joignable."
}
curl --location --request POST 'https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40387/parse+a+phone+number' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"phone":"+254 712 345 678","default_country":"KE"}'
{
"e164": "+33612345678",
"international": "+33 6 12 34 56 78",
"country": {
"iso": "FR",
"name": "France",
"calling_code": "+33"
},
"type": "mobile"
}
curl --location --request GET 'https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40388/normalize+to+e164?phone=06 12 34 56 78&default_country=FR' --header 'Authorization: Bearer YOUR_API_KEY'
{
"e164": "+33612345678",
"international": "+33 6 12 34 56 78",
"country": {
"iso": "FR",
"name": "France",
"calling_code": "+33"
},
"type": "mobile"
}
curl --location --request POST 'https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40389/normalize+to+e164' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"phone":"06 12 34 56 78","default_country":"FR"}'
{
"count": 124,
"countries": [
{
"iso": "FR",
"name": "France",
"calling_code": "+33",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "GB",
"name": "Royaume-Uni",
"calling_code": "+44",
"national_number_length": "9-10",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "DE",
"name": "Allemagne",
"calling_code": "+49",
"national_number_length": "7-13",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "ES",
"name": "Espagne",
"calling_code": "+34",
"national_number_length": "9",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "IT",
"name": "Italie",
"calling_code": "+39",
"national_number_length": "6-11",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "PT",
"name": "Portugal",
"calling_code": "+351",
"national_number_length": "9",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "BE",
"name": "Belgique",
"calling_code": "+32",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "NL",
"name": "Pays-Bas",
"calling_code": "+31",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "CH",
"name": "Suisse",
"calling_code": "+41",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "AT",
"name": "Autriche",
"calling_code": "+43",
"national_number_length": "4-13",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "IE",
"name": "Irlande",
"calling_code": "+353",
"national_number_length": "7-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "LU",
"name": "Luxembourg",
"calling_code": "+352",
"national_number_length": "4-11",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "SE",
"name": "Suède",
"calling_code": "+46",
"national_number_length": "7-13",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "NO",
"name": "Norvège",
"calling_code": "+47",
"national_number_length": "8",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "DK",
"name": "Danemark",
"calling_code": "+45",
"national_number_length": "8",
"national_prefix": null,
"mobile_detection": false
},
{
"iso": "FI",
"name": "Finlande",
"calling_code": "+358",
"national_number_length": "5-12",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "IS",
"name": "Islande",
"calling_code": "+354",
"national_number_length": "7",
"national_prefix": null,
"mobile_detection": false
},
{
"iso": "PL",
"name": "Pologne",
"calling_code": "+48",
"national_number_length": "9",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "CZ",
"name": "Tchéquie",
"calling_code": "+420",
"national_number_length": "9",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "SK",
"name": "Slovaquie",
"calling_code": "+421",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "HU",
"name": "Hongrie",
"calling_code": "+36",
"national_number_length": "8-9",
"national_prefix": "06",
"mobile_detection": true
},
{
"iso": "RO",
"name": "Roumanie",
"calling_code": "+40",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "BG",
"name": "Bulgarie",
"calling_code": "+359",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "GR",
"name": "Grèce",
"calling_code": "+30",
"national_number_length": "10",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "HR",
"name": "Croatie",
"calling_code": "+385",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "RS",
"name": "Serbie",
"calling_code": "+381",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "SI",
"name": "Slovénie",
"calling_code": "+386",
"national_number_length": "8",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "EE",
"name": "Estonie",
"calling_code": "+372",
"national_number_length": "7-8",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "LV",
"name": "Lettonie",
"calling_code": "+371",
"national_number_length": "8",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "LT",
"name": "Lituanie",
"calling_code": "+370",
"national_number_length": "8",
"national_prefix": "8",
"mobile_detection": true
},
{
"iso": "MT",
"name": "Malte",
"calling_code": "+356",
"national_number_length": "8",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "CY",
"name": "Chypre",
"calling_code": "+357",
"national_number_length": "8",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "UA",
"name": "Ukraine",
"calling_code": "+380",
"national_number_length": "9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "BY",
"name": "Biélorussie",
"calling_code": "+375",
"national_number_length": "9",
"national_prefix": "8",
"mobile_detection": true
},
{
"iso": "TR",
"name": "Turquie",
"calling_code": "+90",
"national_number_length": "10",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "RU",
"name": "Russie",
"calling_code": "+7",
"national_number_length": "10",
"national_prefix": "8",
"mobile_detection": true
},
{
"iso": "KZ",
"name": "Kazakhstan",
"calling_code": "+7",
"national_number_length": "10",
"national_prefix": "8",
"mobile_detection": true
},
{
"iso": "UZ",
"name": "Ouzbékistan",
"calling_code": "+998",
"national_number_length": "9",
"national_prefix": null,
"mobile_detection": true
},
{
"iso": "IL",
"name": "Israël",
"calling_code": "+972",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "AE",
"name": "Émirats arabes unis",
"calling_code": "+971",
"national_number_length": "8-9",
"national_prefix": "0",
"mobile_detection": true
},
{
"iso": "SA",
"name": "Arabie saoudite",
"calling_code": "+966",
"national_number_length": "8-9",
"national_prefix": "0"
}
],
"_note": "Response truncated for documentation purposes"
}
curl --location --request GET 'https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40390/list+phone+countries' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 电话号码解析器和验证器 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
使用静态编号计划表(国家/地区呼叫代码和长度)分析并规范化 124 个国家和地区的电话号码(E.164、国际和国内格式)
它返回原始输入、有效性指标、检测到的国家、国家/地区呼叫代码、规范化的 E.164 号码、国际和国内显示格式、国内号码、号码类型、移动前缀状态、错误以及验证免责声明
`valid: true` 表示该号码符合已识别的国家/地区拨号代码及适用的编号计划规则,例如预期长度。这并不能确认该号码已分配、处于活动状态或可接通。
`possible_length` 表示该号码长度是否符合检测到的编号计划。`valid` 概括了整体结构验证结果,包括国家和格式检查。结构上有效的号码仍可能不属于真实用户。
该 API 返回 JSON。`e164` 包含紧凑的国际格式,例如 `+254712345678`;`international` 会添加易读的空格;`national` 使用该国家的国内格式;`national_number` 包含不带国家呼叫代码的号码。
该 API 支持 124 个国家和地区。覆盖内容包括国家 ISO 代码、名称、电话区号、预期号码长度,以及在被认为可靠时提供的移动号码前缀。覆盖范围端点提供可用的国家规则。
响应可以使用 `type` 字段对号码进行分类,例如 `mobile`。移动号码分类取决于可用的编号计划和前缀数据。缺少分类或分类不确定,不应被视为该号码属于固定电话、移动电话或已分配的证明
数字可以采用国际格式输入,包括带空格的格式,例如 `+254 712 345 678`。API 会将识别到的输入规范化为 E.164 格式,并提供国际和国内显示格式。仅在只需要 E.164 结果时使用规范化端点
当提供的号码无法进行结构化规范化时,规范化端点会返回 HTTP 422。错误响应采用 `{"error":{"code","message"}}` 格式的 JSON。应用程序应检查状态码和错误字段,而不要假定已生成 E.164 值