# Subdomain Finder: Live DNS & HTTP Subdomain Discovery (`mjohnson7cd/subdomain-finder`) Actor

Find a domain's subdomains live from certificate transparency (crt.sh) plus a DNS wordlist. Each result is DNS-validated, HTTP/HTTPS probed and titled, with wildcard-DNS false positives filtered out. Export CSV, Excel, JSON or API. Beta: feedback welcome.

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

## Pricing

from $2.75 / 1,000 subdomain discovereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

This **subdomain finder** discovers the subdomains of a domain live, from
**certificate transparency logs (crt.sh)** plus a DNS wordlist, and returns one clean
row per subdomain: whether it resolves, its IP addresses, its HTTP and HTTPS status and
its page title. Wildcard-DNS false positives are filtered out before anything reaches
your dataset, and every result exports to CSV, Excel, JSON or the Apify API.

Use it to map the attack surface of a domain you own or are authorised to test: a bug
bounty scope, a penetration test, an asset inventory or a forgotten-staging-server
audit. Each run fetches live, so you see the subdomains that exist today.

> **Beta.** The output columns and the charged event are stable and covered by an
> automated regression suite. Input options may still gain fields. Problems and
> requests go on the [Issues tab](https://apify.com/mjohnson7cd/subdomain-finder/issues).

### What does this subdomain finder return?

One row per unique subdomain, with the same columns every time:

- **Where it came from** - `source` is `crt.sh` (seen in a TLS certificate) or
  `bruteforce` (found by the DNS wordlist).
- **DNS** - `resolves` and the A-record `ips`, with CNAME chains followed.
- **Web** - `httpsStatus` or `httpStatus` (HTTPS is tried first) and the `pageTitle`
  of the page that answered.

### How to find subdomains of a domain: step by step

1. Click **Try for free** and sign in to Apify.
2. Enter one or more apex domains in **Target Domains**, e.g. `example.com`. A pasted
   URL works too. Up to 10 domains per run.
3. Optional: pick the **Wordlist Size** - small (15 names), medium (54), or large (101) -
   or turn **DNS Bruteforce** off to use certificate transparency only.
4. Optional: turn off **HTTP Probe** if you only need DNS data.
5. Click **Start**. Rows appear as they are found. Export them from the **Storage**
   tab as CSV, Excel or JSON, or read them over the [Apify API](https://docs.apify.com/api/v2).

On the Apify platform you also get [scheduling](https://docs.apify.com/platform/schedules)
(re-scan a domain weekly and diff the results),
[integrations](https://docs.apify.com/platform/integrations) (Make, Zapier, Slack,
Google Sheets, webhooks) and API access, without writing any of it yourself.

### How much does the subdomain finder cost?

One paid event, **`subdomain-discovered`**, charged once for each unique subdomain
delivered to your dataset. The price depends on your Apify plan:

| Apify plan | Price per subdomain | 100 subdomains, about |
|---|---|---|
| Free | $0.005 | $0.50 |
| Starter | $0.00425 | $0.43 |
| Scale | $0.0035 | $0.35 |
| Business and above | $0.00275 | $0.28 |

Apify adds its standard run-start charge of $0.00005 per run (charged once, because
the Actor runs on at most 1 GB of memory). There is no monthly fee and no
compute-unit bill on top.

What is **not** charged:

- Names that do not resolve, when DNS validation is on (the default).
- Duplicates: a subdomain found by both crt.sh and the wordlist, or under two of your
  domains, is delivered and charged once.
- Anything after your **max cost per run**: the run trims to what your budget pays for
  and stops cleanly, so the total never goes over the limit you set.

With DNS validation off (`dnsValidation: false`), names found in crt.sh are billed
without a live DNS check: each one is delivered and charged even if it no longer resolves
(its `resolves` is `null`). Wordlist names are found by resolving them, so they are always
live. The Pricing tab always shows the current prices.

### Input example

```json
{
  "domains": ["example.com"],
  "dnsValidation": true,
  "httpProbe": true,
  "bruteforce": true,
  "wordlistSize": "medium"
}
```

### Output: one row per subdomain

```json
{
  "domain": "example.com",
  "subdomain": "api.example.com",
  "source": "crt.sh",
  "resolves": true,
  "ips": ["104.21.1.1"],
  "httpStatus": null,
  "httpsStatus": 200,
  "pageTitle": "API Portal"
}
```

- With DNS validation off, `resolves` is `null` and `ips` is empty.
- `httpsStatus` / `httpStatus` are `null` when the probe is off or the host did not
  answer. Only the first scheme that answers is recorded (HTTPS first).
- Redirects are followed (up to 10), so the status and `pageTitle` are those of the
  final page, which can be on another host. `pageTitle` is filled only on HTTP 200.

The **Subdomains** view in the Storage tab shows the rows as a table.

### Limits, stated plainly

- **Discovery is crt.sh plus a 15, 54 or 101-name wordlist.** A subdomain that never
  had a public TLS certificate and is not on the wordlist will not be found. This is
  not a full DNS zone dump.
- **crt.sh is a free public service and is sometimes slow or down.** If it fails for
  one domain, that domain is still scanned with the wordlist (when bruteforce is on).
  If it fails for 3 domains in a row, the run stops asking it and says so in the
  status message.
- **Wildcard DNS.** On a domain that answers every name, wordlist hits that resolve to
  the wildcard's addresses are dropped. A real host sharing the wildcard's IP is
  dropped with them.
- **Internal addresses are never contacted.** A subdomain resolving to a private,
  loopback or cloud-metadata address is reported with its IPs but not HTTP-probed.
- Up to 10 domains per run. Large domains with thousands of certificate names take
  longer, because every name is resolved and probed.

### FAQ

**Is it legal to scan for subdomains?** Certificate transparency logs are public, and
DNS lookups are ordinary internet traffic. The HTTP probe does send requests to the
hosts it finds. Only scan domains you own or are explicitly authorised to test (your
own assets, in-scope bug bounty targets, or a pentest with written permission). You
are responsible for having that permission.

**Why did a subdomain I know about not show up?** It is probably not in any public
certificate and not on the wordlist, or it does not resolve publicly. Try the large
wordlist, or turn DNS validation off to see unchecked crt.sh names.

**Why did my run stop early?** The status message says why: either your max cost per
run was reached, or crt.sh was down.

**Something is broken or missing.** Open an issue on the
[Issues tab](https://apify.com/mjohnson7cd/subdomain-finder/issues).

### Other Actors by the same author

| Actor | What it does |
|---|---|
| [AliExpress Scraper](https://apify.com/mjohnson7cd/aliexpress-scraper) | Products, prices, discounts and units sold from AliExpress search |
| [Walmart Scraper](https://apify.com/mjohnson7cd/walmart-scraper) | Walmart search, product pages, seller offers and reviews in one Actor |
| [Walmart Search Scraper](https://apify.com/mjohnson7cd/walmart-search-scraper) | Walmart products and prices by keyword |
| [Walmart Product Scraper](https://apify.com/mjohnson7cd/walmart-product-scraper) | Walmart price, stock and seller offers by product URL or item ID |
| [Walmart Reviews Scraper](https://apify.com/mjohnson7cd/walmart-reviews-scraper) | Walmart customer reviews by product URL or item ID |
| [EU Company Registry & KYB Lookup](https://apify.com/mjohnson7cd/eu-company-registry-kyb) | Company lookups in the official FR, NO, FI and CZ registries |
| [API Endpoint Crawler](https://apify.com/mjohnson7cd/api-endpoint-crawler) | Finds the API endpoints a website's JavaScript calls |
| [Tech Stack Fingerprinter](https://apify.com/mjohnson7cd/tech-stack-fingerprinter) | Detects a website's server, CDN, frameworks, CMS, analytics and security headers |

### Affiliation

Not affiliated with or endorsed by crt.sh or its operator. crt.sh is named only as
the public certificate-transparency source this Actor queries.

# Changelog

This Actor's version history is a separate document: https://apify.com/mjohnson7cd/subdomain-finder/changelog.md

# Actor input Schema

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

Apex domains to enumerate (e.g., example.com), up to 10 per run. Only enter domains you own or are authorised to test.

## `dnsValidation` (type: `boolean`):

Verify subdomains resolve via DNS; names that do not resolve are dropped and not charged. Off: every candidate name is delivered and charged without being checked.

## `httpProbe` (type: `boolean`):

Check HTTP/HTTPS status of discovered subdomains

## `bruteforce` (type: `boolean`):

Try common subdomain names

## `wordlistSize` (type: `string`):

Size of subdomain wordlist for bruteforce

## Actor input object example

```json
{
  "domains": [
    "example.com"
  ],
  "dnsValidation": true,
  "httpProbe": true,
  "bruteforce": true,
  "wordlistSize": "medium"
}
```

# Actor output Schema

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

Dataset containing all validated subdomains with DNS and HTTP probe results

# 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("mjohnson7cd/subdomain-finder").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("mjohnson7cd/subdomain-finder").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 mjohnson7cd/subdomain-finder --silent --output-dataset

```

## MCP server setup

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

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/Etdb1UYYhfKPcYTBa/builds/5MDaenIjeXpBETJRD/openapi.json
