DNS Lookup API is a REST API that has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.It programmatically performs lookups for A, NS, MX, AAAA, TXT and SOA records of any domain (GET requests).
curl --request GET 'https://api.apilayer.com/dns_lookup/api/a/google.com' \
--header 'apikey: YOUR API KEY'