Skip to content
OSINTtools.io

DB-IP API

IP geolocation and ISP database with a lookup site, an API and free monthly Lite downloads under CC BY.

Base URL
https://api.db-ip.com/v2
Sign-in
No key
Free tier
Free tier
Format
REST
Endpoints
5

Compiled by OSINTtools.io editors from db-ip.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

The DB-IP API returns geolocation and network details for an IP address: country, region, city, coordinates, time zone, AS number and name, ISP, and on higher plans proxy and threat flags. An investigator uses it to place an address and see who runs the network.

Calls are plain GET requests with the key in the URL path. The key free works without signing up, over HTTP only; HTTPS needs a paid key. Responses are JSON. Quota is counted per day, and the docs give no per-second limit.

The AS endpoints need a Core or Extended plan. Batch lookups take several addresses separated by commas.

Quick start

  1. No key needed

    The DB-IP API answers without an account or key.

  2. Make your first request

    Geolocation and network details for one IPv4 or IPv6 address.. Replace the example values and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.db-ip.com/v2/free/203.0.113.7'
  3. Read the response

    A 200 response looks like this.

    {
      "ipAddress": "203.0.113.7",
      "continentCode": "EU",
      "continentName": "Europe",
      "countryCode": "NL",
      "countryName": "Netherlands",
      "stateProv": "Noord-Holland",
      "city": "Amsterdam"
    }

Authentication

No key or account: every endpoint answers without one.

The key is part of the URL path ({apiKey}); use the word free for the free tier, which works over HTTP only (HTTPS needs a paid key).

Get a key from DB-IP

Rate limits and pricing

Daily quota per key (queriesPerDay); no per-second limit stated in the docs

Free tier.

IP lookups

Returns the fields your plan includes. Use self as the address to look up the caller. Free keys return basic location fields only; paid tiers add network, proxy and threat fields.

Path parameters

apiKeystringrequired

Your API key, or free for the free tier

Example: free
ipAddressstringrequiredtakes your ip address

IPv4 or IPv6 address, or self

Example: 203.0.113.7
Response fields · 16Show

ipAddressstring

The address looked up

continentCodestring

Two-letter continent code

continentNamestring

Continent name

countryCodestring

ISO 3166-1 alpha-2 country code

countryNamestring

Country name

stateProvstring

State or province

citystring

City

latitudenumber

Latitude (paid tiers)

longitudenumber

Longitude (paid tiers)

timeZonestring

IANA time zone name (paid tiers)

asNumberinteger

Autonomous system number (paid tiers)

asNamestring

Autonomous system name (paid tiers)

ispstring

Internet service provider (paid tiers)

isProxyboolean

Whether the address is a proxy (paid tiers)

threatLevelstring

low, medium or high (paid tiers)

threatDetails[]string

Threat flags such as anonymous-proxy or port-scan (paid tiers)

curl 'https://api.db-ip.com/v2/free/203.0.113.7'
No key needed
Response
{
  "ipAddress": "203.0.113.7",
  "continentCode": "EU",
  "continentName": "Europe",
  "countryCode": "NL",
  "countryName": "Netherlands",
  "stateProv": "Noord-Holland",
  "city": "Amsterdam"
}

One property of an IP lookup, such as isEuMember or city.

GET/{apiKey}/{ipAddress}/{propertyName}

Returns only the named field instead of the whole object.

Path parameters

apiKeystringrequired

Your API key, or free

Example: free
ipAddressstringrequiredtakes your ip address

IPv4 or IPv6 address, or self

Example: 203.0.113.7
propertyNamestringrequired

Name of the field to return

Example: countryCode
Response fields · 1Show

(value)string

The value of the requested property

curl 'https://api.db-ip.com/v2/free/203.0.113.7/countryCode'
No key needed
Response
NL
  • Takes: IP address
  • Passive: the target is not contacted
  • Cost: 1 query per address, 10% less in a batch

Returns an object keyed by address; each value is a lookup object or an error object. Up to 32 addresses on the free key and 256 on paid keys. Batches get a 10% quota bonus.

Path parameters

apiKeystringrequired

Your API key, or free

Example: free
ipAddressesstringrequiredtakes your ip address

Comma-separated IP addresses

Example: 203.0.113.7,198.51.100.4
Response fields · 3Show

{ip}object

Lookup object (or error object) for each requested address

countryCodestring

ISO country code

citystring

City

curl 'https://api.db-ip.com/v2/free/203.0.113.7%2C198.51.100.4'
No key needed
Response
{
  "203.0.113.7": {
    "ipAddress": "203.0.113.7",
    "countryCode": "NL",
    "city": "Amsterdam"
  },
  "198.51.100.4": {
    "ipAddress": "198.51.100.4",
    "countryCode": "DE",
    "city": "Berlin"
  }
}

Autonomous systems

  • Passive: the target is not contacted
  • Cost: 1 query
  • Plan: Core and Extended

Available on Core and Extended plans; Basic keys get RESTRICTED. The same path also accepts an IP address instead of an AS number.

Path parameters

apiKeystringrequired

Your API key

Example: YOUR_API_KEY
asNumberintegerrequired

AS number

Example: 64496
Response fields · 8Show

numberinteger

AS number

namestring

AS name

organizationstring

Organization

registrystring

Regional registry: ripe, arin, apnic, lacnic or afrinic

countryCodestring

ISO country code

prefixCountinteger

Number of prefixes

addressCountinteger

IPv4 addresses

addressCountinteger

IPv6 addresses

curl 'https://api.db-ip.com/v2/YOUR_API_KEY/as/64496'
No key needed
Response
{
  "number": 64496,
  "name": "EXAMPLE-AS",
  "organization": "Example Networks",
  "registry": "ripe",
  "countryCode": "NL",
  "prefixCount": 12,
  "ipv4": {
    "addressCount": 4096,
    "prefixCount": 8
  },
  "ipv6": {
    "addressCount": 1024,
    "prefixCount": 4
  }
}

Account

  • Passive: the target is not contacted

Free keys return queriesLeft only. Paid keys also return the daily allowance, status and expiry.

Path parameters

apiKeystringrequired

Your API key, or free

Example: free
Response fields · 3Show

queriesLeftinteger

Queries left today

queriesPerDayinteger

Daily allowance (paid keys)

statusstring

trial, active or canceled (paid keys)

curl 'https://api.db-ip.com/v2/free'
No key needed
Response
{
  "queriesLeft": 969
}