apyhub
DEVELOPER TOOLS

DNS Lookup API

What it does

DNS Lookup resolves DNS records for a domain name and returns the record data you asked for. Send a domain and, optionally, a record_type such as A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, or CAA.

The response includes the queried domain, the resolved record_type, and any records found. When available, it also returns ttl. If resolution fails or the record is not present, you may receive an error string instead of usable records.

Use DNS Lookup when you need to verify domain configuration, check mail routing, inspect TXT records for SPF or verification tokens, or confirm where a hostname points before provisioning infrastructure. It fits directly into onboarding checks, domain health monitoring, and support workflows where you need the DNS answer, not a full resolver library.

Because the output is simple and typed, it is easy to plug into automation that checks one record type at a time and compares the returned values against expected configuration.

GET
Resolve any DNS record type for a domain name
http://localhost:8080/dosvak/dns-lookup
QUICKSTARTGUIDE

Quickstart

Look up DNS records for a domain with the default A record type.

curl -X GET "http://localhost:8080/dosvak/dns-lookup?domain=example.com&record_type=A" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with these top-level fields: ttl is an integer or null, error is a string or null, domain is a string, records is an array of strings, and record_type is a string.

{
  "ttl": 300,
  "error": null,
  "domain": "example.com",
  "records": ["93.184.216.34"],
  "record_type": "A"
}
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

Resolves DNS records for a domain name and returns the domain, record type, TTL, any error message, and the list of record values. The record type can be selected with a query parameter and defaults to A.

Query Parameter(s)

AttributeTypeMandatoryDescription
domainStringYesThe domain name to look up.
record_typeENUMNoDNS record type to resolve. Allowed values: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, CAA. Default: A.

Response

Returns a JSON object with ttl, error, domain, records, and record_type fields. ttl and error may be null; records is an array of strings.

ParameterTypeMandatoryDescription
ttlIntegerNoThe record TTL, or null when not available.
errorStringNoAn error message, or null when the lookup does not produce one.
domainStringYesThe domain that was looked up.
recordsString ArrayYesThe resolved DNS record values.
record_typeStringYesThe record type that was resolved.

Query parameters

Name
Type
Description
domainREQUIRED
string
record_typeOPTIONAL
string
A · AAAA · MX · TXT · NS · …
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.