Fast & lightweight HTTP gateway that serves Internet registry allocation data as a JSON REST API.
615
Lightweight HTTP gateway that resolves IP addresses and AS numbers against Internet registry allocation data through a JSON REST API.
Send a POST /api/v1/registry request with an IP address or an AS number, get back structured JSON telling you which Regional Internet Registry (ARIN, APNIC, RIPE NCC, LACNIC, AFRINIC) the resource belongs to — along with the matched prefix, country, allocation status and date, and, for AS numbers, the organization and abuse contact.
Two MMDB databases are built automatically from gzipped CSVs served by the letstool CDN and refreshed every 24 hours at 12:30 UTC. No registry account, no manual download, no setup.
The binary embeds a web UI (dark/light mode, 15 languages, RTL support) and an OpenAPI 3.1 spec — no external files, no runtime dependencies.
docker run -p 8080:8080 letstool/http2registry:latest
Open http://localhost:8080 to use the web UI, or query the API directly:
# Resolve an IP address to its prefix and Internet registry record
curl -s -X POST http://localhost:8080/api/v1/registry \
-H "Content-Type: application/json" \
-d '{"query":"1.1.1.1"}' | jq
# Resolve an AS number to its Internet registry record
curl -s -X POST http://localhost:8080/api/v1/registry \
-H "Content-Type: application/json" \
-d '{"query":"AS13335"}' | jq
Example response — IP address lookup:
{
"status": "SUCCESS",
"query_type": "ip",
"query": "1.1.1.1",
"answer": {
"ip": "1.1.1.1",
"prefix": "1.1.1.0/24",
"size": "256",
"registry": "apnic",
"reg_country": "AU",
"status": "assigned",
"since": 1313020800,
"ip_version": 4
}
}
Example response — AS number lookup:
{
"status": "SUCCESS",
"query_type": "asnum",
"query": "AS13335",
"answer": {
"asnum": 13335,
"registry": "arin",
"reg_country": "US",
"status": "assigned",
"since": 1055721600,
"abuse_email": "[email protected]",
"organization": "Cloudflare, Inc.",
"last_update": 1718740034
}
}
Query type auto-detection:
prefix2reg lookup — returns the matched prefix and its registry, country, status and allocation dateAS<n> (case-insensitive: AS13335, as13335) → asn2reg lookup — returns the registry record, including organization and abuse contact| CLI flag | Environment variable | Default |
|---|---|---|
-listen-addr | LISTEN_ADDR | 127.0.0.1:8080 |
-db-dir | DB_DIR | /data |
-db-url | DB_URL | (none) |
-license-key | LICENSE_KEY | (none) |
CLI flags take priority over environment variables.
Proxy is supported via the standard HTTPS_PROXY, HTTP_PROXY, and NO_PROXY environment variables (same behaviour as curl).
docker run -p 8080:8080 \
-v ./db:/data:rw \
-e LISTEN_ADDR=0.0.0.0:8080 \
letstool/http2registry:latest
Set DB_URL to another running http2registry instance to download both MMDB databases directly from its /db/prefix2reg and /db/as2reg endpoints instead of fetching from the CDN. Useful for air-gapped environments or clusters where only one node hits the CDN.
docker run -p 8080:8080 \
-e DB_URL=http://upstream-host:8080 \
-v ./db:/data:rw \
letstool/http2registry:latest
Mount a volume to /data to cache the databases across container restarts:
docker run -p 8080:8080 \
-e LISTEN_ADDR=0.0.0.0:8080 \
-v ./db:/data:rw \
letstool/http2registry:latest
On restart, if the cached MMDB files are recent enough, they are reloaded immediately without refetching.
https://github.com/letstool/http2registry
This project is licensed under the Apache License, Version 2.0.
Copyright (c) 2026 letstool.net
| Project | GitHub | Docker Hub | Description |
|---|---|---|---|
http2dns | letstool/http2dns | letstool/http2dns | Fast & lightweight HTTP gateway that serves DNS queries as a JSON REST API |
http2whois | letstool/http2whois | letstool/http2whois | Fast & lightweight HTTP gateway that serves WHOIS queries as a JSON REST API |
http2rdap | letstool/http2rdap | letstool/http2rdap | Fast & lightweight HTTP gateway that serves RDAP queries as a JSON REST API |
http2geoip | letstool/http2geoip | letstool/http2geoip | Fast & lightweight HTTP gateway that serves IP geolocation database as a JSON REST API |
http2cert | letstool/http2cert | letstool/http2cert | Fast & lightweight HTTP gateway that serves X.509 certificate inspection as a JSON REST API |
http2tor | letstool/http2tor | letstool/http2tor | Fast & lightweight HTTP gateway that serves Tor IP database as a JSON REST API |
http2sun | letstool/http2sun | letstool/http2sun | Fast & lightweight HTTP gateway that serves solar position algorithm as a JSON REST API |
http2mac | letstool/http2mac | letstool/http2mac | Fast & lightweight HTTP gateway that serves MAC address OUI database as a JSON REST API |
http2country | letstool/http2country | letstool/http2country | Fast & lightweight HTTP gateway that serves country database as a JSON REST API |
http2prefix | letstool/http2prefix | letstool/http2prefix | Fast & lightweight HTTP gateway that serves Internet BGP routing database as a JSON REST API |
http2registry | letstool/http2registry | letstool/http2registry | Fast & lightweight HTTP gateway that serves RIR/NIR Internet registry database as a JSON REST API |
Internet registry data sourced from the public RIR delegated statistics via the letstool CDN. This project is not affiliated with any RIR or registry data provider. The five Regional Internet Registries — ARIN, APNIC, RIPE NCC, LACNIC and AFRINIC — publish delegated statistics describing IP address and AS number allocations. These files are the canonical public source of the allocation, country, status and date information exposed by this service.
Content type
Image
Digest
sha256:f03df10ad…
Size
3.1 MB
Last updated
3 months ago
docker pull letstool/http2registry