V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
alexmaster

推荐!免费的 IP 归属地查询接口 API - IP9.COM.CN

  •  1
     
  •   alexmaster · Oct 30, 2024 · 2609 views
    This topic created in 545 days ago, the information mentioned may be changed or developed.

    IP9.COM.CN 免费 IP 归属地查询 API 随便用、不限量

    同时国内国外线路,毫秒反应速度。

    接口地址 GET URL https://ip9.com.cn/get?ip=58.30.0.0

    返回结果示例 JSON { "ret": 200, // 200 为正常 "data": { "country": "中国", // 国家/地区 "country_code": "cn", // 国家/地区简码 "prov": "北京", // 省份 "city": "北京", // 城市 "city_code": "beijing", // 城市简码 "city_short_code": "bj", // 城市简码 "area": "东城", // 区县 "post_code": "100000", //邮政编码 "area_code": "010", // 电话区号 "isp": "中国移动", // 运营商 "lng": "116.41005", // 城市中心-经度 "lat": "39.93157", // 城市中心-纬度 "long_ip": 975044608, // longip "big_area": "华北" // 国内大区划分 }, "qt": 0.001 // 查询时间-秒 }

    对接文档: https://www.ip9.com.cn/?source=v2

    欢迎使用。

    14 replies    2026-04-02 21:58:54 +08:00
    kkk9
        1
    kkk9  
       Oct 30, 2024
    不会是纯真和 ip2location.lite 吧?
    alexmaster
        2
    alexmaster  
    OP
       Oct 31, 2024
    @kkk9 这个不是
    xhrzg2017
        3
    xhrzg2017  
       Oct 31, 2024
    {"ret":200,"data":{"country":"銝剖𤙴","country_code":"cn","prov":"撟蹂�","city":"撟踹�","city_code":"guangzhou","city_short_code":"gz","area":"頞羓�","post_code":"510000","area_code":"020","isp":"�䭾�摰賡�\/�娪��","lng":"113.26683","lat":"23.12897","long_ip":1959198922,"big_area":"�𤾸�"},"qt":0.001}
    编码问题
    alexmaster
        4
    alexmaster  
    OP
       Oct 31, 2024
    @xhrzg2017 浏览器调整到 utf8 编码
    jifengg
        5
    jifengg  
       Oct 31, 2024
    直接访问 https://ip9.com.cn/get 是本机出口 ip ,最好也能返回 ipv4 的格式,虽然有个 long_ip
    alexmaster
        6
    alexmaster  
    OP
       Oct 31, 2024
    @jifengg 记录
    alexmaster
        7
    alexmaster  
    OP
       Nov 2, 2024
    顶一波
    3573535
        8
    3573535  
       Nov 2, 2024 via iPhone
    ret":200,"data":{"country":"涓浗","country_code":"cn","prov":"浜戝崡","city":"鏄嗘槑","city_code":"kunming","city_short_code":"km","area":"鍛堣础","post_code":"650500","area_code":"0871","isp":"涓浗鐢典俊","lng":"102.801382","lat":"24.889275","long_ip":1034351057,"big_area":"瑗垮崡"},"qt":0.001}
    alexmaster
        9
    alexmaster  
    OP
       Nov 2, 2024
    @3573535 浏览器调整到 utf8 编码
    alexmaster
        10
    alexmaster  
    OP
       Nov 4, 2024
    在 header 中增加默认 utf8 ,个别浏览器编码显示错乱修正。
    echoyangjx
        11
    echoyangjx  
       Nov 8, 2025
    好用
    chaselen
        12
    chaselen  
       Nov 19, 2025
    能添加跨域或者 jsonp 支持吗?
    ab
        13
    ab  
       Mar 30
    楼主,海外 curl https://ip9.com.cn/get 随机返回 cf ip 地址了
    ab
        14
    ab  
       26 days ago
    亲?海外套了 CF 又不传递用户 IP ,这还怎么用呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5341 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:49 · PVG 11:49 · LAX 20:49 · JFK 23:49
    ♥ Do have faith in what you're doing.