接口描述:根据用户提供的IP地址,快速查询出该IP地址所在的地理信息和地理相关的信息,包括国家、省、市和运营商。
所属分类:生活服务
请求方式:GET
接口限速:200次/每小时
发布日期:2021-03-22 11:29:24
累计调用次数:10234
累计使用人数:50
请求参数:\
| 应用参数 | 类型 | 是否必填 | 默认值 | 示例值 | 说明 |
|---|---|---|---|---|---|
| ip | string | true | 202.96.128.166 | IP地址/域名 |
\
| 系统参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| ak | string | 是 | 开发者密钥 |
| appid | string | 是 | 接口id |
请求示例:api.liangmlk.cn?ak=xxxx&appid=15&ip=xxxx 点击复制 查看ak 立即购买
在线调试:立即调试
返回 [json] 格式的数据:
\
-
"success": "1",
-
"result": {
- "status": "OK",
- "ip": 202.96.128.166,
- "ip_str": 202.96.128.1,
- "ip_end": 202.96.128.254,
- "inet_ip": "3395322022",
- "inet_str": "3395321857",
- "inet_end": "3395322110",
- "areano": "020",
- "postno": "510000",
- "operators": "电信",
- "att": "中国,广东,广州",
- "detailed": "中国广东广州电信",
- "area_style_simcall": "中国,广东,广州",
- "area_style_areanm": "中华人民共和国,广东省,广州市"
}
}
\
<?php
header('content-type:text/html;charset=utf-8');
$ch = curl_init();
$url = 'http://api.liangmlk.cn?ak=xxxx&appid=15&ip=xxxx';
curl_setopt($ch,CURLOPT_URL,$url);
$res = curl_exec($ch);
curl_close($ch);
return json_decode($res,true);
?>
import requests
url = 'http://api.liangmlk.cn?ak=xxxx&appid=15&ip=xxxx'
print( requests.get(url).json() )
curl http://api.liangmlk.cn?ak=xxxx&appid=15&ip=xxxx