Network & DNS

GET/api/v1/reverse-dns-lookup

PacketFlo Reverse DNS Lookup API

Cost: 1 credit per request

PTR lookup: the hostnames registered for an IPv4 or IPv6 address. An empty hostnames list means no PTR record is registered; a resolver failure is returned as an error, never as an empty list.

ParameterTypeRequiredDescription
ipstringYesIPv4 or IPv6 address to look up. Private, loopback and link-local addresses are rejected because they have no public reverse DNS.
resolverstringNoWhich resolver to query: an ip from the DNS Propagation Checker's named list (8.8.8.8 Google, 1.1.1.1 Cloudflare, 9.9.9.9 Quad9, 208.67.222.222 OpenDNS, 64.6.64.6 Verisign, 94.140.14.14 AdGuard, 223.5.5.5 Alibaba, 4.2.2.1 Level3), or "system" for this server's own default resolver. Omitted or unrecognized defaults to "system". The response reports the resolver used, or null for "system".

Example request

curl "https://packetflo.io/api/v1/reverse-dns-lookup?ip=1.1.1.1&resolver=1.1.1.1&api_key=YOUR_API_KEY"

Example response

{
  "ok": true,
  "data": {
    "ip": "1.1.1.1",
    "hostnames": ["one.one.one.one"],
    "resolver": { "name": "Cloudflare", "ip": "1.1.1.1" }
  },
  "meta": { "tool": "reverse-dns-lookup", "version": "v1" }
}

Reading the result

Returns PTR hostnames for a public IPv4 or IPv6 address. An empty hostnames array is a completed lookup with no PTR answer.

Response fields

FieldWhat it tells you
ipThe public address queried.
hostnamesAn array of PTR names, possibly empty.
resolverThe selected resolver's label; unsupported selections use the system resolver.

Scope and limits

PTR names are controlled by the address owner and need not match forward DNS or prove domain ownership. No-data and not-found responses return an empty array; other lookup failures can return an API error.

Authentication and errors

Send your key in the x-api-key header, or the supported api_key query parameter. Each request uses 1 credit from the key's shared 300-credit rolling 24-hour budget. Credits are charged before parameter validation. Successful responses and quota errors include usage headers; GET and OPTIONS support CORS.

API statusMeaning
200The diagnostic returned a result in data, with ok: true and version information in meta. Read the diagnostic fields to determine the target's condition.
400Invalid or blocked input, or a lookup/check failure that could not be returned as a diagnostic result. Read error for details.
401Missing, invalid or revoked API key.
429The request would exceed the key's available credit budget.
DNS Trace