记录几个免费的IP地址归属地查询的接口,其实这些IP归属地的查询,实现起来也不难,主要是要有一个IP库文件就能实现,以后有空自己实现一下。
1. ip-api.com ,可切换显示语言
http://ip-api.com/json/117.136.12.79?lang=zh-CN

{
    "status":"success",
    "country":"中華人民共和國",
    "countryCode":"CN",
    "region":"GD",
    "regionName":"广东省",
    "city":"广州",
    "zip":"",
    "lat":23.1291,
    "lon":113.2643,
    "timezone":"Asia/Shanghai",
    "isp":"China Mobile communications corporation",
    "org":"China Mobile",
    "as":"AS56040 China Mobile communications corporation",
    "query":"117.136.12.79"
}

 

2. 百度
http://opendata.baidu.com/api.php?query=117.136.12.79&co=&resource_id=6006&oe=utf8

{
    "status":"0",
    "t":"",
    "set_cache_time":"",
    "data":[
        {
            "ExtendedLocation":"",
            "OriginQuery":"117.136.12.79",
            "appinfo":"",
            "disp_type":0,
            "fetchkey":"117.136.12.79",
            "location":"广东省广州市 移动",
            "origip":"117.136.12.79",
            "origipquery":"117.136.12.79",
            "resourceid":"6006",
            "role_id":0,
            "shareImage":1,
            "showLikeShare":1,
            "showlamp":"1",
            "titlecont":"IP地址查询",
            "tplt":"ip"
        }
    ]
}

 

3. https://ip.useragentinfo.com/api
直接调用即可【没有频率限制】:https://ip.useragentinfo.com/json?ip=117.136.12.79

{
    "country":"中国",
    "short_name":"CN",
    "province":"广东省",
    "city":"",
    "area":"",
    "isp":"移动",
    "net":"手机网络",
    "ip":"117.136.12.79",
    "code":200,
    "desc":"success"
}

 

4. https://api.vore.top/api/IPdata
直接调用即可【没有频率限制,自动区分IPv4和IPv6】,请求示例:https://api.vore.top/api/IPdata?ip=117.136.12.79

{
    "code":200,
    "msg":"SUCCESS",
    "ipinfo":{
        "type":"ipv4",
        "text":"117.136.12.79",
        "cnip":true
    },
    "ipdata":{
        "info1":"广东省",
        "info2":"广州市",
        "info3":"",
        "isp":"基站"
    },
    "adcode":{
        "o":"广东省广州市 - 基站",
        "p":"广东",
        "c":"广州",
        "n":"广东-广州",
        "r":"广东-广州",
        "a":"440100",
        "i":true
    },
    "tips":"接口由VORE-API(https://api.vore.top/)免费提供",
    "time":1671071555
}

————————————————
版权声明:本文为CSDN博主「IT-Lenjor」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_29053561/article/details/111996442

posted on 2022-12-15 10:33  菠萝皮  阅读(1028)  评论(0编辑  收藏  举报