Full geolocation and network lookup for an IPv4 address, IPv6 address, or resolvable hostname. Returns country, continent, ASN, organisation name, and the most-specific announced BGP prefix covering the IP. Cached for 7 days.
| Field | Type | Description |
|---|---|---|
| ip | string | Resolved IP address. May differ from input if a hostname was provided. |
| country_code | string | ISO 3166-1 alpha-2 code, e.g. "AU". |
| country | string | Full country name, e.g. "Australia". |
| country_flag | string | Unicode flag emoji, e.g. "🇦🇺". |
| continent | string | Full continent name, e.g. "Oceania". |
| as_number | number | ASN as an integer, e.g. 13335. |
| as_description | string | Organisation name from the routing registry, e.g. "CLOUDFLARENET". |
| cidrnew | string|null | Most-specific announced BGP prefix containing this IP, e.g. "1.1.1.0/24". null when the ASN has no prefix entries. |
| error | null|string | Null on success; error string otherwise. |
Returns all CIDR prefixes announced by an ASN, each annotated with country and continent.
Also returns pre-computed announcement size stats — total IPv4 host addresses
and IPv6 prefix count. :as_number accepts a bare integer or an AS-prefixed
string (e.g. 13335 or AS13335). Cached for 24 hours.
| Field | Type | Description |
|---|---|---|
| as_number | number | The ASN as an integer. |
| as_description | string | Organisation name from the registry. |
| ipv4_countnew | number | Total IPv4 host addresses announced (sum of 2^(32−prefixLen) per IPv4 prefix). |
| ipv6_prefix_countnew | number | Number of IPv6 prefix entries. Address space is too large to represent as a single count. |
| cidrs | object[] | Array of prefix objects (see below). |
| cidrs[].cidr | string | CIDR notation, e.g. "1.1.1.0/24". |
| cidrs[].country_code | string | ISO 3166-1 alpha-2 code for this prefix's allocation. |
| cidrs[].country | string | Full country name for this prefix. |
| cidrs[].continent | string | Full continent name for this prefix. |
| error | null|string | Null on success. |
Search ASNs by multiple input types — automatically detected from the query string.
Returns up to 25 matching { as_number, as_description } results.
| Input | Strategy |
|---|---|
| CIDR prefixnew | e.g. 1.1.1.0/24 — exact match against the prefix table. Returns the owning ASN. |
| IP address | e.g. 1.1.1.1 — resolves to its owning ASN via the IP range table. |
| AS number / "AS1234" | e.g. 13335 or AS13335 — direct lookup, single result. |
| Org name | e.g. cloudflare — case-insensitive partial match, up to 25 results. |
Returns the full country name for an IP or hostname as plain text. Accepts IPv4, IPv6, and hostnames. Cached for 7 days. Ideal for shell pipelines.
Returns the bare ASN number for an IP or hostname as plain text. No "AS" prefix.
Returns the full continent name for an IP or hostname as plain text.