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
| Field | Type | Required | Constraints |
|---|---|---|---|
domain | string | Yes | 1–253 characters; Matches \. |
type | string | No | One of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA; Default A |
Output
Returned as structuredContent, and repeated as JSON in a text content block.
| Field | Type | Required | Constraints |
|---|---|---|---|
domain | string | Yes | |
type | string | Yes | One of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA |
records | object[] | Yes | |
records[].type | string | Yes | One of A, AAAA, CNAME, MX, TXT, NS, SRV, SOA |
records[].data | string | Yes |
Behaviour
domainmust contain a dot. It can be a registered domain such asexample.comor a host name under it such aswww.github.com.typedefaults toA. Only records of the requested type are returned: a host that is an alias answers anAquery with its addresses, and itsCNAMErecord appears only when you ask forCNAME.datais the record's value as text: an address forAandAAAA, a host name forCNAMEandNS, and the preference followed by the host forMX, such as10 mail.example.com.- A name with no records of that type returns an empty
recordsarray; 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
| Tool | Bucket | Free (hour / day) | Pro (hour / day) | Business (hour / day) | Enterprise (hour / day) |
|---|---|---|---|---|---|
lookup_dns | dns | 20 / 50 | 200 / 400 | 500 / 1,000 | Unlimited |
Errors
| Situation | Result |
|---|---|
domain has no dot | Tool error Input validation error: … (A full domain name is required) |
domain is not a valid domain | Tool error Invalid domain format |
type is not one of the eight | Tool error Input validation error: … |
| The TLD's nameservers are unknown | Tool error Zone missing |
| The lookup fails or times out | Tool error with the reason |
| Quota exceeded | HTTP 429 with Retry-After; see Quotas and errors |