IP地址归属地查询接口

您所在的位置:网站首页 ip查询接口是什么意思 IP地址归属地查询接口

IP地址归属地查询接口

2022-10-25 06:09| 来源: 网络整理| 查看: 265



1、新浪IP API:

        新浪这个应该说是最不错的。并且返回的数据类型为可以自定义格式(默认为纯文本格式,根据format的参数定义,还可以返回JS、Json格式。下面列举的是JS的格式)。

        http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js

        返回值数据格式:var remote_ip_info = {"ret":1,"start":"59.37.164.179","end":"59.37.165.17","country":"\u4e2d\u56fd","province":"\u5e7f\u4e1c","city":"\u6c5f\u95e8","district":"","isp":"\u7535\u4fe1","type":"","desc":""};

        http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=61.135.169.105

        返回值数据格式:var remote_ip_info = {"ret":1,"start":"61.135.164.0","end":"61.135.191.255","country":"\u4e2d\u56fd","province":"\u5317\u4eac","city":"\u5317\u4eac","district":"","isp":"\u8054\u901a","type":"","desc":""}; 

2、淘宝IP API:

http://ip.taobao.com/service/getIpInfo.php?ip=127.0.0.1

直接在URL里传递IP数据,即可获取JSON格式的返回数据。

{“code”:0,”data”:{“country”:”IANA”,”country_id”:”9999″,”area”:”",”area_id”:”-1″,”region”:”",”region_id”:”-1″,”city”:”",”city_id”:”-1″,”county”:”",”county_id”:”-1″,”isp”:”",”isp_id”:”-1″,”ip”:”127.0.0.1″}}

其中code的值为0代表IP地址解析成功,1代表失败。

3、网易 API:

这里介绍网易有道在上面发布的三款免费API,毕竟是大公司,速度有保证,所以拿来与大家分享一下。当然其他的API也非常棒。 这三款接口都是以URL GET方式提交参数,以XML的形式返回查询结果 查询IP地址: http://www.youdao.com/smartresult-xml/search.s?type=ip&q=IP地址 举例:http://www.youdao.com/smartresult-xml/search.s?type=ip&q=123.233.157.9 返回: 123.233.157.9 山东省济南市 网通 查询手机号码归属地: http://www.yodao.com/smartresult-xml/search.s?type=mobile&q=手机号 举例:http://www.yodao.com/smartresult-xml/search.s?type=mobile&q=13892101111 返回: 13892101111 陕西 延安 查询身份证信息: http://www.yodao.com/smartresult-xml/search.s?type=id&q=身份证号码 举例:http://www.youdao.com/smartresult-xml/search.s?type=id&q=370782196402121133 返回: 370782196402121133 山东省潍坊市诸城市 19640212 m



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3