- authentication
- Secret API key as a bearer token
- billing
- 1 credit for a fresh lookup that resolves at least one signal (a location, a network, or a positive threat flag); reserved ranges, unknown addresses and 7-day repeats are free.
Locates an IPv4 or IPv6 address with the DB-IP Lite city and ASN databases and flags datacenter, Tor exit and VPN ranges from open threat lists. The flags are tri-state: false is a checked negative, null means the signal was not evaluated (list not installed, or IPv6 where a list is IPv4-only). risk_score sums only the signals that were checked — Tor 70, datacenter 40, VPN 30, capped at 100 — and risk_level buckets it with the same thresholds as email: 60 and above high, 30 and above medium. Reserved and private ranges answer reason: "reserved_range" with every field null.
The IP product page is marked "coming soon"; the endpoint itself works today.
Request body
| field | type | description |
|---|---|---|
| iprequired | string | An IPv4 or IPv6 address. |
Example request
curl -X POST https://spaw.co/api/v1/ip \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{
"ip": "8.8.8.8"
}'Responses
200The location, network and threat flags.
{
"success": true,
"data": {
"ip": "8.8.8.8",
"version": 4,
"reason": null,
"country": "US",
"region": "California",
"city": "Mountain View",
"latitude": 37.4056,
"longitude": -122.0775,
"asn": 15169,
"org": "Google LLC",
"is_datacenter": true,
"is_tor": false,
"is_vpn": false,
"risk_score": 40,
"risk_level": "medium",
"sources": [
{
"dataset": "dbip-city-lite",
"version": "2026-09"
},
{
"dataset": "dbip-asn-lite",
"version": "2026-09"
},
{
"dataset": "tor-exit-list",
"version": "2026-09-03"
},
{
"dataset": "datacenter-ranges",
"version": "2026-09-03"
},
{
"dataset": "vpn-ranges",
"version": "2026-09-03"
}
]
},
"meta": {
"credits_used": 1,
"credits_remaining": 8,
"cache_hit": false,
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}401The key is missing, malformed, or revoked.
{
"success": false,
"error": {
"code": "UNAUTHENTICATED",
"message": "Provide a valid API key as a bearer token.",
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}402The balance is empty. The lookup did not run.
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Your credit balance is empty.",
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}422The request body could not be validated; `error.errors` lists the fields.
{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "The email field is required.",
"errors": {
"email": [
"The email field is required."
]
},
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}429Over 5 requests per second for the key. Retry after the limit resets.
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after the limit resets.",
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}Error codes
Failures answer { success: false, error: { code, message, request_id } }. Each code has its own page.