apyhub
DATA VALIDATION · DEVELOPER TOOLS

DNS Lookup

What it does

DNS Lookup lets you query a hostname or IP address and get the resolver’s answer back as structured DNS data. Send a host and, optionally, a record type of A, AAAA, MX, NS, TXT, CNAME, or PTR.

The response includes a data object with the queried host, requested type, and a status value of OK, NXDOMAIN, NODATA, or ERROR. Depending on the record type, the payload also returns addresses for A and AAAA records, mx entries with preference and exchange, names for NS or CNAME, txt strings for TXT records, and ptr target names for reverse lookups.

Use DNS Lookup when you need to verify that a domain resolves, inspect mail routing, check TXT records for SPF or verification setups, or confirm reverse DNS for an IP address. It’s a straightforward way to add DNS inspection to onboarding flows, diagnostics, monitoring, or support tooling without parsing raw resolver output.

The response keeps the record-type-specific fields separated, so you only read the data that applies to the query you made.

GET
Look up DNS records
https://api.eu.apyverse.com/apyhub/dns-lookup

QUICKSTART

GUIDE

Quickstart

Look up DNS records for a host using the default A record type.

curl -X GET "https://api.eu.apyverse.com/apyhub/dns-lookup?host=google.com" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object includes status, host, and type, and may include record-type-specific fields such as addresses, names, mx, ptr, or txt depending on the DNS lookup result.

{
  "data": {
    "status": "OK",
    "host": "google.com",
    "type": "A",
    "addresses": ["142.250.185.78"]
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

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)

AttributeTypeMandatoryDescription
hostStringYesHostname or IP address to look up.
typeENUMNoDNS 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.

AttributeTypeMandatoryDescription
dataObjectYesDNS 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.

Query parameters

Name
Type
Description
hostREQUIRED
string
typeOPTIONAL
string
A · AAAA · MX · NS · TXT · …
DEFAULT A
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.