---
title: "Free IP Lookup API: Docs, Endpoints & Examples"
description: "Free IP geolocation and ASN API with no key: endpoints, parameters, JSON/CSV/XML/YAML formats, rate limits, error codes, every field and the MCP server."
url: https://ipinfo.zip/api-documentation
lang: en
release: 2026-12-05
agent:
  instructions: "Search IP addresses, AS numbers and network names across this site instead of crawling pages. Results are returned in Markdown."
  endpoint: "https://ipinfo.zip/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://ipinfo.zip/llms.txt"
  api: "https://ipinfo.zip/openapi.json"
---
# 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.

Base: https://ipinfo.zip/api · OpenAPI: https://ipinfo.zip/openapi.json

## 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.

## 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.

## Formats and content negotiation

Choose the format with ?format=, or with the Accept header when ?format= is absent. Without either, the answer is JSON.

## 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 | scope | 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 |

## 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.

- `400 invalid_ip`: The path is not a valid IPv4 or IPv6 address.
- `400 invalid_format`: ?format= is not one of the six formats.
- `400 invalid_asn`: The AS number is out of range.
- `404 asn_not_found`: The AS is not in the current release.
- `404 asn_reserved`: The number is reserved (private use, documentation, AS_TRANS…) and identifies no network.
- `404 unknown_field`: The record has no such field for this address.
- `410 file_withheld`: An uncompressed file was asked for: download its .gz instead (the error says which).
- `413 batch_too_large`: More than 100 addresses in one batch.
- `429 rate_limited`: The endpoint limit is reached for your IP.
- `500 internal_error`: A bug on our side. It has been reported.
- `503 not_ready`: No release is loaded yet (first build).

## GET /api/me — 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}.

Limit: 240 / min

```shell
curl https://ipinfo.zip/api/me
```

## GET /api/{ip} — 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.

Limit: 120 / min

```shell
curl https://ipinfo.zip/api/8.8.8.8
```

## GET /api/{ip}/{field} — 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.

Limit: 120 / min

```shell
curl https://ipinfo.zip/api/8.8.8.8/location.country_code
```

## GET /api/AS{number} — 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.

Limit: 60 / min

```shell
curl https://ipinfo.zip/api/AS13335
```

## POST /api/batch — 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.

Limit: 10 / min

```shell
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"]'
```

## GET /api/search — Search networks

Finds an IP, an AS number, or autonomous systems by name, organisation or domain.


Limit: 90 / min

```shell
curl https://ipinfo.zip/api/search?q=cloudflare
```

## GET /api/stats — Dataset statistics

Release date, counts, coverage per field and the published files with their sizes and SHA-256 checksums.


Limit: 60 / min

```shell
curl https://ipinfo.zip/api/stats
```

## GET /api/health — Health

200 when a release is loaded, 503 while the first build runs.


Limit: 60 / min

```shell
curl https://ipinfo.zip/api/health
```

## Record fields

| 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.

Endpoint: https://ipinfo.zip/mcp

- `lookup_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`: Profile of an autonomous system: owner, registry contacts, prefixes with RPKI status, upstreams/peers/downstreams, abuse rate, rank and PeeringDB traffic data.
- `search_networks`: Search autonomous systems by number, name, organisation or domain.
- `whois_lookup`: 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.

## 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 https://ipinfo.zip/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.
