下面我整理了几个目前免费可用的IP归属地接口:
1、淘宝:http://ip.taobao.com/service/getIpInfo.php?ip=
示例:http://ip.taobao.com/service/getIpInfo2.php?ip=120.36.254.31
{"code":0,"data":{"ip":"120.36.254.31","country":"中国","area":"","region":"福建","city":"厦门","county":"XX","isp":"电信","country_id":"CN","area_id":"","region_id":"350000","city_id":"350200","county_id":"xx","isp_id":"100017"}}
2、pconline:http://whois.pconline.com.cn/ip.jsp?ip=(支持多种格式返回,请参照:http://whois.pconline.com.cn)
示例:http://whois.pconline.com.cn/ip.jsp?ip=120.41.245.48
福建省厦门市 电信
3、126:http://ip.ws.126.net/ipquery?ip=
示例:http://ip.ws.126.