Domain to IP Lookup
Find the IP addresses behind any website or hostname.
Website to IP in one step: type a domain, a hostname or a full URL and get every A (IPv4) and AAAA (IPv6) record its DNS publishes, with the time-to-live, instantly. Each address links to its reverse DNS check and its geolocation. The other direction, IP to hostname, is one tab away or on the reverse DNS lookup page.
What a Domain to IP Lookup Tells You
Every website lives on one or more IP addresses. A domain to IP lookup asks the domain's DNS for them: the A records hold the IPv4 addresses, the AAAA records the IPv6 ones. The answer is what a browser gets a moment before it connects.
Website, domain, URL — one hostname
A full URL is resolved on its hostname; the scheme and the path play no role. Mind that www.example.com and example.com are different names and can point to different addresses, as can mail., api. or cdn. subdomains.
Several addresses are normal
Sites behind a CDN or a load balancer publish several A and AAAA records, and the set can change by region and by minute. The lookup shows all of them, grouped by type, with the TTL that says how long resolvers may cache each one.
Then look at the addresses
Each result links to the reverse DNS check (does the address point back to a hostname?) and to the IP lookup (country, city, ISP, ASN and the proxy, VPN, Tor and datacenter flags), so a hostname turns into a full picture in two clicks.
Forward DNS API
Resolves a hostname to all its A and AAAA records. Useful for confirming FCrDNS checks and verifying email sender configuration.
GET /api/v1/dns/forward/{hostname}
curl "https://ip-api.io/api/v1/dns/forward/dns.google" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"hostname": "dns.google",
"addresses": [
{
"type": "A",
"address": "8.8.8.8",
"ttl": 300
},
{
"type": "A",
"address": "8.8.4.4",
"ttl": 300
}
]
}
GET /api/v1/dns/forward/{hostname}
const response = await fetch(
"https://ip-api.io/api/v1/dns/forward/dns.google",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const data = await response.json();
data.addresses.forEach(a =>
console.log(a.type, a.address)
);
{
"hostname": "dns.google",
"addresses": [
{
"type": "A",
"address": "8.8.8.8",
"ttl": 300
},
{
"type": "A",
"address": "8.8.4.4",
"ttl": 300
}
]
}
GET /api/v1/dns/forward/{hostname}
import requests
response = requests.get(
"https://ip-api.io/api/v1/dns/forward/dns.google",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
for addr in data["addresses"]:
print(addr["type"], addr["address"])
{
"hostname": "dns.google",
"addresses": [
{
"type": "A",
"address": "8.8.8.8",
"ttl": 300
},
{
"type": "A",
"address": "8.8.4.4",
"ttl": 300
}
]
}
GET /api/v1/dns/forward/{hostname}
require "net/http"
require "json"
uri = URI("https://ip-api.io/api/v1/dns/forward/dns.google")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
data = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body)
data["addresses"].each do |addr|
puts "#{addr['type']}: #{addr['address']}"
end
{
"hostname": "dns.google",
"addresses": [
{
"type": "A",
"address": "8.8.8.8",
"ttl": 300
},
{
"type": "A",
"address": "8.8.4.4",
"ttl": 300
}
]
}
Reverse DNS API
Resolves an IP address to its PTR record and hostname. Returns structured JSON — no DNS parsing required on your end.
GET /api/v1/dns/reverse/{ip}
curl "https://ip-api.io/api/v1/dns/reverse/8.8.8.8" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"ptr_record": "8.8.8.8.in-addr.arpa",
"ttl": 300
}
GET /api/v1/dns/reverse/{ip}
const response = await fetch(
"https://ip-api.io/api/v1/dns/reverse/8.8.8.8",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const data = await response.json();
console.log(data.hostname); // "dns.google"
console.log(data.ptr_record); // "8.8.8.8.in-addr.arpa"
console.log(data.ttl); // 300
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"ptr_record": "8.8.8.8.in-addr.arpa",
"ttl": 300
}
GET /api/v1/dns/reverse/{ip}
import requests
response = requests.get(
"https://ip-api.io/api/v1/dns/reverse/8.8.8.8",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
print(data["hostname"]) # dns.google
print(data["ptr_record"]) # 8.8.8.8.in-addr.arpa
print(data["ttl"]) # 300
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"ptr_record": "8.8.8.8.in-addr.arpa",
"ttl": 300
}
GET /api/v1/dns/reverse/{ip}
require "net/http"
require "json"
uri = URI("https://ip-api.io/api/v1/dns/reverse/8.8.8.8")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
data = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }.body)
puts data["hostname"] # dns.google
puts data["ptr_record"] # 8.8.8.8.in-addr.arpa
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"ptr_record": "8.8.8.8.in-addr.arpa",
"ttl": 300
}
Domain to IP Lookup — FAQs
What does a domain to IP lookup do?
It resolves a hostname — a website like example.com or a server name like mail.example.com — to the IP addresses its DNS publishes: the A records (IPv4) and AAAA records (IPv6), each with its time-to-live. It is the forward direction of DNS; the reverse DNS lookup goes from an IP back to a hostname.
What is the difference between A and AAAA records?
An A record maps a hostname to an IPv4 address (four numbers, like 93.184.216.34); an AAAA record maps it to an IPv6 address (eight hexadecimal groups). A website usually has at least one A record and, if it is reachable over IPv6, one or more AAAA records. The lookup shows both, grouped by type.
Why does a domain return several IP addresses?
Large sites and anything behind a CDN or a load balancer answer with several addresses so that traffic spreads across servers and regions, and the set can differ from one resolver or minute to the next. All of them are valid; which one a visitor uses is up to their resolver and client.
Why does a domain return no addresses?
Either the name does not exist, or it has no A/AAAA records (a domain used only for e-mail or as an alias may have MX or CNAME records but no addresses), or its DNS is misconfigured. The lookup says "no addresses found" in that case; a failed lookup (timeout, DNS error) is reported separately so you know the difference.
Website to IP, domain to IP, URL to IP — is it the same thing?
Yes, for the hostname part. A URL like https://www.example.com/page is resolved on its hostname www.example.com; the scheme and the path play no role. Note that www.example.com and example.com are different names and can point to different addresses.
Is there an API for domain to IP lookups?
Yes: GET /api/v1/dns/forward/{hostname} returns every A and AAAA record with its TTL, and GET /api/v1/dns/reverse/{ip} does the reverse direction. Both are documented below and metered like an IP lookup.
Simple, transparent pricing
Start small, scale as you grow. No hidden fees.
Resolve hostnames at any scale
Domain to IP, website to IP and reverse DNS lookups through one simple REST API — every A and AAAA record with its TTL, in JSON.