---
title: "POST /dnsrecord"
method: POST
path: "/dnsrecord"
tags: ["dnsrecord"]
---

# POST /dnsrecord

`POST /dnsrecord`

Retrieve DNS records for a given domain

## Request body

- DnsRecordDto
  - `url` string, required — Target URL
  - `types` string[] — List of DNS record types to query. If omitted, all supported types will be returned.

## Response `200`

Successfully retrieved DNS records

- DnsRecordResponseDto
  - `timestamp` number, required — Timestamp of the request in milliseconds
  - `apiStatus` 'success' | 'failure', required — API status message
  - `apiCode` number, required — API status code
  - `meta` DnsMetaDto, required
    - `url` string, required — The target URL that was scraped
    - `types` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'CAA' | 'NS' | 'SOA' | 'SRV' | 'TXT', required — List of DNS record types to query. If omitted, all supported types will be returned.
    - `test` TestMetaDto, required
      - `id` string, required — Unique test identifier
  - `data` object, required — DNS records grouped by type.

## Other responses

- `400` — Bad request (invalid parameters)
- `500` — Internal server error

---

[API](https://skmtc.net/geekflare/apis/geekflare-api.md) · [All operations](https://skmtc.net/geekflare/apis/geekflare-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geekflare/geekflare-api/revisions/936993afc936/schema)
