cURL
curl "https://api.ruseo.cn/api/phone_number?phone=13888888888&action=info&country=cn"
手机号归属地、运营商查询,支持全球手机号格式验证和格式化
https://api.ruseo.cn/api/phone_number
接口调用前需要确认的核心配置。
/api/phone_numberphone_number必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
phone |
是 | string | 手机号(支持国内外手机号) | 13888888888 |
action |
否 | string | 操作类型:validate(仅验证)/info(详细信息)/format(格式化),默认info | info |
country |
否 | string | 国家代码,默认CN(中国) | cn |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/phone_number?phone=13888888888&action=info&country=cn
curl "https://api.ruseo.cn/api/phone_number?phone=13888888888&action=info&country=cn"
$url = 'https://api.ruseo.cn/api/phone_number?phone=13888888888&action=info&country=cn';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/phone_number?phone=13888888888&action=info&country=cn')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "phone_number",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
phone |
string | 输入的手机号 | |
country |
string | 国家代码 | |
is_valid |
boolean | 手机号格式是否有效 | |
is_possible |
boolean | 手机号是否可能存在 | |
number_type |
string | 号码类型(手机号码/固定电话等) | |
formats.e164 |
string | E.164格式(如:+8613800138000) | |
formats.international |
string | 国际格式(如:+86 138 0013 8000) | |
formats.national |
string | 国内格式(如:138 0013 8000) | |
country_code |
number | 国家区号(如:86) | |
national_number |
string | 国内号码(不含区号) | |
region_code |
string | 地区代码(如:CN) | |
location |
string | 归属地信息 | |
carrier |
string | 运营商信息(中国移动/联通/电信等) | |
timezones |
array | 时区信息 | |
点击左侧“发送请求”查看结果...