API Documentation

This documentation is intended for developers who want to write applications that can query IP-DB. We serve our data in multiple formats via a simple URL-based interface over HTTPS, which enables you to use our data directly from a user's browser or from your server.

The API base path is:

https://ip-db.io/api/{query}

{query} can be a signle IPv4/IPv6 address. If you don't supply correct IP, a false status will be returned.

IP API Example

	
	{
		"query": "8.8.8.8", 
		"status": "success", 
		"hostname": "dns.google",
		"city": "Mountain View", 
		"region": "California",
		"countryCode": "US",
		"country": "United States of America", 
		"latitude": 37.405991, 
		"longitude": -122.078514, 
		"currency": "USD", 
		"timezone": "America/Adak", 
		"isp": "Google LLC", 
		"org": "Google",
		"as": "AS15169 Google LLC",
		"route": "8.8.8.8/32"
	}
					

Returned data

name description example type
query IP used for the query 8.8.8.8 string
status success or fail success string
hostname Reverse DNS of the IP (can delay response) dns.google string
city City name Mountain View string
region Region/state name California string
countryCode Two-letter country code ISO 3166-1 US string
country Country name United States string
latitude Latitude 37.405991 float
longitude Longitude -122.078514 float
currency National currency USD string
timezone Timezone (tz) America/Adak string
isp ISP name Google LLC string
org Organization name Google string
as AS number and organization, separated by space (RIR) AS15169 Google LLC string
route Network 8.8.8.8/32 string

The ASN API base path is:

Our free plan includes access to our ASN API, which allows you to programmatically access details about an ASN. The ASN API is available at:

https://ip-db.io/api/{query}

{query} can be a signle AS number. If you don't supply correct AS number, a false status will be returned.

ASN API Example

	{
		"query": "AS15169",
		"status": "success",
		"name": "GOOGLE",
		"description": "Google LLC",
		"countryCode": "US",
		"website": "https://about.google/intl/en/",
		"abuseContacts": [
			"[email protected]"
		],
		"trafficEstimation": null,
		"ownerAddress": [
			"1600 Amphitheatre Parkway",
			"Mountain View",
			"CA",
			"94043",
			"US"
		],
		"rirAllocation": {
			"rir_name": "ARIN",
			"country_code": "US",
			"date_allocated": "2000-03-30 00:00:00",
			"allocation_status": "assigned"
		},
		"ianaAssignment": {
			"assignment_status": "assigned",
			"description": "Assigned by ARIN",
			"whois_server": "whois.arin.net",
			"date_assigned": null
		},
		"prefixes": {
			"ipv4_prefixes": [
				{
					"prefix": "8.8.4.0/24",
					"ip": "8.8.4.0",
					"cidr": 24,
					"roa_status": "None",
					"name": "LVLT-GOGL-8-8-4",
					"description": "Google LLC",
					"country_code": "US",
					"parent": {
						"prefix": "8.0.0.0/9",
						"ip": "8.0.0.0",
						"cidr": 9,
						"rir_name": "ARIN",
						"allocation_status": "unknown"
					}
				}
			],
			"ipv6_prefixes": [
				{
					"prefix": "2001:4860::/32",
					"ip": "2001:4860::",
					"cidr": 32,
					"roa_status": "None",
					"name": "GOOGLE-IPV6",
					"description": "Google LLC",
					"country_code": "US",
					"parent": {
						"prefix": "2001:4860::/32",
						"ip": "2001:4860::",
						"cidr": 32,
						"rir_name": "ARIN",
						"allocation_status": "unknown"
					}
				},
			]
		}, 
		"peers": {
			"ipv4_peers": [
				{
					"asn": 19151,
					"name": "WVFIBER-1",
					"description": "WV FIBER",
					"country_code": "US"
				}
			],
			"ipv6_peers": [
				{
					"asn": 19151,
					"name": "WVFIBER-1",
					"description": "WV FIBER",
					"country_code": "US"
				}
			]
		},
		"upstreams": {
			"ipv4_upstreams": [
				{
					"asn": 6453,
					"name": "AS6453",
					"description": "TATA COMMUNICATIONS (AMERICA) INC",
					"country_code": "US"
				}
			],
			"ipv6_upstreams": [
				{
					"asn": 6453,
					"name": "AS6453",
					"description": "TATA COMMUNICATIONS (AMERICA) INC",
					"country_code": "US"
				}
			]
		},
		"downstreams": {
			"ipv4_downstreams": [
				{
					"asn": 36492,
					"name": "GOOGLEWIFI",
					"description": "Google, LLC",
					"country_code": "US"
				}
			],
			"ipv6_downstreams": [
				{
					"asn": 36492,
					"name": "GOOGLEWIFI",
					"description": "Google, LLC",
					"country_code": "US"
				}
			]
		}
	}
					

IP-DB is not responsible for any technological delays beyond our control.

Reach me at [email protected]

Faster growth starts with IP-DB

Join over 1,000+ users