curl -H "X-Api-Key: $NEXTDNS_API_KEY" \
"https://api.nextdns.io/profiles/$PROFILE_ID/analytics/domains?from=-1d&status=blocked&reason=denylist"
{
"data": [
{ "domain": "ads.example.com", "root": "example.com", "queries": 86 },
{ "domain": "example.org", "queries": 21 }
],
"meta": { "pagination": { "cursor": null } }
}
Analytics
Domains
Rank queried domains by query count.
GET
/
profiles
/
{profile}
/
analytics
/
domains
curl -H "X-Api-Key: $NEXTDNS_API_KEY" \
"https://api.nextdns.io/profiles/$PROFILE_ID/analytics/domains?from=-1d&status=blocked&reason=denylist"
{
"data": [
{ "domain": "ads.example.com", "root": "example.com", "queries": 86 },
{ "domain": "example.org", "queries": 21 }
],
"meta": { "pagination": { "cursor": null } }
}
Each row contains a recorded
A query that matches two blocklists contributes to each list’s ranking when you filter by those reasons separately. This endpoint returns totals only.
domain and its query count. Queries logged without a domain are excluded. For a subdomain, root identifies its registrable domain when available. A recognized tracker can also include a tracker identifier.
See the shared analytics filters and pagination.
Accepts
default, blocked, allowed, error, rewritten, and relayed. Separate multiple statuses with commas.Set to
true to group subdomains under their registrable domain. For example, www.example.com and api.example.com then contribute to a single example.com row.Filter by a single reason ID, such as
denylist or blocklist:nextdns-recommended. Add status=blocked to restrict the ranking to blocked queries. An unknown reason returns an empty list.curl -H "X-Api-Key: $NEXTDNS_API_KEY" \
"https://api.nextdns.io/profiles/$PROFILE_ID/analytics/domains?from=-1d&status=blocked&reason=denylist"
{
"data": [
{ "domain": "ads.example.com", "root": "example.com", "queries": 86 },
{ "domain": "example.org", "queries": 21 }
],
"meta": { "pagination": { "cursor": null } }
}