API · v1

一个 JSON API。
本站每个页面,以及更多。

当下免费额度宽裕;付费计划解锁历史深度、转让事件、BGP 数据流、地理位置置信度与批量导出。提供 OpenAPI 3.1、JSON-LD 与 llms.txt。

// base url https://api.asn.zone/v1OpenAPI 3.1 · JSON-LD · llms.txt

快速开始

免费层无需鉴权
# High-level totals
curl https://api.asn.zone/v1/overview | jq
 
# Drill into Google
curl https://api.asn.zone/v1/asn/15169 | jq
 
# Per-IP geolocation with full delegation history
curl https://api.asn.zone/v1/ip/8.8.8.8/geo | jq
 
# Recent transfers, last 30 days, country US
curl "https://api.asn.zone/v1/transfers?to_country=US&days=30" | jq

免费层

每分钟 60 次请求,每天 1k 次请求。无需 API 密钥。使用密钥鉴权可获得更高限额并访问 developer+ 端点。

数据新鲜度

RIR 委派统计与转让日志每日同步;CAIDA + IPXO Geolocation 每月同步。每个响应都带有 Last-Modified 标头。

端点

覆盖每个公共界面的详情与列表端点。层级表示可访问的最低套餐。完整参考见 OpenAPI 文档。

方法路径功能层级
GET/v1/overviewHigh-level dataset totalsfree
GET/v1/asnsList ASNs, filterable by country and registryfree
GET/v1/asn/{id}Single ASN with org reference, country, peer/presence summariesfree
GET/v1/asn/{id}/peersProviders, peers, customers (CAIDA AS-Rank)free
GET/v1/asn/{id}/facilitiesPhysical facility presence (PeeringDB)free
GET/v1/asn/{id}/ixInternet Exchange membershipsfree
GET/v1/asn/{id}/prefixesAnnounced BGP prefixes for the ASN (CAIDA pfx2as)developer
GET/v1/org/{registry}/{id}Organization with name, address, contacts, holdingsfree
GET/v1/org/{registry}/{id}/timelineCombined allocation + transfer timelinedeveloper
GET/v1/countriesList countries with stats and 30-day deltasfree
GET/v1/country/{cc}Country detail with top organizations and recent ASNsfree
GET/v1/continentsContinent-level allocation totalsfree
GET/v1/transfersRecent transfer events across the RIR transfer logsfree
GET/v1/ip/{address}/ownerIP → registered holder, ASN, prefixfree
GET/v1/ip/{address}/geoMulti-source IP geolocation with cross-source consensusdeveloper
GET/v1/bgp/announcementsRecent BGP announcements (RouteViews / RIPE RIS)developer
GET/v1/bgp/byoipBring-Your-Own-IP prefixesdeveloper
GET/v1/searchSearch ASNs, organizations, prefixes, and countriesfree
GET/v1/health/sourcesPer-source freshness with 4-state status ladder (ok / degraded / stale / error)free
GET/v1/meCaller customer profile + per-day quota + remaining requestsfree
GET/v1/auditConsumer-facing audit feed (org renames, tag changes, transfers added)free

批量下载

Every dataset as NDJSON. Snake_case keys, contract-locked under v1.1. Pass ?since=<ISO> for incremental fetch; HEAD + If-Modified-Since short-circuits to 304 on no-change days. Errors return application/problem+json (RFC 7807).

  • /v1/datasets/asns.jsonl
  • /v1/datasets/organizations.jsonl
  • /v1/datasets/ipv4-blocks.jsonl
  • /v1/datasets/ipv6-blocks.jsonl
  • /v1/datasets/transfers.jsonl
  • /v1/datasets/asn-prefixes.jsonl
  • /v1/datasets/bgp-byoip.jsonl
  • /v1/datasets/manifest

TypeScript SDK

@asn-zone/sdk ships AsyncIterable streaming helpers over every bulk dataset endpoint plus the audit feed. Codegen from OpenAPI 3 Zod schemas; RFC 7807 errors parsed into a typed exception class; 429 retry-once respecting Retry-After.

// Stream the latest day of IPv4 allocations
for await (const row of streamIpv4Blocks({
  bearer, since: yesterday
})) { console.log(row.org_id) }

鉴权

免费层无需密钥 - 开放、按 IP 限速。如需更高限额并访问 developer+ 端点,请注册密钥并以 Bearer 标头传递。

curl https://api.asn.zone/v1/asn/15169 \
  -H 'Authorization: Bearer azk_live_...'

数据来源

每个数据点都可追溯。完整来源列表及刷新频率见关于页面。

  • RIR delegated statsARIN · RIPE · APNIC · AFRINIC · LACNIC每日
  • RIR transfer logsARIN · RIPE · APNIC每日
  • CAIDA AS-Rank + AS-Organizationsasrank.caida.org每月
  • PeeringDBfac · ix · netixlan每日
  • IPXO GeolocationIPv4 / IPv6 → city每月
同样为 AI 智能体而建
本站提供 llms.txt、每个页面的 JSON-LD,以及一个已编入索引的 robots.txt,明确欢迎主流 AI 与搜索爬虫。构建无需抓取即可读取公共网络记录的智能体。