电话号码解析器和验证器 API

API ID 15136

使用静态编号计划表(国家/地区电话区号和号码长度)分析并规范化124个国家和地区的电话号码(E.164、国际和国内格式)

36 ms 平均响应

API 文档

端点

请求
解析国际电话号码并返回其国家、格式、有效性和规范化的 E.164 表示形式
Endpoint ID: 40386
GET https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40386/parse+a+phone+number
输入参数

解析电话号码 — 端点功能

对象 描述
phone 必需 International (+254...) or national phone number
default_country 可选 ISO 2-letter country code, required if the number is national

剩余免费测试请求:3 / 3。


输入参数

phone
default_country
API 示例响应
JSON
{
    "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' 


    
请求
解析国际或国内格式的电话号码并返回其有效性、国家、E.164 格式、国际格式和国内格式
Endpoint ID: 40387
POST https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40387/parse+a+phone+number
输入参数

解析电话号码 — 端点功能

对象 描述
请求体 必需 Json

剩余免费测试请求:3 / 3。


输入参数

API 示例响应
JSON
{
    "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"}'

    
请求
将电话号码规范化为 E.164 格式。如果该号码在所属国家/地区无效,则返回错误(422)
Endpoint ID: 40388
GET https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40388/normalize+to+e164
输入参数

规范化为 E164 — 端点功能

对象 描述
phone 必需 Value for the phone parameter (see the example)
default_country 可选 ISO 2 lettres

剩余免费测试请求:3 / 3。


输入参数

phone
default_country
API 示例响应
JSON
{
    "e164": "+33612345678",
    "international": "+33 6 12 34 56 78",
    "country": {
        "iso": "FR",
        "name": "France",
        "calling_code": "+33"
    },
    "type": "mobile"
}
规范化为 E164 — 代码片段

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' 


    
请求
将电话号码规范化为 E.164 格式。如果号码对于其所属国家/地区无效,则返回错误(422)
Endpoint ID: 40389
POST https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40389/normalize+to+e164
输入参数

规范为 E164格式 — 端点功能

对象 描述
请求体 必需 Json

剩余免费测试请求:3 / 3。


输入参数

API 示例响应
JSON
{
    "e164": "+33612345678",
    "international": "+33 6 12 34 56 78",
    "country": {
        "iso": "FR",
        "name": "France",
        "calling_code": "+33"
    },
    "type": "mobile"
}
规范为 E164格式 — 代码片段

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"}'

    
请求
列出涵盖的国家及其电话区号和国家号码长度规则
Endpoint ID: 40390
GET https://zylalabs.com/api/15136/phone+number+parser+and+validator+api/40390/list+phone+countries
输入参数

剩余免费测试请求:3 / 3。

此端点不需要任何输入参数。

API 示例响应
JSON
{
    "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 端点。要使用 电话号码解析器和验证器 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。

标头
标头 描述
授权 必需 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。

无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。

起价
$10,000/年


  • 自定义数量
  • 自定义速率限制
  • 专业客户支持
  • 实时 API 监控

概览

使用静态编号计划表(国家/地区呼叫代码和长度)分析并规范化 124 个国家和地区的电话号码(E.164、国际和国内格式)

电话号码解析器和验证器 API FAQs

它返回原始输入、有效性指标、检测到的国家、国家/地区呼叫代码、规范化的 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 值

一般常见问题

Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。
价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]

此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。
定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。
有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]
价格由月度或年度订阅决定,具体取决于所选计划。
API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。
Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。
要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。
要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。
要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。
"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。
是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。
为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。
7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。
当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。
付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。
您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]

相关 API