> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nextdns.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DNS protocols

> Count queries by the protocol used to reach NextDNS.

The `protocol` field identifies the client’s DNS transport. Values include `UDP`, `TCP`, `DNS-over-HTTPS`, `DNS-over-TLS`, `DNS-over-HTTP/3`, and `DNS-over-QUIC`. For a single encrypted versus unencrypted breakdown, use [encryption](https://docs.nextdns.io/api-reference/analytics/encryption.md).

**profile** `string` *required*

Profile ID.

See the [shared analytics filters and pagination](https://docs.nextdns.io/api-reference/analytics/overview#query-parameters).

```bash cURL theme={null}
curl -H "X-Api-Key: $NEXTDNS_API_KEY" \
  "https://api.nextdns.io/profiles/$PROFILE_ID/analytics/protocols?from=-1d"
```

```json 200 theme={null}
{
  "data": [
    { "protocol": "DNS-over-HTTPS", "queries": 1782 },
    { "protocol": "DNS-over-TLS", "queries": 549 },
    { "protocol": "UDP", "queries": 87 }
  ],
  "meta": { "pagination": { "cursor": null } }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.