About this endpoint
What it does
Looks up DNS records for the specified host and returns a JSON object containing the DNS answer for the requested record type. The response includes the queried host, the requested type, a status, and any record-type-specific fields that apply.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| host | String | Yes | Hostname or IP address to look up. |
| type | ENUM | No | DNS record type to query. Allowed values: A, AAAA, MX, NS, TXT, CNAME, PTR.<br>Default: A. |
Response
Returns a JSON object with a data object field. The data object contains the queried host and type, a status, and type-specific record fields such as addresses, mx, names, ptr, or txt when relevant.
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | DNS answer for the requested host and type. Contains status, host, and type, plus only the fields relevant to the requested record type. |
Notes
Only fields relevant to the requested record type are populated; all other record-type fields are omitted. The status field can be OK, NXDOMAIN, NODATA, or ERROR; ERROR is noted as batch-row only in the schema.