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| Field | Type | Required | What it does |
|---|
ip | string | Required | One 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| Field | What it holds |
|---|
ip | The address, normalised. |
|---|
version | 4 or 6. |
|---|
scope | What the address is: public, private, reserved or another IANA special purpose. |
|---|
globally_reachable | Whether the IANA registry marks the address as globally reachable. |
|---|
special_purpose | The IANA special-purpose registry entry, when the address is in one. |
|---|
embedded_ipv4 | The IPv4 address wrapped inside an IPv4-mapped, NAT64, 6to4 or Teredo address. Look that one up for its network and country. |
|---|
asn | The autonomous system number that announced the address in a recent public routing snapshot. |
|---|
as_name | The name published for that network. |
|---|
network_cidr | The announced prefix the address falls in. |
|---|
country | The approximate country of the network. It describes the network, not a person or device. |
|---|
source | Each dataset used, with its snapshot date and age in days. |
|---|
notice | What 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| Code | Status | Meaning |
|---|
ip_required | 400 | No ip was sent. |
|---|
invalid_ip | 400 | ip is not an IPv4 or IPv6 address. |
|---|
ip_too_long | 400 | ip is longer than any address can be. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The credit store could not be reached. Retry once after 30 seconds. |
|---|
4 worked examples
Examples
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