# resolveDnsRecords

**Identifier:** `domain_resolveDnsRecords`

**Provider:** [Domain](https://kirha.com/providers/domain.md)

Resolve the DNS records of a hostname (A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, SRV) through a public resolver, with TTLs. Use it to see where a domain points, debug a DNS change or read a verification TXT record.

## Run it with the CLI

```bash
kirha tools run domain_resolveDnsRecords \
  --input '{
    "name": "api.kirha.com or _dmarc.kirha.com"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "domain_resolveDnsRecords",
  "input": {
    "name": "api.kirha.com or _dmarc.kirha.com"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "name": {
      "description": "Hostname, e.g., api.kirha.com or _dmarc.kirha.com",
      "maxLength": 253,
      "minLength": 3,
      "type": "string"
    },
    "types": {
      "description": "Defaults to A, AAAA, CNAME, MX, TXT, NS",
      "items": {
        "enum": [
          "A",
          "AAAA",
          "CNAME",
          "MX",
          "TXT",
          "NS",
          "SOA",
          "CAA",
          "SRV"
        ],
        "type": "string"
      },
      "maxItems": 9,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "dnssecValidated": {
      "type": "boolean"
    },
    "exists": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "records": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "ttl": {
            "type": "number"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "typesWithoutRecord": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "name",
    "exists",
    "dnssecValidated",
    "records",
    "typesWithoutRecord"
  ],
  "type": "object"
}
```

-----

[All Domain tools](https://kirha.com/providers/domain.md) · [< Back to tools list](https://kirha.com/tools.md)