API Icon

Ip归属地查询 正常

查询ip地理位置及其归属地,精确到市!

GET/POST JSON/TEXT 调用: 1,801 测速中...

基本信息

接口地址
请求方式 GET/POST
返回格式 JSON/TEXT
调用权限 公开/免费

请求参数说明

参数名 必填 类型 说明 示例值
ip 必填 string 需要填的ip 184.29.40.0
type 可选 string 需要填的返回类型【text/json】 json

调用示例

PHP cURL

$url = 'https://api.bugpk.com/api/ipquery';
$params = [
    'key' => 'value' // 请替换实际参数
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
                                    

返回结果示例

JSON Response
{
    "code": 0,
    "msg": "",
    "message": "",
    "data": {
        "addr": "184.29.40.0",
        "country": "中国",
        "province": "台湾",
        "city": "台北市",
        "isp": "akamai.com",
        "latitude": 25.032964,
        "longitude": 121.565427
    }
}

返回参数说明

参数名 类型 说明 示例
data[country] string 当前查询ip
data[country] string 当前查询国家
data[province] string 省/直辖市行政区代码
data[city] string 城市
data[isp] string 归属地

调试参数

响应结果

--
点击左侧"发送请求"查看结果...