0%

IP地址API查询接口

pexels-beyza-efe-10032075

博主提供

https://ip.tiiao.cn/ip/223.5.5.5

基于ip2region的数据库

1
2
3
4
5
6
7
8
9
10
11
{
"code": 200,
"data": {
"city": "杭州市",
"city_id": 1132,
"country": "中国",
"ip": "223.5.5.5",
"isp": "阿里云",
"province": "浙江省"
}
}

腾讯地图

https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=KUQBZ-FYDCU-YMVVN-2DDW5-7WDYE-5JBJR&ip=223.5.5.5&callback=jscode

带参考坐标

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
jscode&&jscode({
"status": 0,
"message": "query ok",
"result": {
"ip": "223.5.5.5",
"location": {
"lat": 30.26555,
"lng": 120.1536
},
"ad_info": {
"nation": "中国",
"province": "浙江省",
"city": "",
"district": "",
"adcode": 330000
}
}
})

IP-Api

http://ip-api.com/json/223.5.5.5?lang=zh-CN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"status": "success",
"country": "中国",
"countryCode": "CN",
"region": "ZJ",
"regionName": "浙江省",
"city": "杭州",
"zip": "",
"lat": 30.2994,
"lon": 120.1612,
"timezone": "Asia/Shanghai",
"isp": "Hangzhou Alibaba Advertising Co",
"org": "Aliyun Computing Co., LTD",
"as": "AS37963 Hangzhou Alibaba Advertising Co.,Ltd.",
"query": "223.5.5.5"
}

太平洋电脑网接口

https://whois.pconline.com.cn/ipJson.jsp?ip=223.5.5.5&json=true

1
2
3
4
5
6
7
8
9
10
11
12
{
"ip": "223.5.5.5",
"pro": "浙江省",
"proCode": "330000",
"city": "杭州市",
"cityCode": "330100",
"region": "",
"regionCode": "0",
"addr": "浙江省杭州市 电信",
"regionNames": "",
"err": ""
}

网易云

https://ip.ws.126.net/ipquery?ip=223.5.5.5

1
var lo="浙江省", lc="杭州市"; var localAddress={city:"杭州市", province:"浙江省"}

参考