IP Lookup API Guide for /api/ip
Use this guide to send a single-IP lookup request to /api/ip, understand the JSON fields that come back, and then pivot into the live browser workflow when you need more context.
Keep the scope factual: /api/ip is a lookup helper for one public IP at a time. It is not a bulk, authenticated, or SLA-backed API product.
Use this when
You want JSON output for a single public IP lookup and need the exact request pattern before you automate a fetch or CLI call.
Current contract
/api/ip requires an ip query parameter and returns JSON ownership context for one public IP at a time.
Guardrail
Invalid, private, or reserved inputs return error JSON. This surface does not promise bulk lookup, authentication, or uptime commitments.
Browser fetch example
Use a simple GET request when a frontend or debugging script needs the same ASN and network context shown in the browser lookup.
fetch("/api/ip?ip=8.8.8.8")
.then((response) => response.json())
.then((data) => console.log(data));
CLI curl example
Send the ip query parameter explicitly when you want JSON instead of the plain-text /ip terminal shortcut.
curl https://comutil.com/api/ip?ip=8.8.8.8
Sample response fields
The live endpoint returns top-level ASN metadata plus a nested network object sourced from the current RDAP and WHOIS lookup flow.
{
"asn_registry": "arin",
"asn": "15169",
"asn_cidr": "8.8.8.0/24",
"asn_country_code": "US",
"asn_date": "1992-12-01",
"asn_description": "GOOGLE, US",
"network": {
"name": "GOGL",
"country": "US",
"start_address": "8.8.8.0",
"end_address": "8.8.8.255",
"type": "DIRECT ALLOCATION",
"status": "active",
"links": []
},
"nir_postal_code": null,
"nir_range": null,
"address": "1600 Amphitheatre Parkway",
"email_admin": "arin-contact@google.com",
"email_tech": null
}
Start with the fields that explain ownership and range before you interpret address or contact details.
- asn_registry, asn, and asn_description tell you which registry and operator you are looking at.
- network.start_address, network.end_address, and network.status show the visible range and lifecycle context for the allocation.
- address, email_admin, and email_tech can help with escalation notes, but they are supporting details rather than the first triage signal.
These are the current constraints of the live endpoint, so keep your automation aligned to them.
- Missing ip returns {"error": "IP address is required."}.
- Private or reserved addresses return error JSON instead of public ownership data.
- Malformed input returns error JSON that explains the invalid IP format.
Use the docs route to understand the contract, then move into the live browser workflow when you need richer investigation context or a shareable lookup page.
- Open /ip when you want the browser UI, share URL, map, and investigation summary around the same lookup.
- Read the IP and ASN guide when you need the workflow framing, not just the JSON fields.
- Return to the Network/Security hub when the question expands into domain ownership or CIDR scope.