当前 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=`.
直接访问基础地址,返回当前请求者 IP 的聚合结果。
Access the base URL directly to get the aggregated result for the current requester.
在基础地址后追加 IP 地址,返回该 IP 的聚合结果:
Append an IP address to get the aggregated result for that IP:
通过 `?db=` 可指定单一数据库。目前可用值来自返回字段 `available_db`。
Use `?db=` to choose a single upstream database. Valid values come from the `available_db` field.
| 字段名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. |
| Field | Type | Description |
|---|---|---|
| type | String | ipv4 / ipv6 |
| continent_code / continent_name | String | 洲信息 |
| country_code / country_name | String | 国家信息 |
| region_code / region_name / city / zip | String | 地区、城市、邮编 |
| latitude / longitude | Number | 经纬度 |
| location | Object | 旗帜、语言、区号、是否欧盟等 |
| time_zone | Object | 时区与当前时间信息 |
| currency | Object | 货币代码、名称、符号 |
| connection | Object | ASN、ISP、运营商与行业分类 |
| security | Object | 代理、爬虫、威胁等级等安全判定 |
{
"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
}输入 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.