I have looked at the UrlFetchApp documentation and I have searched the internet for a solution, but I don't see any way to retrieve the IP of a target URL in Apps Script. Is there a way to do this?
Thanks
You can do this using dns.google.com
function lookup(){
var lookup = JSON.parse(UrlFetchApp.fetch("https://dns.google.com/resolve?name=wikipedia.com&type=A"));
}
The IP is in the response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With