I use the database of iptoasn that is imported daily. This service is a Python program with Django and Django Rest Framework. The DNS resolution is made with dnspython. I use Materialize for the design.