> ## 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.

# Encryption

> Count queries sent over encrypted and unencrypted DNS transports.

The `encrypted` field is `true` for DNS over HTTPS, TLS, HTTP/3, or QUIC. Plain DNS over UDP or TCP has `encrypted: false`. For counts by individual transport, use [DNS protocols](https://docs.nextdns.io/api-reference/analytics/protocols.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/encryption?from=-1d"
```

```json 200 theme={null}
{
  "data": [
    { "encrypted": true, "queries": 934 },
    { "encrypted": false, "queries": 35 }
  ],
  "meta": { "pagination": { "cursor": null } }
}
```


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