API Documentation

This page contains documentation and examples showing how to access and use our API. All API calls require a valid API key. To obtain an API key, check out our API plans.

To try out the API first, create an account and get a free API key.
Free keys get a limit of 1,000 monthly requests and will only return the first page of results (up to 1,000 results per request).

For more examples, check out our GitHub page.



Endpoints

The following table lists the available APIs and the plans they are available to.
Free keys can call every API, except for the mass reverse DNS.

- Organisation SearchAll plans
- Organisation InfoAll plans
- Organisation NetworksProfessional, Business
- IP Address InfoAll plans
- IP GeolocationAll plans except Basic
- IPs for Domain (Forward DNS)All plans
- Domains on IP (Reverse DNS)Professional, Business
- Domains in Network (Mass Reverse DNS)Professional, Business
- Autonomous System InfoAll plans
- Autonomous System NetworksAll plans except Basic



Output formats

The API support JSON and XML outputs.
The default is JSON. To switch to XML, add the parameter "format=xml" to any request (GET or POST).



Parameters

For convenience, any required or non-required parameter can be sent through GET or POST. For example, testing the API through a web browser may be easier by sending the parameters through the URL. The API key can be specified via the "X-Api-Key" HTTP header, or through the "apikey" GET or POST parameter.

The following examples are equivalent:

$ curl -s -H "X-Api-Key: sample_api_key" "https://networksdb.io/api/org-search" -d search=Google

$ curl -s "https://networksdb.io/api/org-search?apikey=sample_api_key&search=Google"

$ curl -s "https://networksdb.io/api/org-search" -d apikey=sample_api_key -d search=Google

$ curl -s "https://networksdb.io/api/org-search?apikey=sample_api_key" -d search=Google

For queries returning network addresses, add the parameter "ipv6=true" to switch to IPv6 output.



Pagination

For queries returning a large number of results, 1000 results will be returned per page.
The first page has number 1 (default value). To get the next page of results, include the parameter "page=X" in your request. For example, to get results 1001 to 2000, include "page=2".



Official libraries

We currently have a Python client library. It can be found on this GitHub repo.



Organisation Search

DescriptionSearch for organisations matching a search term.
OutputA list of organisations.
Endpointhttps://networksdb.io/api/org-search
MethodsGET, POST
Required parameterssearch [your search query]
Optional parameterscountry [to search this country only]
page [page number]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/org-search -d search=Google -d country=US { "total": 134, "page": 1, "results": [ { "organisation": "Google LLC", "id": "google-llc", "countries": [], "networks": { "ipv4": 238, "ipv6": 41 }, "url": "https://networksdb.io/ip-addresses-of/google-llc", "asns": [ "15169", "16550", "22577", "22859", "26684", "36039", "36040", "36384", "36385", "36492", "40873", "394507", "394639", "395973", "396982" ] }, { "organisation": "Google Fiber Inc.", "id": "google-fiber-inc", "countries": [], "networks": { "ipv4": 19, "ipv6": 3 }, "url": "https://networksdb.io/ip-addresses-of/google-fiber-inc", "asns": [ "6432", "16591", "19448" ] }, // truncated... } }



Organisation Info

DescriptionRetreive information about an organisation.
OutputInformation about the organisation requested.
Endpointhttps://networksdb.io/api/org-info
MethodsGET, POST
Required parametersid [organisation ID returned by the search query]
Optional parametersN/A
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/org-info -d id=google-llc { "organisation": "Google LLC", "id": "google-llc", "address": null, "phone": null, "countries": [ "United States", "Japan", "Thailand" ], "networks": { "ipv4": 238, "ipv6": 41 }, "networks_by_country": { "United States": 289, "Japan": 2, "Thailand": 2 }, "url": "https://networksdb.io/ip-addresses-of/google-llc", "asns": [ "15169", "16550", "22577", "22859", "26684", "36039", "36040", "36384", "36385", "36492", "40873", "394639", "395973", "396982", "394507" ] }



Organisation Networks

DescriptionSearch for the public networks owned by an organisation.
OutputA list public networks.
Endpointhttps://networksdb.io/api/org-networks
MethodsGET, POST
Required parametersid [organisation ID returned by the search query]
Optional parameterspage [page number]
ipv6 [set to true for IPv6 networks]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/org-networks -d id=google-llc { "total": 238, "page": 1, "results": [ { "netname": "GOOGL-2", "description": "Google LLC", "extrainfo": "", "countrycode": "US", "country": "United States", "blocksize": "4194304", "cidr": "34.64.0.0/10", "first_ip": "34.64.0.0", "last_ip": "34.127.255.255" }, { "netname": "GOOGLE-CLOUD", "description": "Google LLC", "extrainfo": "", "countrycode": "US", "country": "United States", "blocksize": "2621440", "cidr": "N/A", "first_ip": "35.208.0.0", "last_ip": "35.247.255.255" }, { "netname": "GOOGL-46", "description": "Google LLC", "extrainfo": "", "countrycode": "US", "country": "United States", "blocksize": "1048576", "cidr": "136.112.0.0/12", "first_ip": "136.112.0.0", "last_ip": "136.127.255.255" }, // truncated... ] }



IP Address Info

DescriptionSearch for an IPv4 or IPv6 address.
OutputInformation about the IP address, its owner company and network information.
Endpointhttps://networksdb.io/api/ip-info
MethodsGET, POST
Required parametersNone [will return info about the source IP]
Optional parametersip [the IPv4 or IPv6 address to look up]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/ip-info -d ip=2001:5a0:4200:: { "ip": "2001:5a0:4200::", "domains_on_ip": 0, "url": "https://networksdb.io/ip/2001:5a0:4200::", "organisation": { "name": "Google LLC", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" }, "network": { "netname": "GOOGLE-TATAC", "description": "Google Inc", "cidr": "2001:5a0:4200::/48", "first_ip": "2001:5a0:4200::", "last_ip": "2001:5a0:4200:ffff:ffff:ffff:ffff:ffff", "url": "https://networksdb.io/ips-in-network/2001:5a0:4200::/2001:5a0:4200:ffff:ffff:ffff:ffff:ffff" } }



IP Geolocation

DescriptionRequest geolocation information for a given IPv4 or IPv6 Address.
OutputGeolocation information including city, state, country, latitude and longitude.
Endpointhttps://networksdb.io/api/ip-geo
MethodsGET, POST
Required parametersNone [will return info about the source IP]
Optional parametersip [the IPv4 or IPv6 address to look up]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/ip-geo -d ip=8.8.8.8 { "ip": "8.8.8.8", "continent": "North America", "countrycode": "US", "country": "United States", "state": "California", "city": "Mountain View", "latitude": 37.406, "longitude": -122.079 }



IPs for Domain (Forward DNS)

DescriptionPerform a forward DNS lookup to find all the IPv4 and IPv6 addresses pointed to by a given domain name.
OutputA list of IP addresses.
Endpointhttps://networksdb.io/api/dns
MethodsGET, POST
Required parametersdomain [the domain name to lookup]
Optional parametersN/A
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/dns -d domain=google.com { "total": 25, "page": 1, "results": [ "172.217.5.110", "172.217.6.46", "172.217.6.78", "172.217.0.46", "172.217.14.206", "172.217.14.238", "172.217.164.110", "172.217.3.174", "172.217.3.206", "216.58.193.78", "216.58.194.174", "216.58.195.78", "216.58.217.46", "2607:f8b0:4005:804::200e", "2607:f8b0:4005:807::200e", "2607:f8b0:4005:808::200e", "2607:f8b0:4005:809::200e", "2607:f8b0:4005:802::200e", "2607:f8b0:4005:80a::200e", "2607:f8b0:4005:80b::200e", "2607:f8b0:400a:804::200e", "2607:f8b0:400a:808::200e", "2607:f8b0:400a:809::200e", "2607:f8b0:400a:800::200e", "2607:f8b0:400a:803::200e" ] }



Domains on IP (Reverse DNS)

DescriptionPerform a reverse DNS lookup to find all the domain names pointing to the given IPv4 or IPv6 address.
OutputA list of domain names.
Endpointhttps://networksdb.io/api/reverse-dns
MethodsGET, POST
Required parametersip [the IP address to look up]
Optional parameterspage [page number]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/reverse-dns -d ip=93.184.216.34 { "total": 45, "page": 1, "results": [ // truncated... "example.com", "example.edu", "example.net", "example.org", // truncated... ] }



Domains in Network (Mass Reverse DNS)

DescriptionPerform a "mass" reverse DNS lookup to find all the domain names pointing to any IPv4 or IPv6 address in the given network.
OutputA list of IP addresses with the attached domain names.
Endpointhttps://networksdb.io/api/mass-reverse-dns
MethodsGET, POST
Required parametersEither: ip_start [the network's first IP], ip_end [the network's last IP]
Or: cidr [the network's address in CIDR notation]
Optional parameterspage [page number]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/mass-reverse-dns -d cidr=93.184.216.0/24 { "total": 270, "page": 1, "results": [ { "ip": "93.184.216.11", "domains": [ "sexdwarf.org", "wicklow.org" ] }, { "ip": "93.184.216.34", "domains": [ // truncated ... "example.com", "example.edu", "example.net", "example.org", // truncated ... ] }, { "ip": "93.184.216.38", "domains": [ "ignitecampaigns.com", "job-applications.com", "vz-sinclairstoryline.com" ] }, // truncated ... ] }



Autonomous System Info

DescriptionSearch for an autonomous system.
OutputInformation about the autonomous sytem, its owner company and the number of networks and addresses it announces.
Endpointhttps://networksdb.io/api/asn
MethodsGET, POST
Required parametersasn [the autonomous system number]
Optional parametersN/A
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/asn -d asn=15169 { "asn": 15169, "as_name": "GOOGLE", "description": "Google LLC", "networks_announced": { "ipv4": 479, "ipv6": 76 }, "countrycode": "US", "country": "United States", "url": "https://networksdb.io/autonomous-system/AS15169", "organisation": { "name": "Google LLC", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" } }



Autonomous System Networks

DescriptionSearch for the networks announced by an autonomous system.
OutputA list of networks.
Endpointhttps://networksdb.io/api/asn-networks
MethodsGET, POST
Required parametersasn [the autonomous system number]
Optional parameterspage [page number]
ipv6 [set to true for IPv6 networks]
Example request$ curl -sH "X-Api-Key: sample_api_key" https://networksdb.io/api/asn-networks -d asn=15169 { "total": 479, "page": 1, "results": [ { "cidr": "8.8.4.0/24", "first_ip": "8.8.4.0", "last_ip": "8.8.4.255", "countrycode": "US", "country": "United States", "blocksize": "256", "organisation": { "name": "Google LLC", "description": "", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" } }, { "cidr": "8.8.8.0/24", "first_ip": "8.8.8.0", "last_ip": "8.8.8.255", "countrycode": "US", "country": "United States", "blocksize": "256", "organisation": { "name": "Google LLC", "description": "", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" } }, { "cidr": "8.34.208.0/21", "first_ip": "8.34.208.0", "last_ip": "8.34.215.255", "countrycode": "US", "country": "United States", "blocksize": "2048", "organisation": { "name": "Google LLC", "description": "", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" } }, // truncated ... ] }