# Subdomain Finder: Passive Certificate Transparency Lookup (`sea_sorghum/subdomain-finder-ct`) Actor

Find subdomains of any domain from public Certificate Transparency logs (crt.sh + Cert Spotter). Optional live DNS check, first/last seen dates and issuers.

- **URL**: https://apify.com/sea_sorghum/subdomain-finder-ct.md
- **Developed by:** [Bader Aloqily](https://apify.com/sea_sorghum) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Subdomain Finder – Passive Certificate Transparency Lookup (crt.sh + Cert Spotter)

Find the **subdomains of any domain** from public **Certificate Transparency (CT) logs**, without ever touching the target's servers. Great for **attack-surface mapping, bug bounty recon, brand protection, M\&A due diligence and SEO/competitor research**.

Every public HTTPS certificate is logged in CT logs. This Actor searches them through **crt.sh** and **Cert Spotter**, merges the results, de-duplicates them and (optionally) checks over DNS whether each subdomain still resolves.

### What you get for every subdomain

- `subdomain` and its `domain` (root)
- `resolves`, `ips` and `cname` (live DNS check over DNS-over-HTTPS, optional)
- `firstSeen`, `lastSeen` and `latestExpiry` (from certificate validity dates)
- `certCount` (certificate log entries), `issuers`, `sources`
- `coveredByWildcard` flag

Useful for spotting **forgotten staging hosts, dangling CNAMEs (subdomain takeover candidates), new launches** and shadow IT.

### Input

| Field | Description | Default |
| --- | --- | --- |
| `domains` | Root domains (URLs accepted) | required |
| `sources` | `crtsh`, `certspotter` | both |
| `resolveDns` | Add IPs / CNAME / resolves flag | true |
| `onlyResolving` | Return only live subdomains | false |
| `maxSubdomainsPerDomain` | Cap per domain (also caps cost) | 1000 |
| `certspotterApiKey` | Optional, raises Cert Spotter limits | none |

```json
{ "domains": ["example.com"], "onlyResolving": true, "maxSubdomainsPerDomain": 500 }
```

### Output example

```json
{
  "domain": "github.com",
  "subdomain": "api.security.github.com",
  "resolves": true,
  "ips": ["140.82.112.22"],
  "cname": "glb-db52c2cf8be544.github.com",
  "certCount": 4,
  "firstSeen": "2026-07-21T23:02:08.000Z",
  "latestExpiry": "2026-12-18T23:12:22.000Z",
  "issuers": ["Let's Encrypt"],
  "sources": ["certspotter"]
}
```

### Pricing

Pay per event: one "result" per subdomain delivered, plus a tiny start fee. Failures are logged in the ERRORS record and never charged.

### Good to know

- **Passive only.** Results come from public logs, not DNS brute-forcing or port scans, so hosts that never had a public certificate (or only internal certs) will not appear.
- Free CT services rate-limit and sometimes return errors (crt.sh can return 502 on large domains). Using both sources and the optional Cert Spotter key improves coverage.
- Use only on domains you are authorised to assess or that you are researching through public information.

### FAQ

**Does it send traffic to the target?** No, only to CT search services and public DNS resolvers.
**Wildcard certificates?** `*.example.com` shows up as the base name flagged `coveredByWildcard`; wildcard names do not reveal individual hosts.

# Actor input Schema

## `domains` (type: `array`):

Root domains to enumerate, such as example.com. URLs are accepted; the domain is extracted.

## `sources` (type: `array`):

Certificate Transparency search services to query. Using both finds the most names and survives one service being down.

## `resolveDns` (type: `boolean`):

Look up A/AAAA/CNAME records over DNS-over-HTTPS and add IPs and a 'resolves' flag. Public resolvers are used, the target is not contacted.

## `onlyResolving` (type: `boolean`):

Drop subdomains with no DNS records (expired or internal names). Requires the DNS check.

## `includeWildcardOnly` (type: `boolean`):

Normally the bare root domain is skipped when it only appears via a wildcard certificate.

## `maxSubdomainsPerDomain` (type: `integer`):

Upper bound per root domain. This also caps your cost.

## `certspotterApiKey` (type: `string`):

Optional. Raises the Cert Spotter rate limit. Leave empty for the free anonymous tier.

## Actor input object example

```json
{
  "domains": [
    "example.com"
  ],
  "sources": [
    "crtsh",
    "certspotter"
  ],
  "resolveDns": true,
  "onlyResolving": false,
  "includeWildcardOnly": false,
  "maxSubdomainsPerDomain": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sea_sorghum/subdomain-finder-ct").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": ["example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("sea_sorghum/subdomain-finder-ct").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "example.com"
  ]
}' |
apify call sea_sorghum/subdomain-finder-ct --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sea_sorghum/subdomain-finder-ct"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7DDURXGL500cLdvEx/builds/TTAzerFfcCHNLkIlM/openapi.json
