---
title: "Forward DNS lookup for a hostname"
method: GET
path: "/api/v1/dns/forward/{hostname}"
tags: ["DNS Lookup API"]
---

# Forward DNS lookup for a hostname

`GET /api/v1/dns/forward/{hostname}`

Returns A and AAAA records for a given hostname. Results are cached for 5 minutes.

## Path parameters

- `hostname` string, required

## Response `200`

Forward DNS lookup succeeded

- ForwardDnsResponse
  - `hostname` string, required
  - `addresses` ForwardLookupRecord[], required
    - `type` string, required
    - `address` string, required
    - `ttl` integer, required

## Other responses

- `400` — Invalid hostname format
- `404` — No address records found for the hostname
- `502` — DNS lookup failed

---

[API](https://skmtc.dev/ip-api/apis/ip-api-io-ip-geolocation-security-api.md) · [All operations](https://skmtc.dev/ip-api/apis/ip-api-io-ip-geolocation-security-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ip-api/ip-api-io-ip-geolocation-security-api/revisions/a6862f586bf3/schema)
