接口地址: http://api.sefapi.com/api/iplocation/get
返回格式: JSON、TXT
请求方式: GET
测试接口: http://api.sefapi.com/api/iplocation/get
提示:登录获取分配api节点,api调用时请启用gzip压缩
请求参数说明:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
ip | 否 | string | 指定查询的IP地址。默认不填,查询当前IP归属地。 |
返回参数说明:
名称 | 类型 | 说明 |
---|---|---|
success | boolean | 返回是否成功 成功true 或 失败false |
count | int | 数据记录条数。 |
msg | string | 错误或警告信息 |
results | array | 数据记录结果数组 |
remote_addr | string | http协议中remote_addr的IP值 |
location | string | IP归属地 |
http_via | string | http协议中http_via的IP值 |
http_x_forward_for | string | http协议中http_x_forward_for的IP值 |
http_client_ip | string | http协议中http_client_ip的IP值 |
http_proxy | string | http协议中http_proxy的IP值 |
http_x_real_ip | string | http协议中http_x_real_ip的IP值 |
返回示例:
{ success: true, count: 1, msg: "", results: [{ remote_addr: "114.114.114.114", location: "江苏省南京市 南京信风网络科技有限公司GreatbitDNS服务器" }] }