Skip to Content
Reverse DNS API

Reverse DNS Lookup1 Credit

Find the hostname behind an IP address or range, check that it resolves back, and see its reverse zone.

GET
/v1/reverse

The Reverse DNS API finds the hostname an IP address points back to: its PTR records, with their TTLs. It checks that each hostname resolves back to the address (forward-confirmed reverse DNS, which mail servers rely on), flags hostnames that look generated for an address pool, and names the reverse zone that holds the records, with its nameservers and SOA. It takes an IPv4 or IPv6 address, its reverse name (8.8.8.8.in-addr.arpa), or a range of up to 256 addresses.

A CIDR range up to an IPv4 /24 or an IPv6 /120 looks up every address in it, network address first, and answers with one result per address. The slash can be escaped or left as it is: ?ip=192.0.2.0%2F28 and ?ip=192.0.2.0/28 are the same call. Each address has its own status, so one that fails doesn't fail the rest: it is listed in errors and the response is still a 200. A single address that fails (SERVFAIL, or no answer in time) is an error response.

One credit per address answered, a negative answer (no PTR record) included. A single address costs one credit. A range reserves one credit per address and is charged only for the addresses that got an answer, so a full /24 costs at most 256. A batch costs one credit per address answered too.

Each address answered costs 1 credit. Results are cached for up to 10 minutes.

Authorization

See Authentication for details.

headerX-API-Key<token>

Provide your API key in an HTTP request header.

Query Parameters

ip*string

An IPv4 or IPv6 address, its reverse name (8.8.8.8.in-addr.arpa), or a CIDR range of up to 256 addresses (a /24 or a /120)

Length1 <= length
verbose?boolean

Return extra detail: totalElapsed, retries and params, plus each errors entry's detail when the lookup fails.

Defaultfalse
fcrdns?boolean

Look each PTR hostname up forward (A for IPv4, AAAA for IPv6) and say whether it resolves back to the address. Up to 10 hostnames per address are checked, 2 per address of a range

Defaulttrue
server?string

The DNS server to ask: a public resolver ID (cloudflare, google, quad9), any resolver address or hostname, or authoritative to walk the delegation from the root to the reverse zone's own nameservers. Defaults to Cloudflare

transport?string

DNS transport: udp (a truncated answer is asked again over TCP) or tcp

Default"udp"
Value in"udp""tcp"

Response Body

Successful reverse response

application/json
  1. response
tool*string

Tool that generated this result

Value in"dns""domain""reverse""site""dnssec""ssl""email""redirect"
query*string

The original query string

requestId*|

Unique request identifier that generated this result

timestamp*string

UTC timestamp when the result was generated

elapsed*|

Time taken to generate the result in milliseconds

cached*boolean

Whether this result was served from cache

totalElapsed?|

Returned with verbose. Total time in milliseconds, including retries and any lookups this one made. For a cached result, the time to read it

retries?number

Returned with verbose. Number of retries before the answer, 0 for a cached result

params?

Returned with verbose. The query parameters you set that differ from their defaults

results*array<>|

One result per address: one for an address, one per address of a range

errors*array<>

On a 200, one entry per address of a range whose lookup failed (SERVFAIL, REFUSED, a timeout), naming the address in its message; empty when every address was answered. On any other status, why the request failed. The HTTP status is in the response line only

Errors

See Errors for the response format.

invalid_request
A parameter is missing or not valid, or is not one this endpoint takes.
400
invalid_query
The query is not an IP address, a reverse name, or a range of at most 256 addresses.
400
blocked_address
The server resolves to a private or reserved address.
400
authentication_failed
No API key was sent, or it could not be checked.
401
invalid_api_key
The API key is not valid.
401
api_key_expired
The API key has expired.
401
out_of_credits
The account does not have the credits the call may cost.
402
forbidden
The caller may not use this tool.
403
server_not_found
No server can be found to ask.
422
rate_limited
The caller is over its rate limit; retry after the Retry-After header.
429
internal_error
An internal error on our side.
500
upstream_timeout
A DNS server did not answer in time.
503
upstream_unreachable
A DNS server could not be reached.
503
upstream_invalid
A DNS server failed the lookup (SERVFAIL or REFUSED) or sent an answer that cannot be used.
503
Example Request
curl -X GET 'https://api.dns.tools/v1/reverse?ip=8.8.8.8'
Example Response
{  "tool": "reverse",  "query": "8.8.8.8",  "requestId": "7f29cc58-deb3-4d6e-98be-2d9e7fe43af1",  "timestamp": "2026-11-30T03:09:41.095Z",  "elapsed": 512,  "cached": true,  "errors": [],  "results": [    {      "query": "8.8.8.8",      "ip": "8.8.8.8",      "name": "8.8.8.8.in-addr.arpa",      "found": true,      "status": "NOERROR",      "rcode": 0,      "hostname": "dns.google",      "hostnames": [        "dns.google"      ],      "ptr": [        {          "hostname": "dns.google",          "ttl": 83777        }      ],      "fcrdns": {        "result": "pass",        "checks": [          {            "hostname": "dns.google",            "addresses": [              "8.8.4.4",              "8.8.8.8"            ],            "match": true          }        ]      },      "generic": null,      "zone": {        "name": "8.8.8.in-addr.arpa",        "nameservers": [          "ns1.google.com",          "ns2.google.com",          "ns3.google.com",          "ns4.google.com"        ],        "soa": {          "mname": "ns1.google.com",          "rname": "dns-admin.google.com",          "serial": 1032049294,          "minimum": 60        },        "classless": false      },      "server": "1.1.1.1",      "serverName": "one.one.one.one",      "serverType": "public"    }  ]}