| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| ip | string | 是 | IP地址(只支持IPV4) |
| 参数名称 | 类型 | 说明 |
|---|---|---|
| ip | string | IP地址 |
| continent | string | 所属七大洲 |
| country | string | 国家 |
| isp | string | 运营商 |
| country_code | string | 国家英文简写(chinaz) |
| province | string | 省份 |
| city | string | 城市 |
| city_code | string | 城市代码 |
| district | string | 区县 |
| area_code | string | 行政区码 |
| street | string | 街道 |
| elevation | string | 海拔 |
| latitude | string | 纬度 |
| longitude | string | 经度 |
| time_zone | string | 时区(chinaz) |
| weather_station | string | 天气站编号 |
| zip_code | string | 邮政编码(chinaz) |
| lat | string | 纬度 |
| lng | string | 精度 |
| radius | string | 定位半径 |
| street_number | string | 街道门牌 |
$url = "https://api.jisuapi.com/ip2/query?appkey=yourappkey&ip=122.224.186.100";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);
$data = json_decode($result, true);
print_r($data);
{
"status": 0,
"msg": "ok",
"result": {
"ip": "115.192.220.164",
"continent": "亚洲",
"country": "中国",
"isp": "电信",
"country_code": "CN",
"province": "浙江",
"city": "杭州",
"city_code": "0571",
"district": "拱墅",
"area_code": "330105",
"street": "祥符街道",
"elevation": "17",
"latitude": "30.327178",
"longitude": "120.097547",
"time_zone": "Asia/Shanghai",
"weather_station": "CHXX0044",
"zip_code": "310000",
"area": [
{
"province": "浙江",
"city": "杭州",
"lat": "30.327178",
"lng": "120.097547",
"radius": "5.27",
"district": "拱墅",
"street": "祥符街道",
"street_number": "祥符街道",
"zip_code": "310000"
},
{
"province": "浙江",
"city": "杭州",
"lat": "30.334848",
"lng": "120.043363",
"radius": "5.69",
"district": "西湖",
"street": "祥余线",
"street_number": "祥余线",
"zip_code": "310000"
}
]
}
}
| 代号 | 说明 |
|---|---|
| 201 | IP地址不能为空 |
| 202 | IP地址有误 |
| 210 | 没有信息 |
| 代号 | 说明 |
|---|---|
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁止 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
| 计次套餐 | 套餐规格 | 价格 | ||
|---|---|---|---|---|
| 免费套餐 | 10次 | 0 元 | ≈0元/次 | |
| Level1 | 1000次 | 20.00 元 | ≈0.02元/次 | |
| Level2 | 10000次 | 100.00 元 | ≈0.01元/次 | |
| Level3 | 50000次 | 400.00 元 | ≈0.008元/次 | |
| Level4 | 100000次 | 600.00 元 | ≈0.006元/次 | |


© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875