国内 IPv4 高精度定位接口

服务运维   2025-02-21 17:23   152   0  

IPv4高精度定位接口


接口:https://ipapi.ipip.net/location/geo
请求:HTTP GET
参数:ipIP地址(不传值则为发起请求IP地址)
授权:token付费后获取
示例:
curl "https://ipapi.ipip.net/location/geo?ip=123.121.9.220" -H "Token: 1234567890"
响应:
{
    code: 0,
    data: {
        ip:"123.121.9.220",
        longitude: 116.51124,    // IP定位经度WGS84
        latitude: 39.917572,     // IP定位纬度WGS84
        radius: 50,             // IP覆盖半径
        gps_district: { // 高精度数据到区县等
            country_code: "CN",
            country: "中国",
            province: "北京",
            city: "北京",
            district: "朝阳区",
            china_code: "110105"
        },
        gps_aoi: [ // 高精度数据到商圈小区学校等
            {
                country_code: "CN",
                country: "中国",
                province: "北京",
                city: "北京",
                district: "朝阳区",
                china_code: "110105",
                aoi_type: "住宅小区",
                aoi_name: "朝阳园"
            },
            {
                country_code: "CN",
                country: "中国",
                province: "北京",
                city: "北京",
                district: "朝阳区",
                china_code: "110105",
                aoi_type: "商圈",
                aoi_name: "青年路商圈"
            }
        ]
        location:{ // 没有高精度数据时候的返回结果
            country: "中国",
            province: "北京",
            city: "北京"
        }
    }
}


字段名字段类型字段描述
longitudefloat经度
latitudefloat纬度
radiusint覆盖半径
credibilityint可信度 0-100
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: "北京" // 城市