API · v1
一个 JSON API。
本站每个页面,以及更多。
当下免费额度宽裕;付费计划解锁历史深度、转让事件、BGP 数据流、地理位置置信度与批量导出。提供 OpenAPI 3.1、JSON-LD 与 llms.txt。
快速开始
免费层无需鉴权# High-level totalscurl https://api.asn.zone/v1/overview | jq# Drill into Googlecurl https://api.asn.zone/v1/asn/15169 | jq# Per-IP geolocation with full delegation historycurl https://api.asn.zone/v1/ip/8.8.8.8/geo | jq# Recent transfers, last 30 days, country UScurl "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/overview | High-level dataset totals | free |
| GET | /v1/asns | List ASNs, filterable by country and registry | free |
| GET | /v1/asn/{id} | Single ASN with org reference, country, peer/presence summaries | free |
| GET | /v1/asn/{id}/peers | Providers, peers, customers (CAIDA AS-Rank) | free |
| GET | /v1/asn/{id}/facilities | Physical facility presence (PeeringDB) | free |
| GET | /v1/asn/{id}/ix | Internet Exchange memberships | free |
| GET | /v1/asn/{id}/prefixes | Announced BGP prefixes for the ASN (CAIDA pfx2as) | developer |
| GET | /v1/org/{registry}/{id} | Organization with name, address, contacts, holdings | free |
| GET | /v1/org/{registry}/{id}/timeline | Combined allocation + transfer timeline | developer |
| GET | /v1/countries | List countries with stats and 30-day deltas | free |
| GET | /v1/country/{cc} | Country detail with top organizations and recent ASNs | free |
| GET | /v1/continents | Continent-level allocation totals | free |
| GET | /v1/transfers | Recent transfer events across the RIR transfer logs | free |
| GET | /v1/ip/{address}/owner | IP → registered holder, ASN, prefix | free |
| GET | /v1/ip/{address}/geo | Multi-source IP geolocation with cross-source consensus | developer |
| GET | /v1/bgp/announcements | Recent BGP announcements (RouteViews / RIPE RIS) | developer |
| GET | /v1/bgp/byoip | Bring-Your-Own-IP prefixes | developer |
| GET | /v1/search | Search ASNs, organizations, prefixes, and countries | free |
| GET | /v1/health/sources | Per-source freshness with 4-state status ladder (ok / degraded / stale / error) | free |
| GET | /v1/me | Caller customer profile + per-day quota + remaining requests | free |
| GET | /v1/audit | Consumer-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每月