码迷,mamicode.com
首页 > Windows程序 > 详细

查询IP地址的免费API

时间:2020-03-03 11:02:05      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:region   tom   ip查询   query   mat   end   oba   for   国际   

1、百度

复制代码
1、http://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?query=192.168.0.0&co=&resource_id=6006&oe=utf8
例:http://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?query=192.168.0.0&co=&resource_id=6006&oe=utf8
2、http://opendata.baidu.com/api.php?query=[ip地址字串]&co=&resource_id=6006&oe=utf8
例:http://opendata.baidu.com/api.php?query=192.168.0.0&co=&resource_id=6006&oe=utf8
复制代码
2、阿里巴巴

复制代码
http://ip.taobao.com/service/getIpInfo.php?ip=[ip地址字串]
例:http://ip.taobao.com/service/getIpInfo.php?ip=192.168.0.0
返回值:{"code":0,"data":{"ip":"192.168.0.0","country":"XX","area":"","region":"XX","city":"内网IP","county":"内网IP","isp":"内网IP","country_id":"xx","area_id":"","region_id":"xx","city_id":"local","county_id":"local","isp_id":"local"}
复制代码
3、国际化显示

复制代码
http://ip-api.com/json/[ip地址字串]?lang=zh-CN
例:http://ip-api.com/json/114.114.114.114?lang=zh-CN
返回值:{"as":"AS174 Cogent Communications","city":"北京","country":"中国","countryCode":"CN","isp":"China Unicom Shandong Province network","lat":39.9042,"lon":116.407,"org":"NanJing XinFeng Information Technologies, Inc.","query":"114.114.114.114","region":"BJ","regionName":"北京","status":"success","timezone":"Asia/Shanghai","zip":""}
复制代码
4、126

http://ip.ws.126.net/ipquery?ip=[ip地址字串]
例:http://ip.ws.126.net/ipquery?ip=192.168.0.0
返回值:var lo="广东省", lc="广州市"; var localAddress={city:"广州市", province:"广东省"}
5、太平洋

http://whois.pconline.com.cn/jsFunction.jsp?callback=jsShow&ip=[ip地址字串]
例:http://whois.pconline.com.cn/jsFunction.jsp?callback=jsShow&ip=192.168.0.0
返回值:if (window.jsShow){jsShow(‘ 局域网‘,‘‘);
6、360

http://ip.360.cn/IPQuery/ipquery?ip=[ip地址字串]
例:http://ip.360.cn/IPQuery/ipquery?ip=192.168.0.0
返回值:{"errno":0,"errmsg":"","data":"\u5c40\u57df\u7f51"

附录:还可以通过抓取源码从几个网站获取IP信息

http://www.hao7188.com/ 此网站获取到的数据比较详细,推荐。
http://www.ip138.com/ 老牌的IP查询网站
http://www.ip.cn/ 比较知名的IP查询网站
http://myip.com.tw/ 来自台湾的IP查询网站
http://www.net.cn/static/customercare/yourip.asp 万网获取本地公网IP地址

Z-Blog:http://www.361wx.com

查询IP地址的免费API

标签:region   tom   ip查询   query   mat   end   oba   for   国际   

原文地址:https://www.cnblogs.com/csnd/p/12400782.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!