Public API

Token-authenticated JSON endpoints for DNS, IP, ASN, and SSL lookups.

Authentication

Every request must include your token as a Bearer token:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://getdns.com.tr/api/public/v1/ip/8.8.8.8

Requests without a valid token get 401. Requests from a disabled account get 403, and so do requests from an IP address outside your account's allowed IP list (if you've set one — manage it from your account page). Each account has its own per-minute rate limit; going over it returns 429 with a Retry-After and an X-RateLimit-Limit / X-RateLimit-Remaining response header pair.

GET /api/public/v1/dns/{domain}/{type}

Look up a single DNS record type for a domain.

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://getdns.com.tr/api/public/v1/dns/example.com/A

GET /api/public/v1/ip/{ip}

Look up country, city, ISP, and ASN for an IPv4 or IPv6 address. Private, loopback and other non-public addresses are not looked up: the response carries a special object describing the address instead.

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://getdns.com.tr/api/public/v1/ip/8.8.8.8

POST /api/public/v1/ip

Look up up to 30 IP addresses in one request. Send a JSON body with an ips array. Results come back in input order with duplicates removed; an invalid address only fails its own row ("status": "error"). More than 30 addresses returns 422. Private, loopback and other non-public addresses come back with a special object instead of location data.

curl -X POST \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ips":["8.8.8.8","1.1.1.1"]}' \
  https://getdns.com.tr/api/public/v1/ip

GET /api/public/v1/asn/{asn}

Look up the network blocks announced by an Autonomous System Number.

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://getdns.com.tr/api/public/v1/asn/AS15169

GET /api/public/v1/ssl?hostname=&port=

Inspect the SSL/TLS certificate for a hostname and port (port defaults to 443).

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://getdns.com.tr/api/public/v1/ssl?hostname=example.com&port=443"

All responses are JSON with a status field ("ok" or "error"). The domain, IP, or ASN you query is never stored — we only keep an aggregate daily request count per account. See our privacy page.

No token required

These two endpoints return your own IP address as plain text — no account, no token, no JSON parsing needed.

GET /ip.txt

Your IP address, whichever protocol you connected with.

curl https://getdns.com.tr/ip.txt

GET /ipv6.txt

Your IPv6 address, only if that's how you connected — otherwise an empty response.

curl https://getdns.com.tr/ipv6.txt

Postman collection

Download the Postman collection for every endpoint on this page, ready to import.