---
title: "Get DNS server query log."
method: GET
path: "/querylog"
tags: ["log"]
---

# Get DNS server query log.

`GET /querylog`

## Request

- Base URL: `/control` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/control/querylog`
- Auth: HTTP basic

## Query parameters

- `older_than` string
- `offset` integer
- `limit` integer
- `search` string
- `response_status` 'all' | 'filtered' | 'blocked' | 'blocked_safebrowsing' | 'blocked_parental' | 'whitelisted' | 'rewritten' | 'safe_search' | 'processed'

## Response `200`

OK.

- QueryLog: Query log
  - `oldest` string
  - `data` QueryLogItem[]
    - `answer` DnsAnswer[]
      - `ttl` integer
      - `type` string
      - `value` string
    - `original_answer` DnsAnswer[]: Answer from upstream server (optional)
      - `ttl` integer
      - `type` string
      - `value` string
    - `cached` boolean: Defines if the response has been served from cache.
    - `upstream` string: Upstream URL starting with tcp://, tls://, https://, or with an IP address.
    - `answer_dnssec` boolean: If true, the response had the Authenticated Data (AD) flag set.
    - `client` string: The client's IP address.
    - `client_id` string: The ClientID, if provided in DoH, DoQ, or DoT.
    - `client_info` QueryLogItemClient: Client information for a query log item.
      - `disallowed` boolean, required: Whether the client's IP is blocked or not.
      - `disallowed_rule` string, required: The rule due to which the client is allowed or blocked.
      - `name` string, required: Persistent client's name or runtime client's hostname. May be empty.
      - `whois` QueryLogItemClientWhois, required: Client WHOIS information, if any.
        - `city` string: City, if any.
        - `country` string: Country, if any.
        - `orgname` string: Organization name, if any.
    - `client_proto` 'dot' | 'doh' | 'doq' | 'dnscrypt' | ''
    - `ecs` string: The IP network defined by an EDNS Client-Subnet option in the request message if any.
    - `elapsedMs` string
    - `question` DnsQuestion: DNS question section
      - `class` string
      - `name` string
      - `unicode_name` string
      - `type` string
    - `filterId` integer: In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to. Deprecated: use `rules[*].filter_list_id` instead.
    - `rule` string: Filtering rule applied to the request (if any). Deprecated: use `rules[*].text` instead.
    - `rules` ResultRule[]: Applied rules.
      - `filter_list_id` integer: In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to.
      - `text` string: The text of the filtering rule applied to the request (if any).
    - `reason` 'NotFilteredNotFound' | 'NotFilteredWhiteList' | 'NotFilteredError' | 'FilteredBlackList' | 'FilteredSafeBrowsing' | 'FilteredParental' | 'FilteredInvalid' | 'FilteredSafeSearch' | 'FilteredBlockedService' | 'Rewrite' | 'RewriteEtcHosts' | 'RewriteRule': Request filtering status.
    - `service_name` string: Set if reason=FilteredBlockedService
    - `status` string: DNS response status
    - `time` string: DNS request processing start time

---

[API](https://skmtc.dev/guardllamanet/apis/adguard-home.md) - [All operations](https://skmtc.dev/guardllamanet/apis/adguard-home/llms.txt) - [OpenAPI document](https://skmtc.dev/guardllamanet/apis/adguard-home/revisions/14ff21aeb363?raw)
