IP信息查询API

回到API列表 Back to API List 返回首页 Home

API 简介

API Overview

IP信息查询API提供快速、准确的IP地址信息查询服务。可查询当前访问者的IP信息,也可查询任意指定IP地址的详细信息,包括地理位置、ISP、城市、国家等。无需认证,直接调用即可。

The IP Information Query API provides fast and accurate IP address information lookup service. You can query the current visitor's IP information or any specified IP address for detailed information including geolocation, ISP, city, country, etc. No authentication required, just call directly.

基础地址

Base URL

https://sni-api.furry.ist/ipapi

请求方式

Request Methods

1. 查询当前访问者IP信息

1. Query Current Visitor IP Information

直接访问基础地址,返回当前请求者的IP信息。

Access the base URL directly to get the current requester's IP information:

https://sni-api.furry.ist/ipapi

HTTP方法: GET

HTTP Method: GET

2. 查询指定IP地址信息

2. Query Specific IP Address Information

在基础地址后追加IP地址,返回该IP的详细信息:

Append an IP address to the base URL to get detailed information about that IP:

https://sni-api.furry.ist/ipapi/{ip}

示例:

Example:

https://sni-api.furry.ist/ipapi/1.1.1.1
https://sni-api.furry.ist/ipapi/8.8.8.8

响应数据

Response Data

字段名Field 类型Type 说明Description
ip 字符串String IP地址IP address
hostname 字符串String 主机名Hostname
anycast 布尔值Boolean 是否为anycast IPWhether it's an anycast IP
city 字符串String 城市名称City name
region 字符串String 地区/州Region/State
country 字符串String 国家代码Country code
loc 字符串String 地理位置坐标(纬度,经度)Geographic coordinates (latitude,longitude)
postal 字符串String 邮政编码Postal code
timezone 字符串String 时区Timezone
asn 对象Object 自治系统号信息(包含asn、name、domain、route、type)ASN information (includes asn, name, domain, route, type)
company 对象Object 公司信息(包含name、domain、type)Company information (includes name, domain, type)
privacy 对象Object 隐私信息(包含vpn、proxy、tor、relay、hosting、service)Privacy information (includes vpn, proxy, tor, relay, hosting, service)
abuse 对象Object 滥用举报信息(包含address、country、email、name、network、phone)Abuse contact information (includes address, country, email, name, network, phone)
domains 对象Object 域名信息(包含ip、total、domains数组)Domain information (includes ip, total, domains array)

使用示例

Usage Examples

1. 查询当前IP信息

1. Query Current IP Information

curl https://sni-api.furry.ist/ipapi

或在浏览器中直接打开。

Or open directly in your browser:

https://sni-api.furry.ist/ipapi

2. 查询特定IP(1.1.1.1 - Cloudflare DNS)

2. Query Specific IP (1.1.1.1 - Cloudflare DNS)

https://sni-api.furry.ist/ipapi/1.1.1.1

响应示例:

Response example:

{
  "ipapi": {
    "ip": "1.1.1.1",
    "hostname": "one.one.one.one",
    "anycast": true,
    "city": "Brisbane",
    "region": "Queensland",
    "country": "AU",
    "loc": "-27.4679,153.0281",
    "postal": "9010",
    "timezone": "Australia/Brisbane",
    "asn": {
      "asn": "AS13335",
      "name": "Cloudflare, Inc.",
      "domain": "cloudflare.com",
      "route": "1.1.1.0/24",
      "type": "hosting"
    },
    "company": {
      "name": "APNIC and Cloudflare DNS Resolver project",
      "domain": "cloudflare.com",
      "type": "hosting"
    },
    "privacy": {
      "vpn": true,
      "proxy": false,
      "tor": false,
      "relay": false,
      "hosting": true,
      "service": "AngelVPN"
    },
    "abuse": {
      "address": "PO Box 3646, South Brisbane, QLD 4101, Australia",
      "country": "AU",
      "email": "helpdesk@apnic.net",
      "name": "ABUSE APNICRANDNETAU",
      "network": "1.1.1.0/24",
      "phone": "+000000000"
    },
    "domains": {
      "ip": "1.1.1.1",
      "total": 30006,
      "domains": [
        "furry.ist"
      ]
    }
  },
  "code": 200
}

3. 查询Google DNS(8.8.8.8)

3. Query Google DNS (8.8.8.8)

https://sni-api.furry.ist/ipapi/8.8.8.8

4. 在JavaScript中使用

4. Usage in JavaScript

fetch('https://sni-api.furry.ist/ipapi/1.1.1.1') .then(response => response.json()) .then(data => console.log(data))

实时查询演示 Live Query Demo

输入IP地址进行查询(不输入则查询你的IP):

Enter an IP address to query (leave blank to query your IP):