About this endpoint
What it does
Performs up to 25 DNS lookups in a single request. You send a list of queries, and the response returns a per-query result with the resolved records and a status for each row.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| queries | Object Array | Yes | List of DNS lookup requests. Max 25 items. |
| queries[].host | String | Yes | Domain, FQDN, or IP address for PTR lookups. |
| queries[].type | ENUM | No | Record type to query. Allowed values: A, AAAA, MX, NS, TXT, CNAME, PTR. Default: A. Omit for A. |
Response
Returns a JSON object with a data object field. data contains a results array; each item is a DNS answer object for one requested query, including the queried host, the queried type, a status, and record-specific fields when applicable.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | No | Wrapper object containing the lookup results. |
| data.results | Object Array | No | Array of per-query DNS answer objects. Each item includes status, host, and type, plus only the record fields relevant to the queried type. |
| data.results[].status | ENUM | No | Result status for the row. Allowed values: OK, NXDOMAIN, NODATA, ERROR. OK means at least one record returned; NXDOMAIN means the DNS name does not exist; NODATA means the name exists but has no records of the requested type; ERROR is used for batch-row failures. |
| data.results[].host | String | No | Queried host, or IP address for PTR. |
| data.results[].type | ENUM | No | Queried record type. Allowed values: A, AAAA, MX, NS, TXT, CNAME, PTR. |
| data.results[].addresses | String Array | No | IPv4 (A) or IPv6 (AAAA) addresses. |
| data.results[].names | String Array | No | Hostnames for NS or CNAME answers. |
| data.results[].mx | Object Array | No | MX records returned for the query. Each item is one MX resource record. |
| data.results[].mx[].preference | Integer | No | MX preference. Lower values have higher priority. |
| data.results[].mx[].exchange | String | No | Mail exchanger hostname, often returned with a trailing dot. |
| data.results[].ptr | String Array | No | PTR target names for reverse DNS lookups. |
| data.results[].txt | String Array | No | TXT RDATA strings. One element is returned per TXT record, per Go net.Resolver. |
| data.results[].error | String | No | Present when status is ERROR, typically for resolver or validation failures for that row. |
Notes
The batch is limited to 25 queries per request. The response is row-oriented: only the fields relevant to each query's type are populated, and the other record fields are omitted.