IPv6 lookup

The same lookup as IPv4 for IPv6 addresses, plus the announced prefix.

GEThttps://api.mygeocode.com/v1/ipv6

Parameters

ParameterTypeDescription
ipoptionalstringAn IPv6 address in any textual form. Default: the address the request came from.
ipsoptionalstringComma-separated addresses, up to 100. Each address counts as one request.
elevationoptionalflag1 adds elevation_m, the ground height at the coordinates.
keyoptionalstringAPI key, if not sent as a header.

Example

$ curl -H "X-API-Key: YOUR_KEY" "https://api.mygeocode.com/v1/ipv6?ip=2606:4700:4700::1111"
const url = new URL("https://api.mygeocode.com/v1/ipv6");
url.searchParams.set("ip", "2606:4700:4700::1111");
const geo = await (await fetch(url, { headers: { "X-API-Key": "YOUR_KEY" } })).json();
console.log(geo.prefix, geo.country_code);
import requests

geo = requests.get("https://api.mygeocode.com/v1/ipv6", params={"ip": "2606:4700:4700::1111"}, headers={"X-API-Key": "YOUR_KEY"}, timeout=5).json()
print(geo["prefix"], geo["country_code"])
Response
{
  "status": "ok",
  "ip": "2606:4700:4700::1111",
  "version": 6,
  "found": true,
  "prefix": "2606:4700:4700::/48",
  "country": "United States",
  "country_code": "US",
  "continent": "North America",
  "continent_code": "NA",
  "region": "California",
  "region_code": "CA",
  "city": "San Francisco",
  "postcode": "94199",
  "lat": 37.774931,
  "lon": -122.419421,
  "timezone": "America/Los_Angeles",
  "utc_offset": "-07:00",
  "utc_offset_seconds": -25200,
  "is_eu": false,
  "asn": 13335,
  "as_name": "Cloudflare, Inc.",
  "org": "Cloudflare, Inc.",
  "usage_type": "Content",
  "registry": "arin",
  "allocated": "2010-07-14",
  "tags": ["a10k", "anycast", "cdn", "ddosm", "icrit", "rpkirov", "vpn"],
  "is_anycast": true,
  "is_satellite": false,
  "is_datacenter": true,
  "is_proxy": false,
  "is_vpn_provider": true,
  "is_tor": false,
  "crawler": null,
  "is_private": false,
  "abuse_email": "abuse@cloudflare.com",
  "threat": {
    "listed": false,
    "score": 0,
    "source_count": 0,
    "categories": [],
    "is_tor": false,
    "is_tor_exit": false,
    "is_bogon": false,
    "listings": []
  },
  "updated_at": "2026-09-18 09:28:11"
}

Response fields

The same fields as the IPv4 lookup. prefix is the covering IPv6 network and version is 6, or 4 when an IPv4 address or an IPv4-mapped address (::ffff:a.b.c.d) was sent, in which case the answer is the IPv4 data.

Either version in one call

GET /v1/ip accepts an IPv4 or an IPv6 address (or none, for the caller) and returns the same record as the version-specific endpoints. Use it when you do not know in advance which kind of address you will be given.

Notes

Errors

400 invalid_request when ip is not a valid IP address, or when ips has more than 100 entries. An IPv4 address is not refused here: it is answered with the IPv4 data. In a batch, an entry that is not a valid address does not fail the call: its place in results holds "status": "error" with the address and an error object, and it is not counted.