返回首页

ip获取城市及经纬度

接口说明

ip获取城市及经纬度

接口基本信息

API地址

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

请求方式

GET

返回格式

JSON

接口状态

正常启用

参数说明

以下参数为接口所需调用信息

参数 是否必填 说明
ip参数

请求示例

HTTP请求

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

返回结果

HTTP 200 OK
{ "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

示例代码