IP信息查询API

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

API 简介

API Overview

当前 IP 查询接口已支持多数据库聚合,默认返回 `available_db`、`ipapi`、`ipinfo`、`bilibili` 等数据块,并可通过 `?db=` 指定单一数据源。

The current IP API now supports multi-database aggregation. By default it may return `available_db`, `ipapi`, `ipinfo`, and `bilibili`, and you can force a specific source via `?db=`.

基础地址

Base URL

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

查询方式

Query Modes

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

1. Query Current Visitor IP Information

直接访问基础地址,返回当前请求者 IP 的聚合结果。

Access the base URL directly to get the aggregated result for the current requester.

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

2. 查询指定IP地址信息

2. Query a Specific IP

在基础地址后追加 IP 地址,返回该 IP 的聚合结果:

Append an IP address to get the aggregated result for that IP:

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

3. 使用 `db` 参数指定数据库

3. Choose a Database via `db`

通过 `?db=` 可指定单一数据库。目前可用值来自返回字段 `available_db`。

Use `?db=` to choose a single upstream database. Valid values come from the `available_db` field.

https://sni-api.furry.ist/ipapi/1.1.1.1?db=ipapi
https://sni-api.furry.ist/ipapi/1.1.1.1?db=ipinfo
https://sni-api.furry.ist/ipapi/1.1.1.1?db=bilibili

4. 当前说明

4. Current Notes

响应数据

Response Data

字段名Field 类型Type 说明Description
available_db Array<string> 当前可用数据库列表,例如 `ipapi`、`ipinfo`、`bilibili`。List of currently available databases, such as `ipapi`, `ipinfo`, and `bilibili`.
ipapi Object `ipapi` 数据库结果,包含位置、时区、货币、连接与安全信息。Result from the `ipapi` database, including location, timezone, currency, connection, and security data.
ipinfo Object `ipinfo` 数据库结果,包含 ASN、公司、隐私、滥用信息等。Result from the `ipinfo` database, including ASN, company, privacy, and abuse data.
bilibili Object `bilibili` 数据库结果;若上游异常,可能返回错误对象。Result from the `bilibili` database; may return an error object if the upstream fails.
code Number 接口响应状态码。API response status code.

`ipapi` 子字段摘要

`ipapi` Nested Fields Summary

Field Type Description
typeStringipv4 / ipv6
continent_code / continent_nameString洲信息
country_code / country_nameString国家信息
region_code / region_name / city / zipString地区、城市、邮编
latitude / longitudeNumber经纬度
locationObject旗帜、语言、区号、是否欧盟等
time_zoneObject时区与当前时间信息
currencyObject货币代码、名称、符号
connectionObjectASN、ISP、运营商与行业分类
securityObject代理、爬虫、威胁等级等安全判定

使用示例

Usage Examples

1. 查询当前IP(聚合模式)

1. Query Current IP (Aggregate)

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

2. 查询特定IP并指定 `ipapi` 数据库

2. Query Specific IP with `ipapi`

https://sni-api.furry.ist/ipapi/1.1.1.1?db=ipapi

3. 查询特定IP并指定 `ipinfo` 数据库

3. Query Specific IP with `ipinfo`

https://sni-api.furry.ist/ipapi/1.1.1.1?db=ipinfo

4. 查询 `bilibili` 数据库

4. Query `bilibili`

https://sni-api.furry.ist/ipapi/1.1.1.1?db=bilibili

5. 最新返回示例

5. Latest Response Example

https://sni-api.furry.ist/ipapi/1.1.1.1
{
  "available_db": [
    "ipapi",
    "ipinfo",
    "bilibili"
  ],
  "ipapi": {
    "ip": "1.1.1.1",
    "hostname": "one.one.one.one",
    "type": "ipv4",
    "continent_code": "NA",
    "continent_name": "North America",
    "country_code": "US",
    "country_name": "United States",
    "region_code": "CO",
    "region_name": "Colorado",
    "city": "Englewood",
    "zip": "80113",
    "latitude": 39.6413688659668,
    "longitude": -104.95458984375,
    "msa": "19740",
    "dma": "751",
    "radius": "0",
    "ip_routing_type": "fixed",
    "connection_type": "tx",
    "location": {
      "geoname_id": 5421250,
      "capital": "Washington D.C.",
      "languages": [
        {
          "code": "en",
          "name": "English",
          "native": "English"
        }
      ],
      "country_flag": "https://assets.ipstack.com/flags/us.svg",
      "country_flag_emoji": "🇺🇸",
      "country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
      "calling_code": "1",
      "is_eu": false
    },
    "time_zone": {
      "id": "America/Denver",
      "current_time": "2026-03-13T09:16:59-06:00",
      "gmt_offset": -21600,
      "code": "MDT",
      "is_daylight_saving": true
    },
    "currency": {
      "code": "USD",
      "name": "US Dollar",
      "plural": "US dollars",
      "symbol": "$",
      "symbol_native": "$"
    },
    "connection": {
      "asn": 13335,
      "isp": "Cloudflare",
      "sld": null,
      "tld": null,
      "carrier": "cloudflare",
      "home": false,
      "organization_type": "Internet Hosting Services",
      "isic_code": "J6311",
      "naics_code": "518210"
    },
    "security": {
      "is_proxy": false,
      "proxy_type": null,
      "is_crawler": false,
      "crawler_name": null,
      "crawler_type": null,
      "is_tor": false,
      "threat_level": "high",
      "threat_types": [
        "attack_source",
        "attack_source_ssh"
      ],
      "proxy_last_detected": null,
      "proxy_level": null,
      "vpn_service": null,
      "anonymizer_status": null,
      "hosting_facility": false
    }
  },
  "ipinfo": {
    "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": 47640,
      "domains": [
        "example.com"
      ]
    }
  },
  "bilibili": {
    "error": "Upstream fetch failed"
  },
  "code": 200
}

6. 在 JavaScript 中使用 `db` 参数

6. Use `db` in JavaScript

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

实时查询演示 Live Query Demo

输入 IP 并选择数据库;留空 IP 可查询当前访客。`bilibili` 建议单独用 `?db=bilibili`。

Enter an IP and choose a database; leave the IP blank to query the current visitor. Use `?db=bilibili` for bilibili.