The client library for Reverse IP/DNS API in Python language.
The minimum Python version is 3.6.
pip install reverse-ip
Full API documentation available here
from reverseip import * client = Client('Your API key')
# Get parsed records as a model instance. result = client.data('8.8.8.8') print(result.size) for record in result.result: print("Domain: {}, visited: {}".format( record.name, record.last_visit)) # Get raw API response resp_str = client.raw_data('1.1.1.1')
Pagination
for response in client.iterate_over('1.1.1.1'): # Working with the current page print(response.size) for record in response.result: print(record.name) # Alternative way try: response = client.data('1.1.1.1') # processing # ... while response.has_next: response = client.next_page('1.1.1.1', response) # processing # ... except ReverseIpApiError as error: print(error.message)
Get raw data in XML
raw = client.raw_data('1.1.1.1', output_format='xml') print(raw)