Live · Updated every 4 hours

IP to ASN Lookup

NOC Operator Toolkit

Longest-prefix-match routing table lookup against a live RouteViews BGP feed. IPv4 and IPv6. Free. No API key. No rate limits (be reasonable).

1M+
Prefixes (v4 + v6)
4 hrs
Refresh Interval
24 hrs
WHOIS Cache TTL
<100 rps
Polite Rate Limit

I had an old blocklist to audit. Specifically, checking whether a few hundred thousand IP prefixes still had legitimate owners in the routing table. Every public IP→ASN service I found either had rate limits too low to be useful, questionable data freshness, or a pricing page where a free tier used to be. I wasn’t interested in paying for the privilege of getting throttled more politely. So I built my own.

Feel free to query this API heavily (please stay under 100 requests per second, there is actual hardware behind this). IP→ASN mapping is sourced from the RouteViews BGP table data (both IPv4 and IPv6), imported every 4 hours. ASN registrant info is pulled directly from the RIR WHOIS servers (ARIN, RIPE, APNIC, LACNIC, AFRINIC) and cached for 24 hours to avoid overwhelming them.

Query the API

Enter any IPv4 or IPv6 address, or a CIDR prefix.

Examples: 8.8.8.8 1.1.1.1 208.67.222.222 151.101.1.69 2606:4700::1
JSON Response
Enter an IP address above and click Query to see the response.

API Documentation

No authentication required. CORS headers are included on all responses.

GET /?ip={address}

Look up an IP address or CIDR prefix. Returns JSON with the longest matching BGP prefix and full ASN registrant information.

ParameterTypeDescription
ip string An IPv4 or IPv6 address (8.8.8.8) or CIDR prefix (8.8.8.0/24).
# cURL example curl -s "https://notoolkit.com/?ip=8.8.8.8" | jq .
POST /

Identical lookup via JSON body. Useful when scripting bulk queries or when the IP address contains characters that are awkward to URL-encode.

# cURL example curl -s -X POST https://notoolkit.com/ \ -H 'Content-Type: application/json' \ -d '{"ip":"8.8.8.8"}' | jq .
Response Fields
Field Type Description
query string The IP or prefix you submitted.
prefix string Longest-matching BGP prefix in the RouteViews routing table.
prefix_last_updated string UTC timestamp (ISO 8601) of the last RouteViews import that saw this prefix. Confirms data freshness.
asn integer Originating autonomous system number.
asn_name string Short AS name from the RIR (e.g. GOOGLE, CLOUDFLARE).
org_name string Full registered organisation name.
country string ISO 3166-1 alpha-2 country code of the registrant.
description string Free-text description or remarks from the RIR record.
rir string Registry that holds the ASN: ARIN, RIPE, APNIC, LACNIC, or AFRINIC.
whois_raw string First 4 KB of the raw WHOIS response text for the ASN.
cache_hit boolean true if the WHOIS result was served from the Redis cache (24-hour TTL).
Error Responses
HTTPMeaning
400Missing or invalid ip parameter.
404No BGP prefix found that covers the queried address.
503Database temporarily unavailable.

Common Questions

Everything you probably wanted to know but the man page didn’t cover.

What is an ASN (Autonomous System Number)?
An Autonomous System Number (ASN) is a unique identifier assigned to a collection of IP networks operated by a single organisation that presents a common routing policy to the internet. ASNs are the fundamental unit of BGP routing — every network that participates in the global routing table has one. They are allocated by Regional Internet Registries: ARIN (North America), RIPE NCC (Europe / Middle East / Central Asia), APNIC (Asia-Pacific), LACNIC (Latin America), and AFRINIC (Africa).
What is longest-prefix match and why does it matter?
Longest-prefix match (LPM) is the algorithm routers use to select the most specific route for a destination IP. When multiple prefixes in the routing table cover the same address, the one with the longest subnet mask (highest prefix length) wins. For example, if both 10.0.0.0/8 and 10.1.0.0/16 exist, a query for 10.1.2.3 returns 10.1.0.0/16 because /16 is more specific. This is important for IP-to-ASN lookups because the same IP block can be sub-allocated — you want the most specific announcement, not just any covering aggregate.
Is the API really free with no rate limits?
Yes. There is no API key, no account, no pricing tier, and no enforced rate limit. The only ask is to stay under 100 requests per second as a courtesy — beyond that you will start making the server unhappy. This was built for bulk processing of large IP lists, so high-volume usage is expected and welcome.
How fresh is the data?
The BGP routing table is imported from RouteViews every 4 hours. Each API response includes a prefix_last_updated field (UTC ISO 8601 timestamp) so you can see exactly when that particular prefix was last confirmed in the global table. ASN WHOIS registrant data is fetched live on the first query for each ASN, then cached in Redis for 24 hours. The cache_hit field tells you whether the WHOIS data came from cache or a live RIR lookup.
Does it support IPv6?
Yes, fully. The API accepts IPv6 addresses (e.g. 2606:4700::1) and IPv6 CIDR prefixes (e.g. 2606:4700::/32). IPv4 routing data comes from the RouteViews route-views2 collector and IPv6 data from the route-views6 collector. Both are stored in the same PostgreSQL table and queried transparently.
Where does the ASN registrant data come from?
ASN registrant information (organisation name, country, description) is retrieved directly from the authoritative RIR WHOIS servers. The lookup follows the standard two-step process: first querying whois.iana.org to determine which RIR is responsible, then querying that RIR (ARIN, RIPE, APNIC, LACNIC, or AFRINIC) for the full record. Results are cached in Redis for 24 hours.