NoToolkitJSON APIv1 · Seven tools

NoToolkit API

The lookups behind notoolkit.com, as JSON. No API key, no account, and no API rate limits you’ll ever reasonably hit. This page covers what every endpoint has in common; each tool’s demo page documents its own parameters and fields, and lets you try it.

Seven tools under /v1

Every lookup goes to https://api.notoolkit.com/v1/<tool>. Put the query in the path for a GET, or in a JSON body for a POST.

ToolRequestTakesExample
IP → ASN LookupGET /v1/ip/{address or prefix}
POST /v1/ip {"ip":"8.8.8.8"}
An IPv4 or IPv6 address or prefix./v1/ip/8.8.8.8
ASN LookupGET /v1/asn/{asn}?prefixes=true
POST /v1/asn {"asn":"AS13335","prefixes":true}
An AS number. prefixes=true adds the prefix lists./v1/asn/AS13335
RPKI ValidatorGET /v1/rpki/{prefix or asn}?origin={asn}
POST /v1/rpki {"rpki":"1.1.1.0/24","origin":"AS13335"}
A prefix, with the origin AS to validate. A lone AS lists its ROAs./v1/rpki/1.1.1.0/24?origin=AS13335
ASPA ValidatorGET /v1/aspa/{as path}?direction=upstream
POST /v1/aspa {"aspa":[3356,13335]}
An AS path, neighbor first, comma separated. A lone AS shows its ASPA./v1/aspa/3356,13335
IRR ValidatorGET /v1/irr/{query}
POST /v1/irr {"irr":"AS-EXAMPLE"}
A prefix, AS number, as-set or maintainer. live=true also asks RADB in real time: use it sparingly, only for a change made in the last few hours. It is slower, rate limited, and RADB is asked anyway when the mirrors have nothing./v1/irr/AS-EXAMPLE
AS Path Finder APIGET /v1/as-path/{address, prefix or asn}?from={asn}
POST /v1/as-path {"as-path":"1.1.1.1","from":"AS7922"}
An address, prefix or AS: its ingress, and with from, the likely AS path from that AS./v1/as-path/1.1.1.1?from=AS7922
MAC Address LookupGET /v1/mac/{address}
POST /v1/mac {"mac":"00:1B:63:84:45:E6"}
A full or partial MAC address./v1/mac/00:1B:63:84:45:E6
My IPGET /v1/myip
POST /v1/myip {"details":true}
Nothing to send: it answers with the address you called from and its version. details=true adds the prefix it is in and the AS announcing it. Ask ipv4.notoolkit.com or ipv6.notoolkit.com to get one family for certain./v1/myip?details=true
# the same lookup, three ways curl -s "https://api.notoolkit.com/v1/ip/8.8.8.8" curl -s -I "https://api.notoolkit.com/v1/ip/8.8.8.8" # HEAD: headers only curl -s -X POST https://api.notoolkit.com/v1/ip -H 'Content-Type: application/json' -d '{"ip":"8.8.8.8"}'

How requests and responses work

These hold for every endpoint.

GETSending a request
GETThe query is the rest of the path: /v1/rpki/1.1.1.0/24, slash and all. Options go in the query string: ?origin=AS13335. HEAD is answered the same way, without a body.
POSTA JSON object, with the query under the tool’s name and the options beside it: {"rpki":"1.1.1.0/24","origin":"AS13335"}. Bodies are limited to 512 bytes. The ASPA tool also takes its path as an array of AS numbers.
EncodingWrite a prefix’s slash as a slash. An encoded %2F in a path is refused by the web server before the API sees it. Encode spaces as %20, or write an AS path with commas.
AS numbers13335 and AS13335 both work, in any case. AS0 is not a valid query.
Booleanstrue, 1, yes and on all mean true, for prefixes and live.
IndexGET https://api.notoolkit.com/v1 lists the endpoints as JSON.
JSONWhat comes back
FormatUTF-8 JSON with Content-Type: application/json. Most responses start with query, echoing what you sent.
ErrorsAn object with an error string, and usually the query too: {"error":"Invalid ASN: foo"}. The HTTP status says what kind of error it is.
FreshnessAnswers from mirrored data say how old it is: prefix_last_updated on IP lookups, the rpki block on RPKI and ASPA answers, and live on IRR answers that asked RADB.
CORSAccess-Control-Allow-Origin: * on every API response, and preflight OPTIONS requests are answered, so a page on any site can call the API directly.
HTTPStatus codes
StatusMeaning
200An answer. That includes answers like RPKI invalid or ASPA unknown: the verdict is in the body, not the status.
400The input is not something the tool can read, or there was none. The error says what was wrong.
404Nothing matched: no route covers the address, no data exists for the AS, no IRR object or MAC assignment was found. Also an endpoint that does not exist.
410The old API at notoolkit.com/?ip=…, POST notoolkit.com/ and the /api/… aliases. Retired; the response names the /v1 URL for the same lookup.
503The database is unreachable, or the data a tool needs has not loaded yet. Retry after a short wait.

Where answers come from

Answers come from data we mirror and index ourselves. Only two things reach out to someone else’s server during a lookup: the RIR WHOIS for an AS we have not looked up in 14 days, and the IRR tool’s live queries to RADB.

ToolSourceRefreshed
IP → ASN, ASNOur route collectors’ BGP feeds; RIR WHOIS for registrant detailsLive as routes change, rebuilt every 4 hours; WHOIS cached 14 days
RPKI, ASPAROAs and ASPAs validated by our own RoutinatorEvery 10 minutes
IRRThe published dumps of every mirrored registry, plus live RADB queriesDumps every 4 hours; RADB live on a miss or live=true
MACThe IEEE registriesDaily

The routing table and the RPKI, as files

For mapping addresses to ASes offline: every routed prefix and its origin AS, one file per family. Regenerated every 4 hours, after the routing table’s scheduled rebuild.

Indexhttps://api.notoolkit.com/v1/bulk/prefix2as/index.json: when the files were generated, how many BGP sessions they come from, and each file’s url, rows and sha256. Read it, and download a file only when its URL changes.
Filesprefix2as-v4-<generated>.tsv.gz and prefix2as-v6-<generated>.tsv.gz. The build time is in the name, so a file never changes under its URL; each stays available for 48 hours after it is replaced, so a download in progress is never cut off.
LinesGzipped, tab-separated: network address, prefix length, origin. For example 1.0.0.0 24 13335. Where sessions see different origins they are joined with _, most-seen first; a path ending in an AS_SET gives its members joined with ,.
IncludedEvery prefix at least two of our BGP sessions carry, more-specifics as announced (match longest first). Left out: default routes, private and special-purpose space (RFC 1918, 100.64.0.0/10, loopback, link-local, multicast, the documentation ranges, fc00::/7, fe80::/10 and the like), and anything longer than /24 for IPv4 or /48 for IPv6.

RPKI: validated ROA payloads

Every validated ROA payload (VRP) from our own Routinator, across all five trust anchors, one file per family. Rebuilt every hour.

Indexhttps://api.notoolkit.com/v1/bulk/rpki/index.json: when the files were generated, the validator that produced them, and each file’s url, rows and sha256. As above: download a file only when its URL changes.
Filesvrps-v4-<generated>.tsv.gz and vrps-v6-<generated>.tsv.gz, each kept for 48 hours after it is replaced.
LinesGzipped, tab-separated, one VRP per line: prefix, max length, AS number and trust anchor, sorted and without duplicates. For example 1.1.1.0/24 24 13335 apnic. An AS0 ROA has AS 0. Lines starting with # are comments.

No API rate limits you’ll ever reasonably hit

There are none on any lookup answered from our own data, which is every lookup but one kind.

TodayNo enforced rate limit on IP → ASN, ASN, RPKI, ASPA or MAC lookups, or on IRR lookups answered from the mirrored registry data.
CourtesyPlease keep bulk jobs under 100 requests per second. It is not enforced, but there is real hardware behind this, and high-volume use is expected and welcome below that.
FutureIf abuse ever makes a limit necessary, it will sit well above normal use and be documented on this page.
IRRThe one exception: live queries to RADB

When the IRR tool asks whois.radb.net live, that is a real session on RADB’s servers, not ours. RADB limits how hard any one client may query it, and these limits exist at RADB’s request. They apply to nothing else: IRR answers from the mirrored dumps are not limited.

Live queryLimit
Requested with live=true6 a minute per client
Automatic, when the dumps have nothing20 a minute per client
Every client togetherA site-wide ceiling
A name RADB did not know eitherNot asked about again for 15 minutes

Past a limit you still get a 200 with an answer from the mirrored dumps, and live.skipped is rate_limited. The one 429 the API sends is the ASN lookup’s, for a client making more than 30 registry (WHOIS) lookups a minute of ASes no one has asked about lately; it carries a Retry-After.

API Questions

Do I need an API key or an account?
No. There is no key, no account and no sign-up. Send a request to https://api.notoolkit.com/v1/ and you get JSON back.
What happened to notoolkit.com/?ip=…?
The API moved to its own host, api.notoolkit.com, under a versioned path, so it can change without breaking anyone. The old endpoint, POST notoolkit.com/ and the /api/ip-to-asn and /api/asn-lookup aliases answer 410 Gone, with the /v1 URL for the same lookup in the response’s use field. The responses themselves are unchanged.
Is the API rate limited?
Not today, and not at any rate you’ll ever reasonably hit. Please keep bulk jobs under 100 requests per second as a courtesy. If abuse ever makes a limit necessary, it will sit well above normal use and be documented above. The one limit that exists is on the IRR tool’s live queries to RADB, at RADB’s request; IRR answers from the mirrored registry data are not limited.
Why are live IRR queries limited?
Every live query is a real whois session on RADB’s servers, not ours. RADB limits how hard any one client may query it, and our live lookups are limited at RADB’s request so this site stays a well-behaved client. You rarely need to ask for one: without live=true, RADB is still asked automatically when the mirrored dumps have nothing. Use it to confirm an object you have just changed, not for polling or bulk lookups.
Can I call the API from a web page?
Yes. Every API response carries Access-Control-Allow-Origin: * and preflight OPTIONS requests are answered, so a browser on any site can call it directly.
Why don’t the looking glass and the DNS, SMTP, SSL and STIR/SHAKEN tests have an API?
The DNS, SMTP, SSL and STIR/SHAKEN tests open connections from our servers to hosts and URLs you name, so they run from their pages only. The looking glass has no API yet while it settles. If you have a good use case for either, let us know at info at notoolkit dot com.
Something is wrong, or I need something the API doesn’t do.
Email info at notoolkit dot com with the request you sent and what came back.