Skip to main content

lookup_dns

Looks up the DNS records of one type for a domain. It supports the same eight record types as the DNS tool on namebeta.com.

Schema​

Input

FieldTypeRequiredConstraints
domainstringYes1–253 characters; Matches \.
typestringNoOne of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA; Default A

Output

Returned as structuredContent, and repeated as JSON in a text content block.

FieldTypeRequiredConstraints
domainstringYes
typestringYesOne of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA
recordsobject[]Yes
records[].typestringYesOne of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA
records[].datastringYes

Behaviour​

  • domain must contain a dot. It can be a registered domain such as example.com or a host name under it such as www.github.com.
  • type defaults to A. Only records of the requested type are returned: a host that is an alias answers an A query with its addresses, and its CNAME record appears only when you ask for CNAME.
  • data is the record's value as text: an address for A and AAAA, a host name for CNAME and NS, and the preference followed by the host for MX, such as 10 mail.example.com.
  • A name with no records of that type returns an empty records array; that is not an error.

Example​

Arguments:

{ "domain": "example.com", "type": "MX" }

Result:

{
"domain": "example.com",
"type": "MX",
"records": [{ "type": "MX", "data": "0 ." }]
}

0 . is a null MX (RFC 7505): example.com declares that it accepts no email.

Quota​

ToolBucketFree (hour / day)Pro (hour / day)Business (hour / day)Enterprise (hour / day)
lookup_dns dns20 / 50200 / 400500 / 1,000Unlimited

Errors​

SituationResult
domain has no dotTool error Input validation error: … (A full domain name is required)
domain is not a valid domainTool error Invalid domain format
type is not one of the eightTool error Input validation error: …
The TLD's nameservers are unknownTool error Zone missing
The lookup fails or times outTool error with the reason
Quota exceededHTTP 429 with Retry-After; see Quotas and errors