Attest tools · ip_lookup

IP address lookup

a task needs to know what an IPv4 or IPv6 address is: public or private/reserved (per IANA registries), which network (ASN) announced it in a recent public routing snapshot, and — for public addresses — the approximat…

1 credit per successful callPOST /api/v1/ip/lookup

Bearer key · JSON

POST /api/v1/ip/lookup

curl -s -X POST https://getattest.com.au/api/v1/ip/lookup \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{"ip":"1.1.1.1"}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

Captured 2026-09-21

Example

This request was run against the running service on 2026-09-21 and the response below is what came back, unedited.

Request JSON

{
  "ip": "1.1.1.1"
}

Captured response JSON

{
  "call_id": "80affd5e-947c-44b4-8697-569fa645d1de",
  "ip": "1.1.1.1",
  "version": 4,
  "scope": "public",
  "globally_reachable": true,
  "special_purpose": null,
  "embedded_ipv4": null,
  "asn": 13335,
  "as_name": "CLOUDFLARENET",
  "network": "1.1.1.0-1.1.1.255",
  "network_cidr": "1.1.1.0/24",
  "country": "AU",
  "country_source": "IP geolocation by DB-IP (CC BY 4.0). IP to Country Lite by DB-IP (https://db-ip.com), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), delivered by ip-location-db (dbip-country) and reformatted by Attest. Approximate, and describes the network rather than any person or device.",
  "source": {
    "asn": "IPtoASN (iptoasn.com), PDDL 1.0, via ip-location-db iptoasn-asn",
    "scope": "IANA IPv4 and IPv6 Special-Purpose, Address Space and IPv6 Global Unicast Address Space registries (CC0 1.0)",
    "data_snapshot": "2026-06-17",
    "data_age_days": 95,
    "country_snapshot": "2026-09-01",
    "country_age_days": 19
  },
  "notice": "General information only. The ASN and network come from a snapshot of public routing data taken on the date in source.data_snapshot; the country comes from a separate snapshot taken on the date in source.country_snapshot. Both can be out of date. The country is the approximate country of the network and is not the location of a person or device; it is null where the dataset has no row for the address. IP geolocation by DB-IP (CC BY 4.0). No city, region or finer location is returned.",
  "checked_at": "2026-09-20T16:55:56.838Z",
  "credits_charged": 1,
  "credits_remaining": 9995
}

For agents

Use when

Use this when a task needs to know what an IPv4 or IPv6 address is: public or private/reserved (per IANA registries), which network (ASN) announced it in a recent public routing snapshot, and — for public addresses — the approximate country of that network. An IPv6 address that wraps an IPv4 one (IPv4-mapped, NAT64, 6to4, Teredo) returns it in embedded_ipv4; look that address up to get its network and country. The country describes the network, not a person or device. IP geolocation by DB-IP (CC BY 4.0).

1 field

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
ipstringRequiredOne IPv4 or IPv6 address.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
ipThe address, normalised.
version4 or 6.
scopeWhat the address is: public, private, reserved or another IANA special purpose.
globally_reachableWhether the IANA registry marks the address as globally reachable.
special_purposeThe IANA special-purpose registry entry, when the address is in one.
embedded_ipv4The IPv4 address wrapped inside an IPv4-mapped, NAT64, 6to4 or Teredo address. Look that one up for its network and country.
asnThe autonomous system number that announced the address in a recent public routing snapshot.
as_nameThe name published for that network.
network_cidrThe announced prefix the address falls in.
countryThe approximate country of the network. It describes the network, not a person or device.
sourceEach dataset used, with its snapshot date and age in days.
noticeWhat the answer does and does not say about the address.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
ip_required400No ip was sent.
invalid_ip400ip is not an IPv4 or IPv6 address.
ip_too_long400ip is longer than any address can be.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

IP geolocation by DB-IP (CC BY 4.0) - IP to Country Lite by DB-IP (https://db-ip.com), licensed under CC BY 4.0. ASN data from IPtoASN (PDDL 1.0). Address scope from the IANA special-purpose registries (CC0 1.0).

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key