How do I query the database?
The Abuse Contact Database is exposed via DNS.
This means that you can send requests to the Abuse Contact DB in the same way you would with a DNSBL or any other DNS based list.
This allows for higher volume queries than would be possible with an HTTP API.
To obtain the abuse contact for IP 22.214.171.124, you reverse the octets of the IP address and append ".abuse-contacts.abusix.zone."
$ host -t TXT 126.96.36.199.abuse-contacts.abusix.zone. 188.8.131.52.abuse-contacts.abusix.zone descriptive text "email@example.com"
The response contains the abuse contact in the TXT record.
Multiple results are comma-separated in one TXT record. If you do not get any result, the range or IP does not exist or the responsible network owner doesn't declare an abuse contact yet.
IPv6 queries are also supported, but require the lookup to be in "Nibble" format, which is the format used for IPv6 PTR record lookups.
You can find a tool to convert an IPv6 address to Nibble format here: http://rdns6.com/nibble
To obtain the abuse contact for the IPv6 address 2a03:b0c0:1:d0::bea:a001:
$ host -t TXT 1.0.0.a.a.e.b.0.0.0.0.0.0.0.0.0.0.d.0.0.1.0.0.0.0.c.0.b.3.0.a.2.abuse-contacts.abusix.zone. 1.0.0.a.a.e.b.0.0.0.0.0.0.0.0.0.0.d.0.0.1.0.0.0.0.c.0.b.3.0.a.2.abuse-contacts.abusix.zone descriptive text "firstname.lastname@example.org"
A python-based command-line tool called "querycontacts" is available. The tool provides a library that you may use in your own Python programs.
You can install it via:
$ pip install querycontacts
You can use "querycontacts <ip address>" and it will do the necessary conversion of the IP address and the subsequent lookup and return the results.