Overview
SecurityTrails provides detailed DNS and WHOIS history for domains and IP addresses, letting you trace how a domain's configuration has changed over time. You can look up current and historical A records, MX records, nameservers, and registration data. It's valuable for threat hunting, domain investigations, and competitive research.
Beginner Tip
Start with the /v1/domain/{hostname} endpoint to get a quick snapshot of any domain's current DNS records and WHOIS data in one call.
Available Data
Example Response
{
"route": "Line 1",
"origin": "Station A",
"destination": "Station B",
"departure": "08:30",
"arrival": "09:15",
"status": "On Time",
"delays_min": 0
} Field Reference
hostname The domain name that was queried. current_dns Present DNS records grouped by type (a, aaaa, mx, ns, soa, txt). current_dns.a.values List of current A record IP addresses for the domain. alexa_rank Domain popularity rank (if available). apex_domain The root domain, useful when you query a subdomain. subdomain_count Number of known subdomains discovered for this domain. Implementation Example
const url = "https://securitytrails.com/corp/apidocs";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Similar APIs
View All →Application Environment Verification
Application Environment Verification (AEV) is an Android library and API from FingerprintJS that checks whether a user device is safe to use.
BinaryEdge
BinaryEdge is a cybersecurity platform that continuously scans the entire internet and exposes the results through its API.
Botd
Botd is an open-source JavaScript library and API from FingerprintJS that detects whether a web visitor is a bot or a real human browser.
Bugcrowd
The Bugcrowd API gives you programmatic access to your organization's bug bounty program data, including submissions, rewards, and researcher profiles.
Censys
Censys is an internet-wide scanning platform that lets you search for any internet-connected host, device, or certificate using its REST API.