Skip to content

IP 地址归属地查询

1. 基本调用

TIP

服务器不会记录您的任何请求,也不会窃取您的任何隐私!

基本API地址

txt
https://zeapi.ink/v1/api/ipseek

通过以下 URL 或 POST 请求查询IP地址的归属地信息:

txt
https://zeapi.ink/v1/api/ipseek?ip=8.8.8.8

或通过 POST 请求发送 JSON 数据:

json
{
    "ip": "8.8.8.8"
}

Shell请求代码如下:

shell
curl -X POST https://zeapi.ink/v1/api/ipseek \
-H "Content-Type: application/json" \
-d '{"ip":"8.8.8.8"}'

2. 请求参数说明

参数类型必填默认值说明
ipstring客户端IP地址要查询的IP地址(IPv4或IPv6)

3. JSON 响应格式

json
{
    "status": "success",
    "ip": "8.8.8.8",
    "country": "美国",
    "region": "加利福尼亚",
    "city": "山景城",
    "isp": "Google LLC",
    "latitude": 37.751,
    "longitude": -97.822,
    "timezone": "America/Chicago"
}

错误响应示例(无效IP地址):

json
{
    "status": "error",
    "message": "Invalid IP address"
}

错误响应示例:

json
{
    "status": "error",
    "message": "Failed to fetch IP information"
}

4. 响应字段说明

字段类型说明
statusstring请求状态(success/error)
ipstring查询的IP地址
countrystring国家
regionstring地区
citystring城市
ispstring互联网服务提供商
latitudefloat纬度
longitudefloat经度
timezonestring时区
messagestring操作结果消息(仅在错误时返回)

基于 MIT 协议发布。