subnethistory docs
Open the appApp
API reference/Lookup endpoints

Lookup endpoints

Fetch a full report for an IP address, prefix or AS number.

One report, four ways to ask for it.

EndpointSubject
GET /api/v1/lookup?q={query}Anything the search bar accepts: an IP, a CIDR prefix, or an AS number.
GET /api/v1/ip/{ip}An IP address.
GET /api/v1/prefix/{net}/{len}A CIDR prefix, split into network and length.
GET /api/v1/asn/{asn}An AS number, with or without the AS prefix.

All four return the same JSON report, documented field by field in The lookup report. The path forms exist so you can build URLs without query string encoding; /lookup?q= is the general form. The shallow, offline and refresh parameters described on the API overview apply to all four.

Examples

curl
curl "https://subnethistory.com/api/v1/lookup?q=185.220.101.42"
javascript
const res = await fetch(
  "https://subnethistory.com/api/v1/lookup?q=" + encodeURIComponent("185.220.101.42")
);
const report = await res.json();

for (const insight of report.insights) {
  console.log(`[${insight.level}] ${insight.lead} ${insight.text}`);
}
python
import requests

report = requests.get(
    "https://subnethistory.com/api/v1/lookup",
    params={"q": "185.220.101.42"},
    timeout=60,
).json()

print(report["query"]["normalized"], report["meta"]["partial"])

The response at a glance

KeyWhat it holds
queryWhat you asked, as interpreted and normalised.
ipThe address and family, for address lookups. Flags special use space.
registrationThe registry record: holder, contacts, dates, parents, raw whois.
routingAnnouncement status, origin, RPKI, surrounding announcements.
asnThe full network profile of the origin AS.
originHistoryEvery AS that ever originated the space, one row each.
intelPer address intelligence sampling: verdicts, risk, agreement, trends, and the active-check block summary.
timelineEvery dated event, merged and sorted.
insightsPlain language findings with levels and stable codes.
tagsConfirmed and suggested labels, and the worst severity.
sourcesProvenance per dataset, including cache state.
metaTiming, cache and truncation information.

Behaviour worth knowing

  • Cold lookups are slow, once. The first lookup of a subject fans out to six sources and can take up to about 30 seconds. Everything is cached; repeats are instant. Use the streaming endpoint to show real progress instead of a spinner.
  • meta.partial. When true, a dataset was still pending or had failed at response time. meta.pendingDatasets and meta.failedDatasets say which, and meta.retryAfterMs says how long to wait. Stragglers finish in the background and land in the cache. A failed source is left alone for a few minutes before it is called again, so a repeat sooner than retryAfterMs returns the same report.
  • Special use space answers instantly. Private, loopback, CGNAT and similar reserved ranges return a report that explains the range instead of registry data, with a single info insight.
  • A bare address is not a /32. Looking up an address returns address level facts plus its covering block; look up the prefix itself for block level history.
Last updated 2026-08-15subnethistory.com