Search by task, endpoint, field, or error.
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.
Lookup
Parameters 3
- 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
- deepboolean · query · optional
When true, adds deep: {}. No additional fields or charge
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.dns("example.com", { type: "MX" });
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"domain": "example.com",
"records": [
{
"name": "example.com",
"type": "MX",
"ttl": 251,
"value": "0 ."
}
]
}import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.dns("_dmarc.google.com", { type: "TXT" });
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"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
- domain
- Queried DNS name, lowercase ASCII with a trailing dot removed. Internationalized names use Punycode
- records
- DNS answer records. Empty when the name exists with no records for the requested types. Typed lookups can include CNAME-chain records
- records[].name
- The DNS name that owns this record
- records[].type
- Record type: A, AAAA, CNAME, MX, NS, TXT, SOA, CAA, SRV, or PTR
- records[].ttl
- Remaining cache lifetime in whole seconds when the response is generated
- records[].value
- 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 type
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 answer
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.
?deep=true adds deep: {} with no additional fields or charge. To check registration availability, use Domain.
Questions? Email