API REFERENCE · GET · STABLE

Reverse DNS (PTR) API — /api/v1/domain/reverse

Issues a PTR query against the chosen public resolver and returns whatever the IP owner has published.

01 · OVERVIEW

What Reverse DNS (PTR) does

Issues a PTR query against the chosen public resolver and returns whatever the IP owner has published.

  • Method GET
  • Path /api/v1/domain/reverse
  • Stability STABLE
  • Version v2026-05-15
  • Summary PTR lookup — resolve an IPv4 address to its reverse DNS record.
02 · PARAMETERS

Request parameters

Pass these as query-string parameters (or, where indicated, in the request headers). Required params marked required.

  • ip (required) — string IPv4 address. IPv6 is currently rejected.
  • server — string, default "Cloudflare" Resolver to query.
03 · RESPONSE

Response schema

All successful responses follow the standard `{ success: true, data: {...} }` envelope. Notable fields on the data object for this endpoint:

  • data.data[] — array<object> PTR records — `{name, class, type, ttl, data}`.
04 · EXAMPLE

Example response

Truncated but representative example for a real lookup:

Sample response
{
  "success": true,
  "data": {
    "data": [
      {
        "name": "8.8.8.8.in-addr.arpa",
        "class": "IN",
        "type": "PTR",
        "ttl": 77401,
        "data": "dns.google"
      }
    ]
  }
}
05 · ERRORS

Error codes

Errors return HTTP status codes paired with stable machine-readable codes. Match on the code field rather than the human-readable message.

  • 404 NO_PTR_RECORD The IP has no PTR record (most consumer IPs).
06 · BEST PRACTICES

Implementation tips

Patterns we recommend when integrating this endpoint:

  • Most residential IPs lack PTR records — handle empty results gracefully.