Just found out Google public DNS supports DNS-over-HTTPS. A single curl command can give you the result in json format. Very nice!
Syntax: curl -s https://dns.google.com/resolve?name=xxxx
curl -s https://dns.google.com/resolve?name=ap-southeast-2.aws.amazon.com | jq -r .
{
"Status": 3,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "ap-southeast-2.aws.amazon.com.",
"type": 1
}
],
"Authority": [
{
"name": "aws.amazon.com.",
"type": 6,
"TTL": 59,
"data": "ns-921.amazon.com. root.amazon.com. 1499061428 3600 900 7776000 60"
}
],
"Comment": "Response from 34.196.62.143"
}