# DNS Lookup — Zapi reference > Query DNS records (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA) via secure DNS-over-HTTPS resolver. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/dev-tools/dns-lookup - Endpoint catalog: https://zpi.web.id/category/dev-tools - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## DNS Lookup **Category:** dev-tools · **Slug:** `dns-lookup` **Detail page:** https://zpi.web.id/api/dev-tools/dns-lookup Query DNS records (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA) via secure DNS-over-HTTPS resolver. **Tags:** dns, domain, lookup, records ### Lookup Perform lookup dengan input yang diberikan. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/dev-tools:dns-lookup/lookup` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `domain` | string | query | yes | Domain name (akan di-normalize: strip protocol, www, path) | | `type` | enum(A|AAAA|MX|TXT|NS|CNAME|SOA|CAA) | query | no | DNS record type. Default: A | **cURL:** ```bash curl "https://api.zpi.web.id/v1/dev-tools:dns-lookup/lookup?domain=google.com&type=A" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/dev-tools:dns-lookup/lookup?domain=google.com&type=A", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/dev-tools:dns-lookup/lookup?domain=google.com&type=A", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "type": "A", "count": 6, "domain": "google.com", "source": "dns", "status": "NOERROR", "records": [ { "ttl": 281, "data": "142.250.4.100", "name": "google.com", "type": "A" }, { "ttl": 281, "data": "142.250.4.139", "name": "google.com", "type": "A" }, { "ttl": 281, "data": "142.250.4.101", "name": "google.com", "type": "A" }, { "ttl": 281, "data": "142.250.4.138", "name": "google.com", "type": "A" }, { "ttl": 281, "data": "142.250.4.102", "name": "google.com", "type": "A" }, { "ttl": 281, "data": "142.250.4.113", "name": "google.com", "type": "A" } ] } ``` --- _Generated: 2026-08-02T14:22:07.609Z_