canonical: https://jentic.com/apis/securitytrails.com/securitytrails

# SecurityTrails API

Jentic publishes the only available OpenAPI specification for SecurityTrails API, keeping it validated and agent-ready. The SecurityTrails API returns current and historical DNS, WHOIS, domain, and IP intelligence for security investigations. It looks up a hostname's current DNS records, subdomains, tags, associated domains, and parsed WHOIS, and returns historical A, AAAA, MX, NS, SOA, and TXT records and past WHOIS registrations. Filter-based searches find domains and IPs that match DNS or WHOIS attributes, an IP neighbors lookup lists nearby addresses, and a feed returns newly registered domains.

## For AI agents

Look up current and historical DNS, WHOIS, subdomains, and associated domains for a hostname, search domains and IPs by filter, and read new-domain feeds for AI agents.

## Scope

Does not scan ports, block traffic, or register domains. Use for reading DNS, WHOIS, domain, and IP intelligence only.

## Capabilities

- Look up a hostname's current DNS records and details, its subdomains, and its tags
- Retrieve historical DNS records for a hostname by type, such as a, mx, ns, or txt
- Read parsed current WHOIS and historical WHOIS records for a domain
- Find domains associated with a hostname through shared registrant or DNS data
- Search domains or IPs with a filter expression, optionally including IPs in domain results
- List neighboring IP addresses in the range around an IP
- Pull a feed of newly registered domains for phishing and brand monitoring

## Use cases

### AI agent enriching security alerts

An AI triage agent receives an alert naming a suspicious domain and needs context before escalating. Through Jentic the agent searches by intent, gets the SecurityTrails domain and DNS history operations with their input schemas, and calls them with the APIKEY header injected at execution time. It reports when the domain's A records changed and who registered it.

Example prompt: Call GET `/domain/{hostname}` and GET `/history/{hostname}/dns/{type}` with hostname 'suspicious-login.com' and type 'a', then GET `/domain/{hostname}/whois`, and summarise the hosting changes and registrant

### Attack surface discovery

A security team inventories everything exposed under its domains. SecurityTrails lists subdomains for a hostname, with children_only to limit to direct children, and returns associated domains linked by shared registrant or DNS data, revealing forgotten hosts and acquired properties.

Example prompt: Call GET `/domain/{hostname}/subdomains` for 'example.com', then GET `/domain/{hostname}/associated` page 1, and produce a deduplicated host inventory

### Phishing and brand monitoring

Brand protection teams watch for lookalike domains registered to impersonate them. The SecurityTrails new domains feed returns newly registered domains with a filter, and filter-based domain search finds domains sharing DNS or WHOIS attributes with a known phishing site.

Example prompt: Call GET `/feeds/domains` with type 'new' and filter set to the brand keyword, then check each match with GET `/domain/{hostname}/whois`

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/domain/{hostname}` | Get domain details |
| GET | `/domain/{hostname}/subdomains` | List subdomains |
| GET | `/domain/{hostname}/whois` | Get WHOIS data |
| GET | `/history/{hostname}/dns/{type}` | Get historical DNS records |
| GET | `/history/{hostname}/whois` | Get historical WHOIS records |
| POST | `/search/list` | Search domains with filters |
| POST | `/ips/list` | Search IPs with filters |
| GET | `/feeds/domains` | Newly registered domains feed |

## Key resources

- **Domains** — Current details and DNS, subdomains, tags, associated domains, and WHOIS by hostname
- **History** — Historical DNS records by type and historical WHOIS by hostname
- **Search** — Filter-based domain and IP search
- **IPs** — Neighboring IP addresses around a given IP
- **Feeds** — Newly registered domain feed

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 60 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 79 / 100
  - Developer Experience & Jentic Compatibility: 57 / 100
  - AI-Readiness & Agent Experience: 43 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 71 / 100
- **View full report:** https://jentic.com/apis/securitytrails.com/securitytrails/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring SecurityTrails by hand means sending the APIKEY header on every call, paging history results, and building filter objects for domain and IP searches. Through Jentic you install once, import SecurityTrails from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** SecurityTrails puts the hostname in the URL path (`/domain/{hostname}/...` and `/history/{hostname}/...`), so a rule can pin your agent to one domain. You choose the operations it may call, so open-ended filter searches and the new-domains feed are not included unless you add them.
- **Credential handling:** Your SecurityTrails API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get DNS history for a domain' or 'list subdomains', and Jentic returns the matching SecurityTrails operation with its input schema so the agent fills hostname and type correctly.

## Related APIs

- **DomainTools** — Domain and DNS intelligence for investigations
- **Censys** — Internet-wide host and certificate scan data
- **Shodan** — Search engine for internet-connected devices and exposed services

## FAQ

### Why is there no official OpenAPI spec for SecurityTrails API?

SecurityTrails does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call SecurityTrails API via structured tooling. It is validated against the live API and kept up to date. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### What authentication does the SecurityTrails API use?

Per its OpenAPI spec, the SecurityTrails API authenticates with an API key sent in the APIKEY request header, applied to every operation. GET /ping verifies the key. Through Jentic the key is held by your own Jentic One instance and injected per call, so the agent never sees it.

### Can I get historical DNS records with the SecurityTrails API?

Yes. GET `/history/{hostname}/dns/{type}` returns past records for a hostname, with type set to a, aaaa, mx, ns, soa, or txt and a page parameter for older results. GET `/history/{hostname}/whois` returns past WHOIS registrations.

### What are the rate limits for the SecurityTrails API?

The OpenAPI spec does not specify rate limits; check https://docs.securitytrails.com for current plan limits.

### Is there a SecurityTrails MCP server?

You don't need an MCP server to give your agent SecurityTrails. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the DNS, WHOIS, and search operations on demand.

### How do I list subdomains for a domain through Jentic?

Search Jentic for 'list subdomains of a domain', load the GET `/domain/{hostname}/subdomains` operation, and execute it with the hostname and optionally children_only set to true.

### Can I limit what my agent is allowed to do with the SecurityTrails API?

Yes. For example, write a rule that allows only GET `/domain/{hostname}/whois` and GET `/history/{hostname}/dns/{type}` for hostname example.com, and the agent can investigate that one domain without running open-ended filter searches. Every call it makes is logged.
