API documentation
Base URL: https://api.nondik.net. All responses are JSON. IPv4 and IPv6 are supported everywhere, and the API itself is reachable over both.
Quick start
- Create a free account and make a key in the dashboard.
- Call the API:
curl -H "X-API-Key: ndk_..." https://api.nondik.net/v1/8.8.8.8
Authentication
Send your key in the X-API-Key header, or as Authorization: Bearer ndk_.... Keys in the URL are refused, because URLs end up in logs. Keys are secret: call the API from your server, not from browsers.
Endpoints
| Request | Does | Cost |
|---|---|---|
GET /v1/{ip} | Look up one IPv4 or IPv6 address | 1 lookup |
GET /v1/me | Look up the address the request comes from | 1 lookup |
POST /v1/batch | Look up up to 256 addresses (Pro and above) | 1 per valid address |
GET /v1/account | Your plan, quota and usage | free |
GET /v1/health | Service status and data date (no key) | free |
GET /v1/openapi.json | OpenAPI 3.1 description (no key) | free |
Response fields
{
"ip": "3.248.0.10",
"found": true,
"location": {
"country_code": "IE", "region": "Leinster", "city": "Dublin",
"latitude": 53.3498, "longitude": -6.2603, "timezone": "Europe/Dublin",
"accuracy_km": 50, "source": "cloud-region"
},
"network": {
"prefix": "3.248.0.0/13", "asn": 16509, "org": "Amazon.com, Inc.", "type": "cloud",
"cloud": { "provider": "aws", "region": "eu-west-1", "service": "EC2" }
},
"privacy": { "anonymous": false, "vpn": false, "tor": false, "relay": false, "hosting": true },
"crawler": null,
"risk": { "score": 60, "level": "medium", "reasons": ["hosting_network"] },
"threats": [],
"data_date": "2026-11-25"
}
| Field | Meaning |
|---|---|
found | false when the address is not announced on the internet. Other objects are then null. |
bogon | Present and true for private, reserved and documentation addresses (10.0.0.0/8, fc00::/7, …). |
location.country_code | ISO 3166-1 alpha-2 country of the user. |
location.region, region_code, city, postal | Best estimate; omitted when unknown. |
location.latitude, longitude | Approximate point; omitted when unknown. |
location.timezone | IANA time zone, e.g. Europe/Madrid. |
location.accuracy_km | Radius: 25 (operator geofeed), 50 (cloud region, relay), 100 (city estimate), 500 (country only). |
location.source | Where the location came from: geofeed, cloud-region, relay, dbip-city-lite, registry. |
network.prefix | The block the address belongs to with identical data. |
network.asn, org | The autonomous system announcing the address and its registered name. |
network.type | See network types. |
network.cloud | Provider (aws, gcp, oracle, cloudflare), region and service from the provider’s published ranges, or null. |
privacy.vpn | Network operated by a VPN provider. |
privacy.tor | Current Tor exit relay. |
privacy.relay | iCloud Private Relay egress (real Safari users, hidden address). |
privacy.hosting | Cloud, hosting or CDN network (not set for Private Relay). |
privacy.anonymous | vpn || tor || relay. |
crawler | Verified crawler by published ranges (googlebot, bingbot, gptbot), or null. |
threats | Threat lists the address is on (empty for now; honeypot data is coming). |
data_date | Date of the data release that answered. |
There is no proxy field: residential proxies are not detected yet, and a false there would be a claim we cannot make.
Network types
isp (fixed broadband), mobile, cloud, hosting, cdn, vpn, education, government, business, or unknown. The type describes the network’s owner. A carrier that runs both fixed and mobile access is isp.
Risk score
A simple, explainable score from 0 to 100: the strongest signal wins and every contributing signal is listed in reasons.
| Reason | Score |
|---|---|
tor_exit | 90 |
threat_list | 85 |
vpn_provider | 75 |
hosting_network | 60 |
icloud_private_relay | 25 |
unknown_network | 15 |
verified_crawler | 5 |
Levels: high at 70 and above, medium from 40, low below. Use the individual flags when you need a specific policy (for example, allow Private Relay but block Tor).
Choosing fields
Add ?fields= with a comma-separated list; dotted names pick nested fields. ip is always included.
GET /v1/8.8.8.8?fields=location.country_code,privacy,risk.level
Batch
Pro, Business and Enterprise. Up to 256 addresses per request (1,000 on Enterprise). Results come back in the same order; invalid entries get an error object and are not charged.
curl -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"ips": ["8.8.8.8", "2a00:1450:4001::1", "nonsense"]}' \
https://api.nondik.net/v1/batch
{"results": [{...}, {...}, {"ip": "nonsense", "error": {"code": "invalid_ip", ...}}]}
Quotas and headers
Every charged response carries:
X-Quota-Limit | Lookups in your plan for the period |
X-Quota-Used | Used so far, including this request |
X-Quota-Remaining | Left before the plan quota |
X-Quota-Period | YYYY-MM, or lifetime for the free trial |
X-Quota-Reset | When the period resets (paid plans) |
X-Quota-Warning | Present once you are over the plan quota |
Paid plans may go 20% over before requests get 429 quota_exceeded. The free trial stops at 1,000. Usage is counted in near real time; across many parallel requests the count can briefly lag by a few lookups.
Errors
{"error": {"code": "invalid_ip", "message": "\"1.2.3\" is not an IPv4 or IPv6 address"}}
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_ip | Not an IP address |
| 400 | invalid_request | Malformed batch body |
| 400 | batch_too_large | Too many addresses in a batch |
| 401 | missing_key | No key in the header |
| 401 | invalid_key | Unknown key |
| 403 | key_disabled | Key or account disabled |
| 403 | plan_restriction | Feature not in your plan (batch) |
| 404 | not_found | Unknown path |
| 405 | method_not_allowed | Wrong HTTP method |
| 429 | quota_exceeded | Quota (and allowance) used up |
| 500 | internal_error | Our fault; retry |
| 503 | data_unavailable | Data loading; retry in a few seconds |
A 429 from too many requests per second can also come from the gateway; back off and retry.
Code examples
JavaScript (Node 18+)
const res = await fetch(`https://api.nondik.net/v1/${ip}`, {
headers: { "X-API-Key": process.env.NONDIK_KEY },
});
const info = await res.json();
if (info.privacy?.anonymous || info.risk?.level === "high") {
// ask for extra verification
}
Python
import os, requests
r = requests.get(f"https://api.nondik.net/v1/{ip}",
headers={"X-API-Key": os.environ["NONDIK_KEY"]}, timeout=5)
info = r.json()
print(info["location"]["country_code"], info["network"]["type"], info["risk"]["level"])
Go
req, _ := http.NewRequest("GET", "https://api.nondik.net/v1/"+ip, nil)
req.Header.Set("X-API-Key", os.Getenv("NONDIK_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil { return err }
defer resp.Body.Close()
var info struct {
Privacy struct{ Anonymous bool `json:"anonymous"` } `json:"privacy"`
Risk struct{ Level string `json:"level"` } `json:"risk"`
}
err = json.NewDecoder(resp.Body).Decode(&info)
Data and updates
The database is rebuilt every day from registry, routing and operator data, and the API switches to each new release without downtime. data_date tells you which release answered. Sources and licences.
We do not log the addresses you look up; request logs record only the route, status and account.