ip获取城市及经纬度


接口地址

https://api.cenguigui.cn/api/UserInfo/apilet.php

返回格式

JSON

请求方式:

GET

请求示例:

https://api.cenguigui.cn/api/UserInfo/apilet.php?ip=101.88.133.75

参数说明

名称 必填 类型 说明
ip参数

返回数据

{
    "code": "200",
    "msg": "请求成功",
    "data": [
        {
            "name": "嘉定区",
            "geo": {
                "latitude": 31.37482,
                "longitude": 121.26621
            },
            "address": {
                "addressSubregion": "上海市",
                "addressRegion": "上海市",
                "addressCountry": "中华人民共和国",
                "countryIso": "cn",
                "text": "上海市"
            }
        },
        {
            "name": "金山区",
            "geo": {
                "latitude": 30.74185,
                "longitude": 121.34242
            },
            "address": {
                "addressSubregion": "上海市",
                "addressRegion": "上海市",
                "addressCountry": "中华人民共和国",
                "countryIso": "cn",
                "text": "上海市"
            }
        },
        {
            "name": "奉贤区",
            "geo": {
                "latitude": 30.91803,
                "longitude": 121.4741
            },
            "address": {
                "addressSubregion": "上海市",
                "addressRegion": "上海市",
                "addressCountry": "中华人民共和国",
                "countryIso": "cn",
                "text": "上海市"
            }
        },
        {
            "name": "静安区",
            "geo": {
                "latitude": 31.22352,
                "longitude": 121.45591
            },
            "address": {
                "addressSubregion": "上海市",
                "addressRegion": "上海市",
                "addressCountry": "中华人民共和国",
                "countryIso": "cn",
                "text": "上海市"
            }
        },
        {
            "name": "青浦区",
            "geo": {
                "latitude": 31.14979,
                "longitude": 121.12426
            },
            "address": {
                "addressSubregion": "上海市",
                "addressRegion": "上海市",
                "addressCountry": "中华人民共和国",
                "countryIso": "cn",
                "text": "上海市"
            }
        }
    ]
}

调用实例

https://api.cenguigui.cn/api/UserInfo/apilet.php?ip=101.88.133.75

自动获取
https://api.cenguigui.cn/api/UserInfo/apilet.php

示例代码

						
本站已安全运行449天7时7分39秒

赞助一下