API reference · v2 · free
The IPINFO.ZIP API
A JSON API over the same weekly database you can download. No key, no signup, no SDK: one GET per address.
https://ipinfo.zip/api
openapi.jsonllms.txtMCP serverTry itRequest buildercurl ipinfo.zip
GETipinfo.zip/apibase/8.8.8.8address/asn.namefield?format=textformat
200 OK · text/plainGoogle LLC
- 0
- API keys to create
- 120
- lookups a minute, per IP
- 6
- response formats
On this page Introduction
Getting started
Introduction
Every endpoint lives under /api and answers JSON unless you ask for something else. Records come from the current release, rebuilt every Monday; the X-Release header tells you which one answered.
There is nothing to configure. Send a request from a terminal, a browser, a server or an agent and read the result.
- 1Pick an address. Any IPv4 or IPv6 address, or nothing to get your own.
- 2Call the API. GET /api/{ip}. Add ?format=csv or another format if JSON is not what you want.
- 3Watch the headers. X-RateLimit-Remaining says how many requests are left on that endpoint this minute.
- Format
- JSON by default; XML, YAML, CSV, text and markdown on request.
- Errors
- JSON with a stable machine code and a human message.
- Versioning
- Fields are only added in v2; anything that breaks gets a new path.
# your own address
curl https://ipinfo.zip/api/me
# any address
curl https://ipinfo.zip/api/8.8.8.8
# the same record as CSV
curl 'https://ipinfo.zip/api/8.8.8.8?format=csv'
# a single field, as bare text
curl 'https://ipinfo.zip/api/8.8.8.8/asn.name?format=text'
curl ipinfo.zip
From a terminal
In a shell you can skip /api: curl, Wget, HTTPie, xh, PowerShell and the usual HTTP libraries get data straight from the site's own addresses. Browsers still get the pages.
curl ipinfo.zip- Your record, as JSON
curl ipinfo.zip/ip - Your IP address, bare
curl ipinfo.zip/location.city - One field of your record, bare
curl ipinfo.zip/8.8.8.8 - The record of any address, as JSON
curl ipinfo.zip/8.8.8.8/ asn.name - One field of that record, bare
curl ipinfo.zip/AS13335 - The profile of an autonomous system
curl 'ipinfo.zip/1.1.1.1? format=yaml' - Any format, with ?format= or Accept
- Single values print bare with a newline, so they drop straight into a shell variable. Add ?format=json to get JSON instead.
- A request counts as a terminal when its User-Agent is a command-line client, or when its Accept header asks for JSON, XML, YAML, CSV or plain text and not for HTML.
- Same answers, errors and rate limits as /api: the me bucket for your own record, lookup for a field or another address.
- In code, prefer the /api/… paths: they answer the same way whoever asks.
# your own record (shortened here)
$ curl ipinfo.zip
{
"ip": "1.1.1.1",
"network": "1.1.1.1/32",
"type": "IPv4",
"is_datacenter": true,
"is_vpn": false,
"location": {
"country_code": "AU",
"city": "Brisbane",
"timezone": "Australia/Brisbane"
},
"asn": {
"asn": 13335,
"name": "Cloudflare, Inc."
},
"…": "…"
}
# just your address
$ curl ipinfo.zip/ip
1.1.1.1
# one field, bare
$ curl ipinfo.zip/8.8.8.8/asn.name
Google LLC
# straight into a variable
$ city=$(curl -s ipinfo.zip/2.26.145.96/location.city)
$ echo "$city"
Paris
# any format
$ curl -s 'ipinfo.zip/1.1.1.1?format=yaml' | head -4
ip: "1.1.1.1"
network: "1.1.1.1/32"
is_bogon: false
is_announced: true
Formats and content negotiation
Choose the format with ?format=, or with the Accept header when ?format= is absent. Without either, the answer is JSON.
| format= | Accept | Notes |
|---|---|---|
| json | application/json | Default. Pretty-printed. |
| xml | application/xml | One element per field, arrays as item lists. |
| yaml | application/yaml | Block style, quoted where ambiguous. |
| csv | text/csv | Header row plus one row per record; nested fields flattened with dots. |
| text | text/plain | key: value lines; with /{ip}/{field}, the bare value. |
| md | text/markdown | A markdown table, handy for agents and chat. |
Every HTML page of this site is also available as markdown: send Accept: text/markdown or add .md to the path.
curl -H 'Accept: text/csv' https://ipinfo.zip/api/1.1.1.1
curl 'https://ipinfo.zip/api/1.1.1.1?format=yaml'
# pages too: send Accept: text/markdown
curl -H 'Accept: text/markdown' https://ipinfo.zip/faq
Rate limits
Limits are counted per client IP (IPv6 per /56) and separately for every endpoint, so heavy use of one never blocks another. Every response says where you stand.
| Bucket | Endpoints | Limit |
|---|---|---|
| lookup | GET /api/{ip}, GET /api/{ip}/{field} | 120 / min |
| me | GET /api/me | 240 / min |
| asn | GET /api/AS{n} | 60 / min |
| batch | POST /api/batch (up to 100 IPs each) | 10 / min |
| search | GET /api/search | 90 / min |
| stats | GET /api/stats | 60 / min |
| download | GET /download/* | 30 / hour |
| page | HTML and markdown pages | 240 / min |
| agent | llms.txt, openapi, mcp | 120 / min |
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset are sent on every response, with the IETF RateLimit and RateLimit-Policy headers. A 429 carries Retry-After. Need more? Download the database and query it locally.
HTTP/1.1 200 OK
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 119
X-RateLimit-Reset: 1796410040
RateLimit: "lookup"; r=119; t=60
RateLimit-Policy: "lookup"; q=120; w=60
X-Release: 2026-12-05
HTTP/1.1 429 Too Many Requests
Retry-After: 60
X-RateLimit-Remaining: 0
Errors
Errors are JSON objects with the HTTP status, a stable code to branch on, a message for people and a request_id to quote when you contact us.
| Status | code | When | Retry |
|---|---|---|---|
| 400 | invalid_ip | The path is not a valid IPv4 or IPv6 address. | No |
| 400 | invalid_format | ?format= is not one of the six formats. | No |
| 400 | invalid_asn | The AS number is out of range. | No |
| 404 | asn_not_found | The AS is not in the current release. | No |
| 404 | asn_reserved | The number is reserved (private use, documentation, AS_TRANS…) and identifies no network. | No |
| 404 | unknown_field | The record has no such field for this address. | No |
| 410 | file_withheld | An uncompressed file was asked for: download its .gz instead (the error says which). | No |
| 413 | batch_too_large | More than 100 addresses in one batch. | No |
| 429 | rate_limited | The endpoint limit is reached for your IP. | Yes |
| 500 | internal_error | A bug on our side. It has been reported. | Yes |
| 503 | not_ready | No release is loaded yet (first build). | Yes |
{
"error": {
"status": 429,
"code": "rate_limited",
"message": "Too many requests on the \"lookup\" endpoint: 120 per 60s.",
"retry_after": 60,
"bucket": "lookup",
"request_id": "6f1c2a9e-…"
}
}
Look up your own IP
Returns the record of the address the request comes from. Behind a proxy, that is the proxy’s address.
- Never cached by shared caches: the answer depends on who asks.
- Same record shape as GET /{ip}.
Request
curl https://ipinfo.zip/api/me
const res = await fetch('https://ipinfo.zip/api/me');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/me', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/me")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/me'), true);
print_r($data);
Response
{
"ip": "8.8.8.8",
"network": "8.8.8.8/32",
"type": "IPv4",
"is_datacenter": true,
"is_vpn": false,
"is_tor": false,
"isp": "Google LLC",
"location": {
"country_code": "US",
"country": "United States",
"city": "Mountain View",
"timezone": "America/Los_Angeles"
},
"asn": {
"asn": 15169,
"name": "Google LLC",
"route": "8.8.8.0/24"
},
"…": "…",
"release": "2026-12-05"
}
{
"error": {
"status": 429,
"code": "rate_limited",
"message": "Too many requests on the \"me\" endpoint: 240 per 60s.",
"retry_after": 60,
"bucket": "me",
"request_id": "6f1c2a9e-…"
}
}
Look up an IP address
The full record for one IPv4 or IPv6 address: location, network, company, abuse contact, privacy and threat flags, routing.
- IPv4-mapped IPv6 (::ffff:1.2.3.4) is unwrapped.
- network is the smallest range of the database containing the address.
- Unknown or unannounced addresses answer 200 with found: false.
Parameters
| Field | Type | Description |
|---|---|---|
| ip Requiredpath | string | IPv4 or IPv6 address. |
| formatquery | json | xml | yaml | csv | text | md | Response format. Overrides the Accept header. Default json. |
Request
curl https://ipinfo.zip/api/8.8.8.8
const res = await fetch('https://ipinfo.zip/api/8.8.8.8');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/8.8.8.8', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/8.8.8.8")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/8.8.8.8'), true);
print_r($data);
Response
{
"ip": "8.8.8.8",
"network": "8.8.8.8/32",
"is_bogon": false,
"is_announced": true,
"is_datacenter": true,
"is_cloud_provider": true,
"is_mobile": false,
"is_satellite": false,
"is_anycast": true,
"is_ixp": false,
"is_crawler": false,
"is_scanner": false,
"is_vpn": false,
"is_proxy": false,
"is_residential_proxy": false,
"is_tor": false,
"is_relay": false,
"is_anonymous": false,
"is_abuser": false,
"is_attacker": false,
"is_threat": false,
"is_drop": false,
"is_mail_blocklisted": false,
"is_leased": false,
"usage_type": "CDN",
"connection_type": "Corporate",
"user_type": "content_delivery_network",
"privacy": {
"vpn": false,
"proxy": false,
"tor": false,
"relay": false,
"hosting": true
},
"rir": "ARIN",
"isp": "Google LLC",
"domains": {
"total": 134,
"domains": [
"proof-dns.com",
"meetcircle-blue.co",
"dns-redirect.com"
]
},
"datacenter": {
"datacenter": "Google Cloud",
"domain": "cloud.google.com",
"network": "8.8.8.0 - 8.8.8.255"
},
"company": {
"name": "Google LLC",
"abuser_score": 0,
"abuser_level": "Very Low",
"domain": "google.com",
"type": "hosting",
"network": "8.8.8.0 - 8.8.8.255",
"netname": "GOGL",
"created": "2023-12-28",
"updated": "2023-12-28"
},
"abuse": {
"name": "Abuse",
"email": "network-abuse@google.com",
"phone": "+1-650-253-0000",
"address": "1600 Amphitheatre Parkway, Mountain View, CA, 94043, United States",
"network": "8.8.8.0 - 8.8.8.255"
},
"asn": {
"asn": 15169,
"name": "Google LLC",
"handle": "GOOGLE",
"descr": "GOOGLE - Google LLC, US",
"org": "Google LLC",
"country": "US",
"domain": "google.com",
"domains": [
"google.com",
"about.google"
],
"website": "https://about.google/intl/en/",
"abuse": "network-abuse@google.com",
"abuse_contact": {
"name": "Abuse",
"email": "network-abuse@google.com",
"phone": "+1-650-253-0000"
},
"type": "hosting",
"rir": "ARIN",
"registered": "2000-03-30",
"created": "2000-03-30",
"updated": "2012-02-24",
"active": true,
"num_ipv4": 1764352,
"num_ipv6": "910925605079623083141103616000",
"prefixes_v4": 1281,
"prefixes_v6": 180,
"rank": 1579,
"cone_size": 21,
"upstreams": 7,
"peers": 292,
"customers": 19,
"upstream_asns": [
3356,
6453,
6762,
12956,
52468,
203291,
214292
],
"abuser_score": 0.0015,
"abuser_level": "Elevated",
"rpki": {
"valid": 1457,
"invalid": 4,
"not_found": 0,
"coverage": 0.9973
},
"tags": [
"a10k",
"anycast",
"cdn",
"icrit",
"vpn",
"vpsh"
],
"bgp_class": "Content",
"users": 725983,
"peeringdb": {
"type": "Content",
"ratio": "Mostly Outbound",
"scope": "Global",
"website": "https://about.google/intl/en/",
"policy": "Selective"
},
"ratio": "Mostly Outbound",
"scope": "Global",
"policy": "Selective",
"traffic_profile": {
"source": "derived",
"class": "mixed"
},
"registry": {
"org_handle": "GOGL",
"org_name": "Google LLC",
"source": "ARIN RDAP"
},
"mail_blocklist_score": 137.3,
"hosting_votes": 6,
"route": "8.8.8.0/24",
"rpki_status": "valid"
},
"routing": {
"route": "8.8.8.0/24",
"origin_asns": [
15169
],
"rpki_status": "valid",
"visibility": 0.8292,
"first_seen": "2010-01-01",
"last_seen": "2026-12-05",
"as_path": [
55720,
15169
]
},
"location": {
"continent": "NA",
"continent_name": "North America",
"country": "United States",
"country_code": "US",
"is_eu_member": false,
"calling_code": "1",
"currency_code": "USD",
"currency": "US Dollar",
"capital": "Washington",
"state": "California",
"region_code": "US-CA",
"city": "Mountain View",
"zip": "94035",
"latitude": 37.3861,
"longitude": -122.0838,
"timezone": "America/Los_Angeles",
"accuracy": "VERY_HIGH",
"geoname_id": 5375480,
"country_info": {
"country_code3": "USA",
"country_numeric": 840,
"geoname_id": 6252001,
"flag": "🇺🇸",
"tld": ".us",
"capital": "Washington",
"area_km2": 9629091,
"population": 341784857,
"population_density": 35.5,
"languages": [
"en-US",
"es-US",
"haw",
"fr"
],
"language": "English",
"borders": [
"CA",
"MX",
"CU"
],
"currency_symbol": "$",
"currency_symbol_native": "$",
"postal_format": "#####-####"
},
"local_time": "2026-12-06T08:55:48-08:00",
"utcoffset": "-08:00",
"is_dst": false,
"timezone_abbr": "PST",
"timezone_name": "Pacific Standard Time"
},
"registry": {
"rir": "ARIN",
"country": "US",
"network": "8.8.8.0 - 8.8.8.255",
"allocated": "2023-12-28",
"status": "allocated",
"registrant": {
"name": "Google LLC",
"handle": "NET-8-8-8-0-2",
"netname": "GOGL",
"network": "8.8.8.0 - 8.8.8.255",
"created": "2023-12-28",
"updated": "2023-12-28",
"source": "ARIN RDAP"
}
},
"abuse_density": {
"subnet24_ips": 256,
"subnet24_abusive": 0,
"subnet24_abusive_share": 0,
"asn_ips": 1764352,
"asn_abusive": 2580,
"asn_abusive_share": 0.001462
},
"tags": [
"hosting",
"cloud",
"anycast"
],
"type": "IPv4",
"release": "2026-12-05",
"elapsed_ms": 0.411
}
{
"error": {
"status": 400,
"code": "invalid_ip",
"message": "\"not-an-ip\" is not a valid IPv4 or IPv6 address.",
"request_id": "6f1c2a9e-…"
}
}
Read one field
Picks one field of the record with a dotted path. Useful in shell scripts and spreadsheets.
- ?format=text returns the bare value, without JSON.
- Unknown paths answer 404 unknown_field.
Parameters
| Field | Type | Description |
|---|---|---|
| ip Requiredpath | string | IPv4 or IPv6 address. |
| field Requiredpath | string | Dotted path, e.g. location.country_code or asn.name. |
| formatquery | json | xml | yaml | csv | text | md | Response format. Overrides the Accept header. Default json. |
Request
curl https://ipinfo.zip/api/8.8.8.8/location.country_code
const res = await fetch('https://ipinfo.zip/api/8.8.8.8/location.country_code');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/8.8.8.8/location.country_code', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/8.8.8.8/location.country_code")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/8.8.8.8/location.country_code'), true);
print_r($data);
Response
Profile an autonomous system
Owner, registry identity and contacts, announced prefixes with RPKI and visibility, upstreams, peers and downstreams, rank, abuse rate and PeeringDB data.
- Unannounced but registered AS numbers are included.
- Neighbours come from public BGP relationship inference.
Parameters
| Field | Type | Description |
|---|---|---|
| number Requiredpath | integer | AS number, with or without the AS prefix. |
| formatquery | json | xml | yaml | csv | text | md | Response format. Overrides the Accept header. Default json. |
Request
curl https://ipinfo.zip/api/AS13335
const res = await fetch('https://ipinfo.zip/api/AS13335');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/AS13335', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/AS13335")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/AS13335'), true);
print_r($data);
Response
{
"asn": 13335,
"name": "Cloudflare, Inc.",
"handle": "CLOUDFLARENET",
"org": "Cloudflare, Inc.",
"country": "US",
"domain": "cloudflare.com",
"type": "hosting",
"rir": "ARIN",
"registered": "2010-07-14",
"num_ipv4": 1466624,
"num_ipv6": "1520898798772741150272502366208",
"rank": 61,
"upstreams": 93,
"peers": 1305,
"customers": 1063,
"abuser_score": 0.0023,
"prefixes": [
{
"route": "152.114.0.0/17",
"family": "v4",
"num_ips": 32768,
"rpki_status": "unknown",
"visibility": 0.8314,
"first_seen": "2026-01-01",
"last_seen": "2026-12-05",
"country": "GB",
"city": "Hemel Hempstead"
},
{
"route": "150.48.128.0/18",
"family": "v4",
"num_ips": 16384,
"rpki_status": "valid",
"visibility": 0.8314,
"first_seen": "2025-01-01",
"last_seen": "2026-12-05",
"country": "US",
"city": "Mountain View"
}
],
"neighbours": [
{
"asn": 31,
"rel": "downstream",
"name": "California Institute of Technology",
"country": "US"
},
{
"asn": 49,
"rel": "downstream",
"name": "National Institute of Standards and Technology",
"country": "US"
},
{
"asn": 112,
"rel": "downstream",
"name": "AS112 Project",
"country": "US"
}
],
"…": "…"
}
{
"error": {
"status": 404,
"code": "asn_not_found",
"message": "AS4199999999 is not in the current release.",
"request_id": "6f1c2a9e-…"
}
}
Look up up to 100 addresses
One request, up to 100 addresses. The answer is an array in the same order; failed items carry an error object.
- Body: a JSON array, {"ips": [...]}, or one address per line as text/plain.
- Duplicates are removed.
Parameters
| Field | Type | Description |
|---|---|---|
| body Requiredbody | string[] (≤ 100) | The addresses to look up. |
| formatquery | json | xml | yaml | csv | text | md | Response format. Overrides the Accept header. Default json. |
Request
curl -X POST https://ipinfo.zip/api/batch \
-H 'Content-Type: application/json' \
-d '["8.8.8.8", "1.1.1.1", "2606:4700:4700::1111"]'
const res = await fetch('https://ipinfo.zip/api/batch', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(["8.8.8.8", "1.1.1.1", "2606:4700:4700::1111"]),
});
const records = await res.json();
for (const r of records) console.log(r.ip, r.asn?.name);
import requests
records = requests.post(
'https://ipinfo.zip/api/batch',
json=['8.8.8.8', '1.1.1.1', '2606:4700:4700::1111'],
timeout=10,
).json()
for r in records:
print(r['ip'], r.get('asn', {}).get('name'))
body := strings.NewReader(`["8.8.8.8", "1.1.1.1", "2606:4700:4700::1111"]`)
resp, err := http.Post("https://ipinfo.zip/api/batch", "application/json", body)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var records []map[string]any
json.NewDecoder(resp.Body).Decode(&records)
fmt.Println(len(records), "records")
<?php
$ctx = stream_context_create(['http' => [
'method' => 'POST',
'header' => 'Content-Type: application/json',
'content' => json_encode(['8.8.8.8', '1.1.1.1', '2606:4700:4700::1111']),
]]);
$records = json_decode(file_get_contents('https://ipinfo.zip/api/batch', false, $ctx), true);
foreach ($records as $r) echo $r['ip'], ' ', $r['asn']['name'] ?? '', "\n";
Response
[
{
"ip": "8.8.8.8",
"network": "8.8.8.8/32",
"type": "IPv4",
"location": {
"country_code": "US",
"city": "Mountain View"
},
"asn": {
"asn": 15169,
"name": "Google LLC"
},
"…": "…"
},
{
"ip": "1.1.1.1",
"network": "1.1.1.1/32",
"type": "IPv4",
"location": {
"country_code": "AU",
"city": "Brisbane"
},
"asn": {
"asn": 13335,
"name": "Cloudflare, Inc."
},
"…": "…"
},
{
"ip": "2606:4700:4700::1111",
"network": "2606:4700:4700::/48",
"type": "IPv6",
"location": {
"country_code": "US",
"city": "San Francisco"
},
"asn": {
"asn": 13335,
"name": "Cloudflare, Inc."
},
"…": "…"
}
]
{
"error": {
"status": 413,
"code": "batch_too_large",
"message": "At most 100 addresses per request.",
"request_id": "6f1c2a9e-…"
}
}
Search networks
Finds an IP, an AS number, or autonomous systems by name, organisation or domain.
Parameters
| Field | Type | Description |
|---|---|---|
| q Requiredquery | string | Free text, an IP or an AS number. |
| formatquery | json | xml | yaml | csv | text | md | Response format. Overrides the Accept header. Default json. |
Request
curl https://ipinfo.zip/api/search?q=cloudflare
const res = await fetch('https://ipinfo.zip/api/search?q=cloudflare');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/search?q=cloudflare', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/search?q=cloudflare")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/search?q=cloudflare'), true);
print_r($data);
Response
{
"query": "cloudflare",
"results": [
{
"kind": "asn",
"id": "AS13335",
"name": "Cloudflare, Inc.",
"country": "US",
"url": "/AS13335"
},
{
"kind": "asn",
"id": "AS14789",
"name": "Cloudflare, Inc.",
"country": "US",
"url": "/AS14789"
},
{
"kind": "asn",
"id": "AS22061",
"name": "Cloudflare, Inc.",
"country": "US",
"url": "/AS22061"
}
]
}
{
"error": {
"status": 400,
"code": "missing_query",
"message": "Pass ?q= with an IP, an ASN or a network name.",
"request_id": "6f1c2a9e-…"
}
}
Dataset statistics
Release date, counts, coverage per field and the published files with their sizes and SHA-256 checksums.
Request
curl https://ipinfo.zip/api/stats
const res = await fetch('https://ipinfo.zip/api/stats');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/stats', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/stats")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/stats'), true);
print_r($data);
Response
{
"release": "2026-12-05",
"built_at": "2026-12-06T03:12:33.389Z",
"stats": {
"ranges": {
"v4": 22150733,
"v6": 4493094
},
"asns": 124021,
"…": "…"
},
"coverage": {
"country_code": {
"ranges": 26604023,
"ranges_pct": 100,
"ipv4_addresses": 3698827456,
"ipv4_pct": 100
},
"…": "…"
},
"files": {
"ATTRIBUTION.txt": {
"size": 4231,
"sha256": "91bcba53302ea7d6d597db40432a187e2929b8c00cd9846a553553190f8f0047"
},
"abuse.csv.gz": {
"size": 123225727,
"sha256": "f5ad025a28d056f670b9ebbf2216efa1349cbffcef5105d2055546ee0f7ba1a4",
"rows": 9041478
}
}
}
Health
200 when a release is loaded, 503 while the first build runs.
Request
curl https://ipinfo.zip/api/health
const res = await fetch('https://ipinfo.zip/api/health');
const data = await res.json();
console.log(data, res.headers.get('X-RateLimit-Remaining'));
import requests
res = requests.get('https://ipinfo.zip/api/health', timeout=10)
data = res.json()
print(data, res.headers['X-RateLimit-Remaining'])
resp, err := http.Get("https://ipinfo.zip/api/health")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data)
<?php
$data = json_decode(file_get_contents('https://ipinfo.zip/api/health'), true);
print_r($data);
Response
Reference
Record fields
Every field the IP record can contain. Absent objects mean no data; booleans are always present in the API. Click a field to try it in the request builder.
| Field | Type | Description |
|---|---|---|
| ip | string | The address you asked about, normalised (IPv6 compressed, IPv4-mapped unwrapped). |
| network | string | CIDR of the smallest range in the database that contains the address. |
| type | string | IPv4 or IPv6. |
| tags | string[] | Every true is_* flag as a short tag, in a fixed order (e.g. hosting, vpn, tor). |
| is_bogon | boolean | Reserved, private, documentation or unallocated space that should never appear on the internet. |
| is_announced | boolean | The covering prefix was visible in the global BGP table when this week's release was built. |
| is_datacenter | boolean | Hosting, cloud, colocation or CDN space. |
| is_cloud_provider | boolean | Published ranges of a public cloud (AWS, Google Cloud, Azure, Oracle…). |
| is_mobile | boolean | Cellular network (mobile carrier geofeed, carrier tag or mobile-only operator). |
| is_satellite | boolean | Satellite internet access (e.g. Starlink). |
| is_anycast | boolean | Anycast prefix: the same address is served from many places. |
| is_ixp | boolean | Internet exchange peering LAN. |
| is_crawler | boolean | Published ranges of a search engine, AI crawler or uptime monitor. |
| is_scanner | boolean | Known internet-wide scanner (research or commercial). |
| is_vpn | boolean | VPN exit server, from provider server lists and resolved hostnames. |
| is_proxy | boolean | Open or public proxy seen on proxy lists. |
| is_residential_proxy | boolean | Residential address seen relaying bot or proxy traffic recently. |
| is_tor | boolean | Tor relay (exit or not). |
| is_relay | boolean | Privacy relay egress (iCloud Private Relay, Cloudflare WARP…). |
| is_anonymous | boolean | Any of VPN, proxy, Tor or relay. |
| is_abuser | boolean | Listed by at least one abuse or blocklist feed in the last 30 days. |
| is_attacker | boolean | Listed for attacks: brute force, exploitation, scanning or botnet control. |
| is_threat | boolean | Threat score of 50 or more. |
| is_drop | boolean | Inside a Spamhaus DROP netblock or an ASN-DROP network. |
| is_mail_blocklisted | boolean | On a mail blocklist that lists the address itself (UCEPROTECT level 1, PSBL, blocklist.de mail). Network-wide listings do not set it. |
| is_leased | boolean | Leased (rented) address space: registered to one holder, announced and used by another network, often through a leasing marketplace such as IPXO. |
| usage_type | string | IP2Location-style code: DCH, CDN, ISP, MOB, COM, ORG, EDU, GOV, MIL, LIB, SES or RSV. |
| connection_type | string | How the address connects: Cable/DSL, Cellular, Satellite or Corporate. |
| user_type | string | Who uses it: residential, business, hosting, cellular, college, government, military, consumer_privacy_network, content_delivery_network or search_engine_spider. |
| rir | string | Regional internet registry: ARIN, RIPE, APNIC, LACNIC or AFRINIC. |
| hostname | string | Known server name (VPN or Tor servers only; there is no PTR crawl). |
| location.country_code | string | ISO 3166-1 alpha-2 country code. |
| location.country | string | Country name in English. |
| location.continent | string | Two-letter continent code. |
| location.state | string | State, region or province. |
| location.city | string | City. |
| location.zip | string | Postal code, when a source gives one. |
| location.latitude | number | Latitude in decimal degrees. |
| location.longitude | number | Longitude in decimal degrees. |
| location.accuracy | string | Placement confidence from the agreement between sources: COUNTRY (no city), LOW, MEDIUM, HIGH or VERY_HIGH. |
| location.accuracy_radius | number | Radius in km within which the address most likely sits. |
| location.timezone | string | IANA time zone. |
| location.local_time | string | Current local time with UTC offset (added by the API). |
| location.is_eu_member | boolean | Country is in the European Union. |
| location.currency_code | string | ISO 4217 currency of the country. |
| location.calling_code | string | International calling code. |
| asn.asn | integer | Autonomous system number announcing the address. |
| asn.name | string | Short AS name. |
| asn.org | string | Organisation holding the AS. |
| asn.domain | string | Main domain of the AS operator. |
| asn.country | string | Country the AS is registered in. |
| asn.type | string | isp, hosting, business, education, government or banking. |
| asn.rir | string | Registry of the AS. |
| asn.registered | string | Date the AS number was assigned (YYYY-MM-DD). |
| asn.rank | integer | Global rank by customer cone size (1 = largest). |
| asn.abuser_score | number | Share of the AS addresses on abuse lists (0..1). |
| asn.abuser_level | string | Label of the AS abuse rate: Very Low, Low, Elevated, High or Very High. |
| asn.route | string | Announced prefix covering the address. |
| asn.rpki_status | string | Route origin validation: valid, invalid or unknown. |
| company.name | string | Organisation the block is registered to (registry whois / RDAP). |
| company.domain | string | Main domain of that organisation. |
| company.type | string | isp, hosting, business, education, government or banking. |
| company.network | string | The registered block (start - end). |
| company.netname | string | Registry network name. |
| company.abuser_score | number | Share of the block on abuse lists (0..1). |
| company.abuser_level | string | Label of the block abuse rate: Very Low, Low, Elevated, High or Very High. |
| abuse.name | string | Abuse contact name. |
| abuse.email | string | Abuse contact e-mail. |
| abuse.phone | string | Abuse contact phone. |
| abuse.address | string | Abuse contact postal address. |
| registry.rir | string | Registry that delegated the block. |
| registry.allocated | string | Date of delegation. |
| registry.status | string | allocated or assigned. |
| registry.registrant.name | string | Registrant of the IP block. |
| routing.route | string | Announced BGP prefix. |
| routing.origin_asns | integer[] | Origin AS numbers (several when the prefix is multi-origin). |
| routing.rpki_status | string | Route origin validation against published ROAs. |
| routing.visibility | number | Share of RIPE RIS peers that see the route (0..1). |
| routing.first_seen | string | First day the prefix was seen announced. |
| routing.last_seen | string | Last day the prefix was seen announced. |
| threat.score | integer | 0–100, weighted from blocklists, DROP, Tor exits and abuse reports. |
| threat.level | string | none, low, medium, high or critical. |
| threat.categories | string[] | attacker, bruteforce, botnet_c2, spam, malware, compromised, malicious_network… |
| abuser.lists | string[] | Blocklists that currently list the address. |
| mail_blocklists | string[] | Mail blocklists that list the address, including network-wide listings (UCEPROTECT level 2) that only describe its neighbourhood. |
| privacy.service | string | VPN or relay brand when known. |
| datacenter.datacenter | string | Hosting or cloud provider name. |
| datacenter.region | string | Cloud region when published. |
| vpn.service | string | VPN brand. |
| vpn.type | string | How the VPN exit was detected: enumerated (provider list), observed, interpolated or whois. |
| proxy.type | string | open, public, http, https, socks, residential or tunnel. |
| tor.exit | boolean | The Tor relay allows exit traffic. |
| relay.service | string | Privacy relay operator. |
| carrier.name | string | Mobile carrier. |
| carrier.mcc | string | Mobile country code. |
| carrier.mnc | string | Mobile network code. |
| crawler.name | string | Crawler or monitor name. |
| scanner.name | string | Scanner organisation. |
| drop.sblid | string | Spamhaus SBL reference of the DROP entry. |
| lease.broker | string | Leasing marketplace or lessor named in the registry object (e.g. IPXO), when known. |
| lease.network | string | The leased block as registered (the lessee's sub-allocation). |
| lease.registry_country | string | Country of the holder's allocation. For leased space it often differs from where the block is used. |
| lease.holder_country | string | Country written on the leased block's own registry object (IPXO uses EU). |
| abuse_density.subnet24_ips | integer | Announced addresses in this address's /24. |
| abuse_density.subnet24_abusive | integer | Addresses of this /24 flagged as abusive (abuser, attacker, threat, DROP or mail blocklist). |
| abuse_density.subnet24_abusive_share | number | subnet24_abusive / subnet24_ips, from 0 to 1. |
| abuse_density.asn_ips | integer | Announced IPv4 addresses of the origin AS. |
| abuse_density.asn_abusive | integer | IPv4 addresses of the origin AS flagged as abusive. |
| abuse_density.asn_abusive_share | number | asn_abusive / asn_ips, from 0 to 1. |
| release | string | Release date of the dataset that answered (YYYY-MM-DD). |
| elapsed_ms | number | Server-side lookup time in milliseconds. |
MCP server
The same data is available to AI agents over the Model Context Protocol (Streamable HTTP, no authentication). Add it to any MCP client with the endpoint below.
| Tool | Arguments | Description |
|---|---|---|
| lookup_ip | ip | Look up an IPv4 or IPv6 address: geolocation, ASN, company, abuse contact, privacy (VPN/proxy/Tor/relay), hosting, leasing, abuse density of its /24 and AS, threat score and tags. |
| lookup_asn | asn | Profile of an autonomous system: owner, registry contacts, prefixes with RPKI status, upstreams/peers/downstreams, abuse rate, rank and PeeringDB traffic data. |
| search_networks | query | Search autonomous systems by number, name, organisation or domain. |
| whois_lookup | handle, ip, asn, depth | Registry (whois / RDAP) objects and how they link: give a handle, an AS number or a network for the object and its links, or an IP / AS for the graph around it. Private persons appear only as redacted handles. |
| get_dataset_stats | — | Current release of the dataset (rebuilt every Monday): date, record counts, coverage per field and downloadable files. |
claude mcp add --transport http ipinfo-zip https://ipinfo.zip/mcp
curl -X POST https://ipinfo.zip/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"lookup_ip","arguments":{"ip":"1.1.1.1"}}}'
Downloads
The whole database, rebuilt every Monday, as MMDB, CSV, NDJSON, a compressed SQLite database and a portable SQL dump. Files, sizes and checksums are listed on Download.
Big files are served compressed only (.gz): the MMDB and the SQLite database come as ipinfo.mmdb.gz and ipinfo.sqlite.gz. Unpack them with gunzip once downloaded.
# list files, sizes and checksums
curl 'https://ipinfo.zip/download?format=json'
# latest MMDB
curl -LO https://ipinfo.zip/download/ipinfo.mmdb.gz
gunzip ipinfo.mmdb.gz
# query it locally
mmdbctl read 8.8.8.8 ipinfo.mmdb
For agents and crawlers
Machine-readable descriptions of the site and the API, for search engines and AI agents.