一、IP-API接口
http://ip-api.com/json/
返回接口:
{
"status": "success",
"country": "China",
"countryCode": "CN",
"region": "SC",
"regionName": "Sichuan",
"city": "Chengdu",
"zip": "",
"lat": 30.1234,
"lon": 104.1234,
"timezone": "Asia/Shanghai",
"isp": "Chinanet",
"org": "Chinanet SC",
"as": "AS4134 CHINANET-BACKBONE",
"query": "xxx.xxx.xxx.xxx"
}
二、搜狐IP接口
http://pv.sohu.com/cityjson
返回接口:
var returnCitySN = {
"cip": "xxx.xxx.xxx.xxx",
"cid": "510000",
"cname": "四川省"
};
三、太平洋IP地址查询
http://whois.pconline.com.cn/ipJson.jsp?ip=xxx.xxx.xxx.xxx&json=true
返回接口:
{
"ip": "xxx.xxx.xxx.xxx",
"pro": "四川省",
"proCode": "510000",
"city": "成都市",
"cityCode": "510100",
"region": "",
"regionCode": "0",
"addr": "四川省成都市 电信",
"regionNames": "",
"err": ""
}
网友评论