国内 IPv6 高精度定位接口

服务运维   2025-02-21 17:25   149   0  

IP高精度定位接口(支持IPv6)


接口:https://ipapi.ipip.net/location/v6geo
请求:HTTP GET
参数:ipIP地址(不传值则为发起请求IP地址)
授权:token付费后获取
示例:
curl "https://ipapi.ipip.net/location/v6geo?ip=2001:250:200:7::" -H "Token: 1234567890"
响应:
{
    "ret": "ok",
    "data": {
        "ip": "2001:250:200:7::",
        "longitude": "116.325877", // IP定位经度WGS84
        "latitude": "39.995221", // IP定位纬度WGS84
        "radius": "313", // IP覆盖半径
        "location": { // 没有高精度数据时候的返回结果
            "country": "中国",
            "province": "北京",
            "city": "北京"
        },
        "gps_district": { // 高精度数据到区县等
            "country_code": "CN",
            "country": "中国",
            "province": "北京",
            "city": "北京",
            "district": "海淀区",
            "china_code": "110108"
        },
        "gps_aoi": [ // 高精度数据到商圈小区学校等
            {
                "country_code": "CN",
                "country": "中国",
                "province": "北京",
                "city": "北京",
                "district": "海淀区",
                "china_code": "110108",
                "aoi_type": "高校学院",
                "aoi_name": "清华大学"
            },
            {
                "country_code": "CN",
                "country": "中国",
                "province": "北京",
                "city": "北京",
                "district": "海淀区",
                "china_code": "110108",
                "aoi_type": "产业园区",
                "aoi_name": "清华科技园"
            }
        ]
    }
}


字段名字段类型字段描述
longitudefloat经度
latitudefloat纬度
radiusint覆盖半径
gps_districtobject
country_code: "CN", // 国家代码
country: "中国", // 国家
province: "北京", // 省份
city: "北京", // 城市
district: "朝阳区", // 区县
china_code: "110105" // 行政区划代码
gps_aoiarray
country_code: "CN", // 国家代码
country: "中国", // 国家
province: "北京", // 省份
city: "北京", // 城市
district: "朝阳区", // 区县
china_code: "110105" // 行政区划代码
aoi_type: "住宅小区", // AOI类型
aoi_name: "朝阳园" // AOI名称
locationobject
country: "中国", // 国家
province: "北京", // 省份
city: "北京" // 城市