DNS Lookup API

DNS record names, types, values, and remaining TTLs.

Look up DNS records at a domain, subdomain, service name, or reverse DNS name. Each API call uses one pooled request on every plan, including Free.

LookupCopy link

GET /dns/{domain}API Explorer ↗

DNS record names, types, values, and TTLs

Parameters

domainstring · path · required

Complete DNS name. Supports internationalized names, subdomains, _dmarc and _service._tcp labels, and reverse names under in-addr.arpa or ip6.arpa. A trailing dot is accepted

typestring · query · optional

One record type, case-insensitive: A, AAAA, CNAME, MX, NS, TXT, SOA, CAA, SRV, or PTR. Omit to query all ten. Unsupported or repeated types return 400

Request

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.dns("example.com", { type: "MX" });
console.log(result);
Example response
{
  "domain": "example.com",
  "records": [
    {
      "name": "example.com",
      "type": "MX",
      "ttl": 251,
      "value": "0 ."
    }
  ]
}

Request

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.dns("_dmarc.google.com", { type: "TXT" });
console.log(result);
Example response
{
  "domain": "_dmarc.google.com",
  "records": [
    {
      "name": "_dmarc.google.com",
      "type": "TXT",
      "ttl": 298,
      "value": "v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com"
    }
  ]
}

Response fields

domainLink to domainstring
Queried DNS name, lowercase ASCII with a trailing dot removed. Internationalized names use Punycode
recordsLink to recordsarray
DNS answer records. Empty when the name exists with no records for the requested types. Typed lookups can include CNAME-chain records
records[].nameLink to records[].namestring
The DNS name that owns this record
records[].typeLink to records[].typestring
Record type: A, AAAA, CNAME, MX, NS, TXT, SOA, CAA, SRV, or PTR
records[].ttlLink to records[].ttlinteger
Remaining cache lifetime in whole seconds when the response is generated
records[].valueLink to records[].valuestring
DNS answer text, preserved as returned. MX includes priority and host. TXT quotes, escapes, and chunk boundaries are retained when present. DNS names within values can retain a trailing dot

Choose a record typeCopy link

Set type to A, AAAA, CNAME, MX, NS, TXT, SOA, CAA, SRV, or PTR. The value is case-insensitive. Omit it to query all ten types individually at the supplied name. A typed answer can also contain CNAME-chain records.

Pass the complete name, such as _dmarc.google.com, _sip._tcp.example.com, or 8.8.8.8.in-addr.arpa. Internationalized names and a trailing dot are accepted. The response domain is lowercase ASCII without the trailing dot.

Read the answerCopy link

value contains DNS answer text as returned. TXT quotes, escapes, and chunk boundaries are preserved when present. MX values contain the priority and host. For separate MX priority and host fields, use MX.

ttl is the remaining lifetime in seconds when the response is generated. Answers reflect a DNS resolver's view of the supplied name. A lookup reads that name, without enumerating the domain's subdomains or confirming propagation across all resolvers.

An existing name with no records for the requested types returns 200 with records: []. NXDOMAIN at the queried name returns 404. A published CNAME chain is retained when its target does not exist. A failed lookup returns 503 without a partial or empty success. Invalid names, unsupported types, and repeated query parameters return 400.

This lookup returns its complete answer on every plan. To check registration availability, use Domain.