IP geolocation API, blacklist and MAC vendor API
Three JSON APIs on one key: the location and network of any IPv4 or IPv6 address, whether an address was reported for abuse, and the manufacturer of a MAC address.
IPIDB answers every lookup from its own database of 6,094,291 IPv4 ranges and 306,432 IPv6 ranges across 250 countries and territories. The routing tables behind the network fields are refreshed daily. The base address is https://api.ipidb.com/v1, authentication is a key in the X-API-Key header, and every response is JSON with a success flag, so errors are as easy to handle as results.
IP geolocation API
GET /v1/ip/{ip} returns 42 fields for an address. Without an address it looks up the address the request comes from, which is how you get the location of a visitor in one call. The free plan returns the location, the time zone and the core network fields; paid plans return the same objects with more keys plus security, abuse and country data.
Location
Continent, country with its ISO code, region, city, district where known, postal code, coordinates and accuracy_radius_km, the radius in which the real location is expected to fall. A small radius means the city can be trusted; a large one means only the country should be. is_eu tells you whether the country is an EU member, which is handy for consent banners. The article on the accuracy radius explains how to use it.
| Field | Plan | Description |
|---|---|---|
location.continent | Free | Continent |
location.continent_code | Free | Continent code |
location.country | Free | Country |
location.country_code | Free | ISO 3166-1 alpha-2 code |
location.region | Free | Region or state |
location.city | Free | City |
location.district | Free | District within the city, where known |
location.postal_code | Free | Postal code |
location.latitude | Free | Latitude of the estimated location |
location.longitude | Free | Longitude of the estimated location |
location.accuracy_radius_km | Free | Radius the location is expected to fall in |
location.location_level | Free | How precise the location is: city, region or country. Without a city the coordinates are the centre of the region or country |
location.is_eu | Free | Country is an EU member |
location.address | Paid | Street address of the datacenter or office, where known |
Network
The autonomous system that announces the address, the ISP, the registered organisation, its website and the connection type, such as broadband, mobile, hosting, business or education. Paid plans add the AS name, the parent company, reverse DNS, the exact block the address belongs to, the RPKI state of its route and anycast details.
| Field | Plan | Description |
|---|---|---|
network.asn | Free | Autonomous system announcing the address |
network.isp | Free | Service provider |
network.organization | Free | Registered organisation |
network.domain | Free | Website of the provider |
network.connection_type | Free | isp, cable, mobile, hosting, business, education and others |
network.asn_name | Paid | Registered name of the AS |
network.holding | Paid | Parent company of the provider |
network.usage | Paid | What the range is used for |
network.hostname | Paid | Reverse DNS name |
network.range | Paid | The block the address belongs to |
network.rpki | Paid | RPKI state of the announcement |
network.anycast | Paid | Anycast prefix, sites and countries |
Time zone, security and abuse
The IANA time zone comes on every plan; paid plans add the current offset, daylight saving time and the local time. The security object marks VPN services by name, open proxies, Tor exit nodes, datacenter ranges and addresses on the blacklist with a confidence score. The abuse object gives the contact to report an attack to.
| Field | Plan | Description |
|---|---|---|
timezone.id | Free | IANA time zone |
timezone.utc_offset | Paid | Current UTC offset |
timezone.is_dst | Paid | Daylight saving time in effect |
timezone.current_time | Paid | Local time (ISO 8601) |
security.is_vpn | Paid | Address belongs to a VPN service |
security.vpn_provider | Paid | Which VPN service |
security.is_proxy | Paid | Open proxy |
security.is_tor | Paid | Tor exit node |
security.is_hosting | Paid | Datacenter or hosting range |
security.is_threat | Paid | Listed on the blacklist |
security.threat_confidence | Paid | Blacklist confidence, 0 to 100 |
abuse.email | Paid | Abuse contact of the network |
Add ?fields= to receive only the paths you need, for example ?fields=location.country_code,timezone.id. Paid plans can look up up to 100 addresses per request on Starter and Pro, and 1,000 on Business, with POST /v1/ip/batch.
curl https://api.ipidb.com/v1/ip/8.8.8.8 \
-H "X-API-Key: YOUR_API_KEY"import requests r = requests.get("https://api.ipidb.com/v1/ip/8.8.8.8", headers={"X-API-Key": "YOUR_API_KEY"}, timeout=10) data = r.json() if data["success"]: print(data["location"]["city"], data["network"]["isp"]) else: print(r.status_code, data["error"]["code"])
const r = await fetch("https://api.ipidb.com/v1/ip/8.8.8.8", { headers: { "X-API-Key": "YOUR_API_KEY" } }); const data = await r.json(); if (data.success) { console.log(data.location.city, data.network.isp); } else { console.error(r.status, data.error.code); }
<?php $ch = curl_init("https://api.ipidb.com/v1/ip/8.8.8.8"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 10, CURLOPT_HTTPHEADER => ["X-API-Key: YOUR_API_KEY"], ]); $data = json_decode(curl_exec($ch), true); if (!empty($data["success"])) { echo $data["location"]["city"], " ", $data["network"]["isp"], "\n"; } else { echo $data["error"]["code"], "\n"; }
package main import ( "encoding/json" "fmt" "net/http" ) func main() { req, _ := http.NewRequest("GET", "https://api.ipidb.com/v1/ip/8.8.8.8", nil) req.Header.Set("X-API-Key", "YOUR_API_KEY") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() var data struct { Success bool `json:"success"` Location struct { City string `json:"city"` } `json:"location"` Network struct { ISP string `json:"isp"` } `json:"network"` } json.NewDecoder(res.Body).Decode(&data) fmt.Println(data.Location.City, data.Network.ISP) }
IP blacklist API
GET /v1/blacklist/{ip} tells you whether an address was reported for brute-force attacks against logins, spam, port scanning or attacks on web applications. The answer carries the threat type, a confidence from 0 to 100 and when the address was last seen. Paid plans add the number of reports and the most recent ones, and a batch endpoint for checking many addresses at once.
Typical uses are slowing down or challenging a login attempt from a reported address, scoring sign-ups, and adding context to firewall and server logs. The free plan includes 1,000 blacklist checks a day on top of the IP lookups.
{
"success": true,
"ip": "193.46.255.86",
"listed": true,
"threat_type": "brute-force",
"confidence": 85,
"last_seen": "2026-11-24 16:10:12"
}MAC vendor API
GET /v1/mac/{mac} returns the registered manufacturer of a MAC address or prefix. Any common notation works: colons, dashes, Cisco dots or just the first six hex digits. The answer also says whether the address is multicast, locally administered or randomised, which modern phones use for privacy on Wi-Fi. Paid plans add the registry block, the vendor's address, detection of virtual machine interfaces and GET /v1/mac/search to list the prefixes of a company.
Network inventories, DHCP and Wi-Fi logs, and device onboarding use it to put a name to an unknown device.
Plans, limits and keys
The free plan gives 1,000 IP lookups, 1,000 blacklist checks and 1,000 MAC lookups a day at one request per second, with no card. Paid plans have a monthly quota shared by the three APIs, higher request rates, more keys and commercial use; see pricing for the exact numbers. When a limit is reached the API answers 429 with a clear error code and nothing is charged on top. Keys can be limited to your website domains or to your server addresses in the dashboard, and every response carries headers with the remaining quota.
If you need the data inside your own systems rather than over HTTP, see database licences.
Start in a few minutes
Create a free account, copy the key and run the curl line above. The tutorials show complete examples in PHP, Python, Node.js and Go, and the documentation covers every endpoint and error code.
Questions about the API
Do I need a separate key for each API?
No. One key works for IP data, blacklist checks and MAC vendor lookups. On paid plans the three APIs share one monthly quota.
Which plan do I need for VPN and proxy flags?
Any paid plan. The free plan returns location, time zone and network; Starter, Pro and Business add the security object, the abuse contact, reverse DNS, the IP range and country details.
Does the API work with IPv6?
Yes. Every endpoint accepts IPv4 and IPv6 addresses in any common notation, and the response has the same shape for both.
More answers are in the FAQ.