| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /ip | 本文档页 |
| GET | /ip?json | JSON 返回(查访客 IP) |
| GET | /ip?json&ip= | JSON 返回(指定 IP) |
| GET | /ip?text | 文本返回(查访客 IP) |
| GET | /ip?text&ip= | 文本返回(指定 IP) |
| GET | /api/ip?format=json|text&ip= | 兼容别名;默认 JSON |
{
"code": 0,
"msg": "",
"data": {
"ip": "1.1.1.1",
"country": "Australia",
"region": "Queensland",
"city": "Brisbane",
"isp": "0",
"country_code": "AU"
}
}
首行为管道分隔,便于脚本;随后为可读键值行。
1.1.1.1|Australia|Queensland|Brisbane|0|AU ip: 1.1.1.1 country: Australia region: Queensland city: Brisbane isp: 0 country_code: AU