Cloudflare Docs
Edit this page on GitHub
Set theme to dark (⇧+D)


Access aggregated and anonymized DNS queries to Cloudflare’s public resolver service.

​​ List of endpoints

​​ Top locations

​​ Example: Geographical distribution of versus

In the next example, we will request the top originating locations for DNS queries:

curl -X GET "" \
-H "Authorization: Bearer <API_TOKEN>"

The response shows that most queries come from the United States and Brazil:

"clientCountryAlpha2": "US",
"clientCountryName": "United States",
"value": "43.474518"
}, {
"clientCountryAlpha2": "BR",
"clientCountryName": "Brazil",
"value": "10.772799"

Making the same search request for, a Russian search engine:

curl -X GET "" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json"

Returns the following response:

"clientCountryAlpha2": "RU",
"clientCountryName": "Russian Federation",
"value": "73.710495"
}, {
"clientCountryAlpha2": "DE",
"clientCountryName": "Germany",
"value": "5.518052"

As expected, most queries come from Russia.

You can also provide multiple hostnames. Refer to Get DNS top locations for more information. This is useful when the application you want to explore uses several hostnames to serve its content (like a hostname for the main website, another hostname dedicated to its API, etc.).

​​ Next steps

Refer to Domain ranking for more information on rankings generated by Cloudflare based on DNS queries to public resolver.