# Reverse DNS (PTR) (`dns.reverse`)

Host names an IPv4 or IPv6 address points back to (PTR records), with a forward-confirmation check.

- **Route:** `POST /v1/run/dns.reverse`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs network checks (`netcheck`) · failover: no
- **Measured latency:** p50 12 ms · p95 12 ms · p99 12 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `ip` | string | yes |  | IPv4 or IPv6 address |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `hostnames` | PTR host names. |
| `has_ptr` | True when at least one PTR record exists. |
| `forward_confirmed` | True when the first name resolves back to the address. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/dns.reverse \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ip":"8.8.8.8"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('dns.reverse', {'ip': '8.8.8.8'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run dns.reverse '{"ip":"8.8.8.8"}'
```

Quote first (free, validates input): `POST /v1/quote/dns.reverse` with the same body.
