Riferimento API · v2 · gratuita
L’API di IPINFO.ZIP
Un’API JSON sullo stesso database settimanale che puoi scaricare. Nessuna chiave, nessuna registrazione, nessun SDK: una GET per indirizzo.
https://ipinfo.zip/api
openapi.jsonllms.txtServer MCPProvalaCostruttore di richiestecurl ipinfo.zip
GETipinfo.zip/apibase/8.8.8.8indirizzo/asn.namecampo?format=textformato
200 OK · text/plainGoogle LLC
- 0
- chiavi API da creare
- 120
- ricerche al minuto, per IP
- 6
- formati di risposta
In questa pagina Introduzione
Primi passi
Introduzione
Ogni endpoint si trova sotto /api e risponde in JSON, salvo richiesta diversa. I record provengono dalla release corrente, ricostruita ogni lunedì; l’header X-Release indica quale ha risposto.
Non c’è nulla da configurare. Invia una richiesta da un terminale, un browser, un server o un agente e leggi il risultato.
- 1Scegli un indirizzo. Qualsiasi indirizzo IPv4 o IPv6, oppure nessuno per ottenere il tuo.
- 2Chiama l’API. GET /api/{ip}. Aggiungi ?format=csv o un altro formato se il JSON non ti serve.
- 3Controlla gli header. X-RateLimit-Remaining indica quante richieste restano su quell’endpoint in questo minuto.
- Formato
- JSON per impostazione predefinita; XML, YAML, CSV, testo e markdown su richiesta.
- Errori
- JSON con un codice macchina stabile e un messaggio leggibile.
- Versioni
- In v2 i campi vengono solo aggiunti; ogni modifica incompatibile riceve un nuovo percorso.
# il tuo indirizzo
curl https://ipinfo.zip/api/me
# qualsiasi indirizzo
curl https://ipinfo.zip/api/8.8.8.8
# lo stesso record in CSV
curl 'https://ipinfo.zip/api/8.8.8.8?format=csv'
# un singolo campo, come testo semplice
curl 'https://ipinfo.zip/api/8.8.8.8/asn.name?format=text'
curl ipinfo.zip
Da un terminale
In una shell puoi saltare /api: curl, Wget, HTTPie, xh, PowerShell e le solite librerie HTTP ricevono dati direttamente dagli indirizzi del sito. I browser continuano a ricevere le pagine.
curl ipinfo.zip- Il tuo record, in JSON
curl ipinfo.zip/ip - Il tuo indirizzo IP, in testo semplice
curl ipinfo.zip/location.city - Un campo del tuo record, in testo semplice
curl ipinfo.zip/8.8.8.8 - Il record di qualsiasi indirizzo, in JSON
curl ipinfo.zip/8.8.8.8/ asn.name - Un campo di quel record, in testo semplice
curl ipinfo.zip/AS13335 - Il profilo di un sistema autonomo
curl 'ipinfo.zip/1.1.1.1? format=yaml' - Qualsiasi formato, con ?format= o Accept
- Un valore singolo viene stampato come testo semplice seguito da un a capo, così finisce direttamente in una variabile della shell. Aggiungi ?format=json per avere JSON.
- Una richiesta conta come terminale quando il suo User-Agent è un client a riga di comando, o quando l’header Accept chiede JSON, XML, YAML, CSV o testo semplice e non HTML.
- Stesse risposte, errori e limiti di /api: il bucket me per il tuo record, lookup per un campo o un altro indirizzo.
- Nel codice preferisci i percorsi /api/…: rispondono allo stesso modo chiunque chieda.
# il tuo record (qui abbreviato)
$ 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."
},
"…": "…"
}
# solo il tuo indirizzo
$ curl ipinfo.zip/ip
1.1.1.1
# un campo, in testo semplice
$ curl ipinfo.zip/8.8.8.8/asn.name
Google LLC
# direttamente in una variabile
$ city=$(curl -s ipinfo.zip/2.26.145.96/location.city)
$ echo "$city"
Paris
# qualsiasi formato
$ 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
Formati e negoziazione del contenuto
Scegli il formato con ?format=, oppure con l’header Accept quando ?format= è assente. Senza nessuno dei due, la risposta è in JSON.
| format= | Accept | Note |
|---|---|---|
| json | application/json | Predefinito. Formattato per la lettura. |
| xml | application/xml | Un elemento per campo, array come elenchi di item. |
| yaml | application/yaml | Stile a blocchi, con virgolette dove ambiguo. |
| csv | text/csv | Riga di intestazione più una riga per record; campi annidati appiattiti con punti. |
| text | text/plain | Righe chiave: valore; con /{ip}/{field}, il valore semplice. |
| md | text/markdown | Una tabella markdown, comoda per agenti e chat. |
Ogni pagina HTML di questo sito è disponibile anche in markdown: invia Accept: text/markdown o aggiungi .md al percorso.
curl -H 'Accept: text/csv' https://ipinfo.zip/api/1.1.1.1
curl 'https://ipinfo.zip/api/1.1.1.1?format=yaml'
# anche le pagine: invia Accept: text/markdown
curl -H 'Accept: text/markdown' https://ipinfo.zip/faq
Limiti di richieste
I limiti sono conteggiati per IP del client (IPv6 per /56) e separatamente per ogni endpoint, così un uso intenso di uno non blocca mai gli altri. Ogni risposta ti dice a che punto sei.
| Bucket | Endpoint | Limite |
|---|---|---|
| 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 (fino a 100 IP ciascuna) | 10 / min |
| search | GET /api/search | 90 / min |
| stats | GET /api/stats | 60 / min |
| download | GET /download/* | 30 / ora |
| page | Pagine HTML e markdown | 240 / min |
| agent | llms.txt, openapi, mcp | 120 / min |
X-RateLimit-Limit, X-RateLimit-Remaining e X-RateLimit-Reset sono inviati in ogni risposta, insieme agli header IETF RateLimit e RateLimit-Policy. Una risposta 429 include Retry-After. Ti serve di più? Scarica il database e interrogalo in locale.
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
Errori
Gli errori sono oggetti JSON con lo stato HTTP, un codice stabile su cui basare la logica, un messaggio per le persone e un request_id da citare quando ci contatti.
| Stato | code | Quando | Ripetibile |
|---|---|---|---|
| 400 | invalid_ip | Il percorso non è un indirizzo IPv4 o IPv6 valido. | No |
| 400 | invalid_format | ?format= non è uno dei sei formati. | No |
| 400 | invalid_asn | Il numero AS è fuori intervallo. | No |
| 404 | asn_not_found | L’AS non è nella release attuale. | No |
| 404 | asn_reserved | Il numero è riservato (uso privato, documentazione, AS_TRANS…) e non identifica alcuna rete. | No |
| 404 | unknown_field | Il record non ha questo campo per questo indirizzo. | No |
| 410 | file_withheld | È stato chiesto un file non compresso: scarica la sua versione .gz (l’errore indica quale). | No |
| 413 | batch_too_large | Più di 100 indirizzi in un solo batch. | No |
| 429 | rate_limited | Il limite dell’endpoint è stato raggiunto per il tuo IP. | Sì |
| 500 | internal_error | Un bug da parte nostra. È stato segnalato. | Sì |
| 503 | not_ready | Nessuna release è ancora caricata (prima build). | Sì |
{
"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-…"
}
}
Cerca il tuo IP
Restituisce il record dell’indirizzo da cui proviene la richiesta. Dietro un proxy, è l’indirizzo del proxy.
- Mai memorizzato nelle cache condivise: la risposta dipende da chi chiede.
- Stessa struttura del record di GET /{ip}.
Richiesta
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);
Risposta
{
"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-…"
}
}
Cerca un indirizzo IP
Il record completo di un indirizzo IPv4 o IPv6: posizione, rete, azienda, contatto abuse, flag di privacy e minaccia, routing.
- Gli indirizzi IPv6 mappati IPv4 (::ffff:1.2.3.4) vengono convertiti.
- network è l’intervallo più piccolo del database che contiene l’indirizzo.
- Gli indirizzi sconosciuti o non annunciati rispondono 200 con found: false.
Parametri
| Campo | Tipo | Descrizione |
|---|---|---|
| ip Obbligatoriopath | string | Indirizzo IPv4 o IPv6. |
| formatquery | json | xml | yaml | csv | text | md | Formato della risposta. Ha la precedenza sull’header Accept. Predefinito: json. |
Richiesta
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);
Risposta
{
"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-06T09:09:34-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.234
}
{
"error": {
"status": 400,
"code": "invalid_ip",
"message": "\"not-an-ip\" is not a valid IPv4 or IPv6 address.",
"request_id": "6f1c2a9e-…"
}
}
Leggi un singolo campo
Estrae un campo del record tramite un percorso puntato. Utile in script shell e fogli di calcolo.
- ?format=text restituisce il valore semplice, senza JSON.
- I percorsi sconosciuti rispondono 404 unknown_field.
Parametri
| Campo | Tipo | Descrizione |
|---|---|---|
| ip Obbligatoriopath | string | Indirizzo IPv4 o IPv6. |
| field Obbligatoriopath | string | Percorso puntato, ad es. location.country_code o asn.name. |
| formatquery | json | xml | yaml | csv | text | md | Formato della risposta. Ha la precedenza sull’header Accept. Predefinito: json. |
Richiesta
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);
Risposta
Profilo di un sistema autonomo
Titolare, identità e contatti nel registro, prefissi annunciati con RPKI e visibilità, upstream, peer e downstream, classifica, tasso di abuso e dati PeeringDB.
- Sono inclusi i numeri AS registrati ma non annunciati.
- I vicini provengono dall’inferenza pubblica delle relazioni BGP.
Parametri
| Campo | Tipo | Descrizione |
|---|---|---|
| number Obbligatoriopath | integer | Numero AS, con o senza il prefisso AS. |
| formatquery | json | xml | yaml | csv | text | md | Formato della risposta. Ha la precedenza sull’header Accept. Predefinito: json. |
Richiesta
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);
Risposta
{
"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-…"
}
}
Cerca fino a 100 indirizzi
Una richiesta, fino a 100 indirizzi. La risposta è un array nello stesso ordine; gli elementi non riusciti contengono un oggetto di errore.
- Body: un array JSON, {"ips": [...]}, oppure un indirizzo per riga come text/plain.
- I duplicati vengono rimossi.
Parametri
| Campo | Tipo | Descrizione |
|---|---|---|
| body Obbligatoriobody | string[] (≤ 100) | Gli indirizzi da cercare. |
| formatquery | json | xml | yaml | csv | text | md | Formato della risposta. Ha la precedenza sull’header Accept. Predefinito: json. |
Richiesta
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";
Risposta
[
{
"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-…"
}
}
Cerca reti
Trova un IP, un numero AS o sistemi autonomi per nome, organizzazione o dominio.
Parametri
| Campo | Tipo | Descrizione |
|---|---|---|
| q Obbligatorioquery | string | Testo libero, un IP o un numero AS. |
| formatquery | json | xml | yaml | csv | text | md | Formato della risposta. Ha la precedenza sull’header Accept. Predefinito: json. |
Richiesta
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);
Risposta
{
"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-…"
}
}
Statistiche del dataset
Data della release, conteggi, copertura per campo e i file pubblicati con dimensione e checksum SHA-256.
Richiesta
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);
Risposta
{
"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
}
}
}
Stato
200 quando una release è caricata, 503 durante la prima build.
Richiesta
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);
Risposta
Riferimento
Campi del record
Tutti i campi che il record IP può contenere. Gli oggetti assenti indicano assenza di dati; i booleani sono sempre presenti nell’API. Fai clic su un campo per provarlo nel costruttore di richieste.
| Campo | Tipo | Descrizione |
|---|---|---|
| ip | string | L’indirizzo richiesto, normalizzato (IPv6 compresso, IPv4 mappato estratto). |
| network | string | CIDR dell’intervallo più piccolo del database che contiene l’indirizzo. |
| type | string | IPv4 o IPv6. |
| tags | string[] | Ogni flag is_* vero come tag breve, in ordine fisso (ad es. hosting, vpn, tor). |
| is_bogon | boolean | Spazio riservato, privato, di documentazione o non allocato che non dovrebbe mai comparire su internet. |
| is_announced | boolean | Il prefisso che lo contiene era visibile nella tabella BGP globale quando è stata generata la release di questa settimana. |
| is_datacenter | boolean | Spazio di hosting, cloud, colocation o CDN. |
| is_cloud_provider | boolean | Intervalli pubblicati di un cloud pubblico (AWS, Google Cloud, Azure, Oracle…). |
| is_mobile | boolean | Rete cellulare (geofeed di un operatore mobile, tag dell’operatore o operatore solo mobile). |
| is_satellite | boolean | Accesso a internet via satellite (ad es. Starlink). |
| is_anycast | boolean | Prefisso anycast: lo stesso indirizzo è servito da molti luoghi. |
| is_ixp | boolean | LAN di peering di un internet exchange. |
| is_crawler | boolean | Intervalli pubblicati di un motore di ricerca, di un crawler AI o di un servizio di monitoraggio uptime. |
| is_scanner | boolean | Scanner noto che sonda l’intera internet (di ricerca o commerciale). |
| is_vpn | boolean | Server di uscita VPN, dagli elenchi di server dei provider e da hostname risolti. |
| is_proxy | boolean | Proxy aperto o pubblico presente negli elenchi di proxy. |
| is_residential_proxy | boolean | Indirizzo residenziale visto di recente inoltrare traffico di bot o proxy. |
| is_tor | boolean | Relay Tor (di uscita o no). |
| is_relay | boolean | Uscita di un relay per la privacy (iCloud Private Relay, Cloudflare WARP…). |
| is_anonymous | boolean | Uno qualsiasi tra VPN, proxy, Tor o relay. |
| is_abuser | boolean | Presente in almeno un feed di abusi o blocklist negli ultimi 30 giorni. |
| is_attacker | boolean | Segnalato per attacchi: forza bruta, sfruttamento di vulnerabilità, scansioni o controllo di botnet. |
| is_threat | boolean | Punteggio di minaccia pari o superiore a 50. |
| is_drop | boolean | All’interno di un netblock Spamhaus DROP o di una rete ASN-DROP. |
| is_mail_blocklisted | boolean | In una blocklist e-mail che elenca l’indirizzo stesso (UCEPROTECT livello 1, PSBL, blocklist.de mail). Gli elenchi di intere reti non lo attivano. |
| is_leased | boolean | Spazio di indirizzi in locazione: registrato a un titolare, annunciato e usato da un’altra rete, spesso tramite un marketplace di noleggio come IPXO. |
| usage_type | string | Codice in stile IP2Location: DCH, CDN, ISP, MOB, COM, ORG, EDU, GOV, MIL, LIB, SES o RSV. |
| connection_type | string | Come si connette l’indirizzo: Cable/DSL, Cellular, Satellite o Corporate. |
| user_type | string | Chi lo usa: residential, business, hosting, cellular, college, government, military, consumer_privacy_network, content_delivery_network o search_engine_spider. |
| rir | string | Registro internet regionale: ARIN, RIPE, APNIC, LACNIC o AFRINIC. |
| hostname | string | Nome di server noto (solo server VPN o Tor; non viene effettuata alcuna scansione PTR). |
| location.country_code | string | Codice paese ISO 3166-1 alpha-2. |
| location.country | string | Nome del paese in inglese. |
| location.continent | string | Codice del continente di due lettere. |
| location.state | string | Stato, regione o provincia. |
| location.city | string | Città. |
| location.zip | string | Codice postale, quando una fonte lo fornisce. |
| location.latitude | number | Latitudine in gradi decimali. |
| location.longitude | number | Longitudine in gradi decimali. |
| location.accuracy | string | Affidabilità della posizione in base all’accordo tra le fonti: COUNTRY (senza città), LOW, MEDIUM, HIGH o VERY_HIGH. |
| location.accuracy_radius | number | Raggio in km entro cui si trova più probabilmente l’indirizzo. |
| location.timezone | string | Fuso orario IANA. |
| location.local_time | string | Ora locale attuale con offset UTC (aggiunta dall’API). |
| location.is_eu_member | boolean | Il paese fa parte dell’Unione europea. |
| location.currency_code | string | Valuta ISO 4217 del paese. |
| location.calling_code | string | Prefisso telefonico internazionale. |
| asn.asn | integer | Numero del sistema autonomo che annuncia l’indirizzo. |
| asn.name | string | Nome breve dell’AS. |
| asn.org | string | Organizzazione titolare dell’AS. |
| asn.domain | string | Dominio principale dell’operatore dell’AS. |
| asn.country | string | Paese in cui è registrato l’AS. |
| asn.type | string | isp, hosting, business, education, government o banking. |
| asn.rir | string | Registro dell’AS. |
| asn.registered | string | Data di assegnazione del numero AS (YYYY-MM-DD). |
| asn.rank | integer | Classifica globale per dimensione del cono dei clienti (1 = il più grande). |
| asn.abuser_score | number | Quota di indirizzi dell’AS presenti in liste di abusi (0..1). |
| asn.abuser_level | string | Etichetta del tasso di abuso dell’AS: Very Low, Low, Elevated, High o Very High. |
| asn.route | string | Prefisso annunciato che contiene l’indirizzo. |
| asn.rpki_status | string | Route origin validation: valid, invalid o unknown. |
| company.name | string | Organizzazione a cui è registrato il blocco (whois / RDAP del registro). |
| company.domain | string | Dominio principale di tale organizzazione. |
| company.type | string | isp, hosting, business, education, government o banking. |
| company.network | string | Il blocco registrato (inizio - fine). |
| company.netname | string | Nome di rete nel registro. |
| company.abuser_score | number | Quota del blocco presente in liste di abusi (0..1). |
| company.abuser_level | string | Etichetta del tasso di abuso del blocco: Very Low, Low, Elevated, High o Very High. |
| abuse.name | string | Nome del contatto abuse. |
| abuse.email | string | E-mail del contatto abuse. |
| abuse.phone | string | Telefono del contatto abuse. |
| abuse.address | string | Indirizzo postale del contatto abuse. |
| registry.rir | string | Registro che ha delegato il blocco. |
| registry.allocated | string | Data della delega. |
| registry.status | string | allocated o assigned. |
| registry.registrant.name | string | Assegnatario del blocco IP. |
| routing.route | string | Prefisso BGP annunciato. |
| routing.origin_asns | integer[] | Numeri AS di origine (più di uno quando il prefisso è multi-origin). |
| routing.rpki_status | string | Route origin validation rispetto ai ROA pubblicati. |
| routing.visibility | number | Quota di peer RIPE RIS che vedono la rotta (0..1). |
| routing.first_seen | string | Primo giorno in cui il prefisso è stato visto annunciato. |
| routing.last_seen | string | Ultimo giorno in cui il prefisso è stato visto annunciato. |
| threat.score | integer | 0–100, ponderato da blocklist, DROP, nodi di uscita Tor e segnalazioni di abuso. |
| threat.level | string | none, low, medium, high o critical. |
| threat.categories | string[] | attacker, bruteforce, botnet_c2, spam, malware, compromised, malicious_network… |
| abuser.lists | string[] | Blocklist che elencano attualmente l’indirizzo. |
| mail_blocklists | string[] | Blocklist e-mail che elencano l’indirizzo, compresi gli elenchi di intere reti (UCEPROTECT livello 2) che descrivono solo il suo vicinato. |
| privacy.service | string | Marchio della VPN o del relay, se noto. |
| datacenter.datacenter | string | Nome del provider di hosting o cloud. |
| datacenter.region | string | Regione cloud, se pubblicata. |
| vpn.service | string | Marchio della VPN. |
| vpn.type | string | Come è stata rilevata l’uscita VPN: enumerated (elenco del provider), observed, interpolated o whois. |
| proxy.type | string | open, public, http, https, socks, residential o tunnel. |
| tor.exit | boolean | Il relay Tor consente traffico in uscita. |
| relay.service | string | Operatore del relay per la privacy. |
| carrier.name | string | Operatore mobile. |
| carrier.mcc | string | Codice paese mobile (MCC). |
| carrier.mnc | string | Codice di rete mobile (MNC). |
| crawler.name | string | Nome del crawler o del servizio di monitoraggio. |
| scanner.name | string | Organizzazione che gestisce lo scanner. |
| drop.sblid | string | Riferimento Spamhaus SBL della voce DROP. |
| lease.broker | string | Marketplace o locatore indicato nell’oggetto del registro (ad es. IPXO), se noto. |
| lease.network | string | Il blocco in locazione come registrato (la sotto-allocazione del locatario). |
| lease.registry_country | string | Paese dell’allocazione del titolare. Per lo spazio in locazione spesso differisce dal paese d’uso. |
| lease.holder_country | string | Paese indicato nell’oggetto di registro del blocco in locazione (IPXO usa EU). |
| abuse_density.subnet24_ips | integer | Indirizzi annunciati nel /24 di questo indirizzo. |
| abuse_density.subnet24_abusive | integer | Indirizzi di questo /24 segnalati come abusivi (abuso, attacco, minaccia, DROP o blocklist e-mail). |
| abuse_density.subnet24_abusive_share | number | subnet24_abusive / subnet24_ips, da 0 a 1. |
| abuse_density.asn_ips | integer | Indirizzi IPv4 annunciati dall’AS di origine. |
| abuse_density.asn_abusive | integer | Indirizzi IPv4 dell’AS di origine segnalati come abusivi. |
| abuse_density.asn_abusive_share | number | asn_abusive / asn_ips, da 0 a 1. |
| release | string | Data della release del dataset che ha risposto (YYYY-MM-DD). |
| elapsed_ms | number | Tempo di ricerca lato server in millisecondi. |
Server MCP
Gli stessi dati sono disponibili agli agenti AI tramite il Model Context Protocol (Streamable HTTP, senza autenticazione). Aggiungilo a qualsiasi client MCP con l’endpoint qui sotto.
| Tool | Argomenti | Descrizione |
|---|---|---|
| lookup_ip | ip | Cerca un indirizzo IPv4 o IPv6: geolocalizzazione, ASN, azienda, contatto abuse, privacy (VPN, proxy, Tor, relay), hosting, leasing, densità di abusi del suo /24 e del suo AS, punteggio di minaccia e tag. |
| lookup_asn | asn | Profilo di un sistema autonomo: titolare, contatti del registro, prefissi con stato RPKI, upstream, peer e downstream, tasso di abusi, posizione e dati di traffico PeeringDB. |
| search_networks | query | Cerca sistemi autonomi per numero, nome, organizzazione o dominio. |
| whois_lookup | handle, ip, asn, depth | Oggetti di registro (whois / RDAP) e i loro collegamenti: indica un handle, un numero AS o una rete per l’oggetto e i suoi collegamenti, oppure un IP / un AS per il grafo che lo circonda. Le persone private compaiono solo come handle oscurati. |
| get_dataset_stats | — | Release corrente del dataset (ricostruito ogni lunedì): data, numero di record, copertura per campo e file scaricabili. |
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"}}}'
Download
L’intero database, ricostruito ogni lunedì, in MMDB, CSV, NDJSON, un database SQLite compresso e un dump SQL portabile. File, dimensioni e checksum sono elencati in Download.
I file grandi sono serviti solo compressi (.gz): l’MMDB e il database SQLite sono ipinfo.mmdb.gz e ipinfo.sqlite.gz. Decomprimili con gunzip dopo il download.
# elenco di file, dimensioni e checksum
curl 'https://ipinfo.zip/download?format=json'
# MMDB più recente
curl -LO https://ipinfo.zip/download/ipinfo.mmdb.gz
gunzip ipinfo.mmdb.gz
# interrogalo in locale
mmdbctl read 8.8.8.8 ipinfo.mmdb
Per agenti e crawler
Descrizioni leggibili dalle macchine del sito e dell’API, per motori di ricerca e agenti AI.