# DNS Records Query API Service from Google

Did you know Google has an API service to fetch DNS records ?

For example, if you want to get the MX records of techcrunch.com, you can get it from here : [https://dns.google/query?name=techcrunch.com&rr\_type=MX&ecs=](https://dns.google/query?name=techcrunch.com&rr_type=MX&ecs=) where the API endpoint is at [https://dns.google/resolve?name=techcrunch.com&type=MX](https://dns.google/resolve?name=techcrunch.com&type=MX) after which you can parse the data.

And the best part ? - its CORS enabled. Meaning you can fetch from client side JavaScript itself from any IP address.

Here's a demo to play with : [https://anjanesh.s3.amazonaws.com/demo/google-dns.html](https://anjanesh.s3.amazonaws.com/demo/google-dns.html)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724502901905/47ce229a-504d-46bb-8db7-9700095c15c7.png align="center")
