免费IP归属地与手机号归属地查询API

启灵主题商业用户专属的 IP、手机号、快递与抖音视频解析平台,为您的 WordPress 站点提供定位、身份识别、物流查询及视频解析支持。

查看 API 文档

API 对接文档

接口地址

GET https://api.jingxialai.com/api/ip

请求参数

参数类型必须说明
ipstring要查询的 IP 地址(IPv4 或 IPv6),传 self 查询调用者 IP

鉴权方式

在请求头中携带 API Key:

X-API-Key: ip_live_xxxxxxxxxxxxxxxx

成功响应(200)

{ "ip": "114.114.114.114", "continent": "亚洲", "country": "中国", "country_code": "CN", "country_en": "China", "province": "四川省", "city": "成都市", "district": "", "postal_code": "610000", "admin_code": "510100", "isp": "中国电信", "organization": "中国电信", "longitude": "118.7969", "latitude": "32.0603", "timezone": "UTC+8", "radius": "", "region": "华东", "network_type": "ISP" }

返回字段说明

💡 为什么部分字段标注“部分数据提供”?

底层采用智能分流与降级路由引擎。所以返回的数据可能不一样。

如果你要稳定的国内区县数据,请单独联系说明。

字段类型说明
ipstring查询的 IP 地址
continentstring大洲,如"亚洲"(部分数据提供)
countrystring国家,如"中国"
country_codestring国家简码,如"CN"
country_enstring国家英文名,如"China"(部分数据提供)
provincestring省份,如"四川省"
citystring城市,如"成都市"
districtstring区县(部分数据提供)
postal_codestring邮政编码(部分数据提供)
admin_codestring行政区划代码,如"320100"
ispstring运营商,如"中国电信"
organizationstring所属机构(部分数据提供)
longitudestring经度(部分数据提供)
latitudestring纬度(部分数据提供)
timezonestring时区,如"UTC+8"(部分数据提供)
radiusstring定位半径(部分数据提供)
regionstring大区,如"华东"(部分数据提供)
network_typestringIP应用场景类型(部分数据提供)

错误码

状态码含义排查建议
200成功
400IP 格式错误检查 ip 参数是否合法
401Key 无效 / 不在白名单检查 X-API-Key 和 IP 白名单
429限流 / 配额耗尽降低频率或联系管理员调额
502上游无响应稍后重试

cURL 示例

curl -X GET "https://api.jingxialai.com/api/ip?ip=8.8.8.8" \ -H "X-API-Key: ip_live_xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json"

PHP 示例

<?php // 配置 $apiKey = "ip_live_xxxxxxxxxxxxxxxx"; // 替换为你的 API Key $ip = "8.8.8.8"; // 要查询的 IP 地址 $apiUrl = "https://api.jingxialai.com/api/ip?ip=" . $ip; // 初始化 cURL $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $apiUrl, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "X-API-Key: " . $apiKey, "Content-Type: application/json" ), )); // 发送请求 $response = curl_exec($curl); $err = curl_error($curl); $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); curl_close($curl); // 处理结果 if ($err) { echo "请求失败: " . $err; } else { $data = json_decode($response, true); if ($httpCode == 200) { // 遍历输出所有返回字段 foreach ($data as $key => $val) { echo $key . ": " . $val . "\n"; } } else { echo "查询失败(HTTP " . $httpCode . "): " . $data['message'] . "\n"; } }

Python 示例

import requests # 配置 api_key = "ip_live_xxxxxxxxxxxxxxxx" # 替换为你的 API Key ip = "8.8.8.8" # 要查询的 IP 地址 # 发送请求 url = "https://api.jingxialai.com/api/ip" headers = {"X-API-Key": api_key} params = {"ip": ip} response = requests.get(url, headers=headers, params=params, timeout=30) # 处理结果 if response.status_code == 200: data = response.json() # 遍历输出所有返回字段(空值字段不会返回) for key, val in data.items(): print(f"{key}: {val}") else: result = response.json() print(f"查询失败({response.status_code}): {result.get('message', '未知错误')}")

Node.js 示例

const https = require('https'); // 配置 const apiKey = 'ip_live_xxxxxxxxxxxxxxxx'; // 替换为你的 API Key const ip = '8.8.8.8'; // 要查询的 IP 地址 // 发送请求 const options = { hostname: 'api.jingxialai.com', path: `/api/ip?ip=${ip}`, method: 'GET', headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json' } }; const req = https.request(options, (res) => { let data = ''; res.on('data', (chunk) => data += chunk); res.on('end', () => { const result = JSON.parse(data); if (res.statusCode === 200) { // 遍历输出所有返回字段 for (const [key, val] of Object.entries(result)) { console.log(key + ': ' + val); } } else { console.log('查询失败:', result.message); } }); }); req.on('error', (e) => console.error('请求错误:', e.message)); req.setTimeout(30000, () => { req.destroy(); console.error('请求超时'); }); req.end();

快递查询 API

接口地址

GET https://api.jingxialai.com/api/express

请求参数

参数类型必须说明
numberstring运单编号
mobilestring收/寄件人 11 位手机号或后四位;顺丰、中通、跨越速运通常需要
expressCodestring快递公司编码,如圆通 YTO;不传则由系统自动识别
sortstringasc 正序或 desc 倒序,默认 asc

调用示例

curl -G "https://api.jingxialai.com/api/express" \ -H "X-API-Key: ip_live_xxxxxxxxxxxxxxxx" \ --data-urlencode "number=SF1234567890" \ --data-urlencode "mobile=1380" \ --data-urlencode "sort=desc"

响应说明

查询成功后返回快递公司、当前物流状态、最新物流信息和物流轨迹。具体字段以接口实际响应为准。

错误码

状态码含义排查建议
400请求参数错误检查运单编号、手机号、快递公司编码和排序参数
401API Key 无效或请求来源不在白名单检查 X-API-Key 和 IP 白名单
403快递查询服务未开通或账户已禁用联系管理员确认服务权限
405请求方式错误请使用 GET 请求
429请求过于频繁或可用次数不足降低请求频率或联系管理员调整套餐
502查询服务响应异常稍后重试
503查询服务暂时不可用稍后重试

抖音视频解析 API

接口地址

GET https://api.jingxialai.com/api/douyin/video

请求参数

参数类型必须说明
urlstring原始 HTTPS 抖音分享链接。请直接传入链接,不要进行 Base64 编码;请求库会正常完成 URL 编码

鉴权与额度

在请求头中携带 X-API-Key。抖音视频解析使用独立的 QPS、日量、月量和并发额度,不消耗 IP、手机号、热点或快递额度。

X-API-Key: ip_live_xxxxxxxxxxxxxxxx

成功响应(200)

{ "code": 200, "data": { "title": "视频标题", "cover": "https://example.com/video-cover.jpg", "url": "https://example.com/video.mp4", "width": 1080, "height": 1920 } }
下载地址有效期

data.url 为有时效性的下载地址,请在解析成功后及时使用,不要长期保存或缓存。

返回字段说明

字段类型说明
codeinteger业务状态码,成功时为 200
data.titlestring视频标题
data.coverstring视频封面地址
data.urlstring有时效性的视频下载地址
data.widthinteger视频宽度,单位为像素
data.heightinteger视频高度,单位为像素

错误码

状态码含义排查建议
400请求参数错误或不是有效的 HTTPS 抖音分享链接检查 url 参数并直接传入原始分享链接
401API Key 无效或请求来源不在白名单检查 X-API-Key 和 IP 白名单
403抖音视频解析服务未开通或账户已禁用联系管理员确认服务权限
405请求方法不支持请使用 GET 请求
429请求过于频繁或抖音解析额度不足降低请求频率或联系管理员调整套餐
502上游返回异常或视频解析失败确认分享链接有效后稍后重试
503解析服务未配置或暂时不可用稍后重试或联系管理员

cURL 示例

curl -G "https://api.jingxialai.com/api/douyin/video" \ -H "X-API-Key: ip_live_xxxxxxxxxxxxxxxx" \ --data-urlencode "url=https://v.douyin.com/xxxxxxxx/"

PHP 示例

<?php $apiKey = 'ip_live_xxxxxxxxxxxxxxxx'; $shareUrl = 'https://v.douyin.com/xxxxxxxx/'; $url = 'https://api.jingxialai.com/api/douyin/video?' . http_build_query([ 'url' => $shareUrl, ]); $curl = curl_init($url); curl_setopt_array($curl, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => ['X-API-Key: ' . $apiKey], ]); $response = curl_exec($curl); $status = curl_getinfo($curl, CURLINFO_HTTP_CODE); curl_close($curl); $result = json_decode($response, true); if ($status !== 200 || ($result['code'] ?? 0) !== 200) { throw new RuntimeException($result['message'] ?? $result['msg'] ?? '解析失败'); } print_r($result['data']);

Python 示例

import requests response = requests.get( 'https://api.jingxialai.com/api/douyin/video', headers={'X-API-Key': 'ip_live_xxxxxxxxxxxxxxxx'}, params={'url': 'https://v.douyin.com/xxxxxxxx/'}, timeout=30, ) response.raise_for_status() result = response.json() if int(result.get('code', 0)) != 200: raise RuntimeError(result.get('message') or result.get('msg') or '解析失败') print(result['data'])

手机号归属地 API

接口地址

GET https://api.jingxialai.com/api/phone

请求参数

参数类型必须说明
phonestring要查询的 11 位手机号码

鉴权方式

在请求头中携带 API Key(与 IP 查询完全共用同一套餐额度):

X-API-Key: ip_live_xxxxxxxxxxxxxxxx

成功响应(200)

{ "province": "广东省", "city": "深圳市", "zip_code": "518000", "area_code": "0755", "isp": "中国移动", "prefix": "1380013" }

返回字段说明

字段类型说明
provincestring手机号所属省份
citystring手机号所属城市
zip_codestring城市邮政编码
area_codestring长途电话区号
ispstring基础运营商或虚拟运营商名称
prefixstring匹配到的号段(前7位)

错误码

状态码含义排查建议
200成功
400手机号格式错误检查 phone 参数是否为 11 位数字
404号码未找到该号段可能不存在于离线库中
99.9%
服务可用性
<200ms
平均响应时间
IPv4+IPv6
双栈支持
241+
覆盖国家/地区

联系我们

有任何问题或合作需求,欢迎随时联系

✉️
邮箱
💬
QQ
19577566
📱
微信
19577566
二维码
扫码联系