# Subdomain Finder (`happitap/subdomain-finder`) Actor

Subdomain Finder is a high-speed intelligence tool that uncovers subdomains for any target domain using Certificate Transparency (CT) logs. Unlike traditional brute-force tools, it requires no heavy traffic and provides results in seconds.

- **URL**: https://apify.com/happitap/subdomain-finder.md
- **Developed by:** [HappiTap](https://apify.com/happitap) (community)
- **Categories:** Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 103 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 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

**Discover invisible subdomains and detect Cloudflare protection instantly.**

**Subdomain Finder** is a high-speed intelligence tool that uncovers subdomains for any target domain using Certificate Transparency (CT) logs. Unlike traditional brute-force tools, it requires no heavy traffic and provides results in seconds. It also automatically resolves IP addresses and detects if the subdomain is protected by Cloudflare.

### What can Subdomain Finder do?

- ✅ **Instant Discovery** - Find subdomains in seconds using CT logs
- ✅ **Infrastructure Mapping** - Resolve IP addresses for every subdomain
- ✅ **Cloudflare Detection** - Identify which subdomains are behind Cloudflare proxy
- ✅ **Security Recon** - Find forgotten or shadow IT subdomains
- ✅ **Export Formats** - JSON, CSV, Excel ready

### Why use Subdomain Finder?

Subdomain enumeration is a critical step in:

- **Security Audits**: Find exposed development, staging, or test environments.
- **Competitor Analysis**: Map out a competitor's infrastructure and service layout.
- **Bug Bounty Hunting**: Discover expanded attack surfaces.

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| **domain** | string | The target root domain (e.g., `rapidapi.com`) | Required |
| **resolveIps** | boolean | Attempt to resolve IP addresses | `true` |
| **detectCloudflare** | boolean | Check for Cloudflare protection | `true` |

### Output

The Actor stores results in the default dataset and provides an aggregated JSON in the Key-Value store.

#### Output Example (JSON)

```json
{
  "scan_date": "2023-12-09 23:43:11",
  "subdomains": [
    {
      "subdomain": "api.example.com",
      "ip": "172.67.1.1",
      "cloudflare": true
    },
    {
      "subdomain": "dev.example.com",
      "ip": "104.21.1.1",
      "cloudflare": true
    },
    {
      "subdomain": "legacy.example.com",
      "ip": "123.45.67.89",
      "cloudflare": false
    }
  ]
}
```

### How much does it cost?

This Actor uses a **Pay-Per-Event** pricing model.

- **Start Fee**: $0.0001 per run
- **Per Result**: $0.0005 per unique subdomain found

**Example**: Scanning a domain with 100 subdomains costs approximately **$0.05**.

### Is it legal?

Yes. This Actor uses **Certificate Transparency (CT) logs**, which are public records of issued SSL/TLS certificates. It does not perform invasive scanning or brute-forcing against the target infrastructure.

# Actor input Schema

## `domain` (type: `string`):

The root domain to scan for subdomains (e.g., example.com).

## `resolveIps` (type: `boolean`):

Attempt to resolve IP addresses for found subdomains.

## `detectCloudflare` (type: `boolean`):

Check if resolved IPs belong to Cloudflare.

## Actor input object example

```json
{
  "domain": "rapidapi.com",
  "resolveIps": true,
  "detectCloudflare": true
}
```

# 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 = {
    "domain": "rapidapi.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("happitap/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 = { "domain": "rapidapi.com" }

# Run the Actor and wait for it to finish
run = client.actor("happitap/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 '{
  "domain": "rapidapi.com"
}' |
apify call happitap/subdomain-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happitap/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/GiKsM8cylzAMp36ku/builds/JQYfDemfrh2a7VJmv/openapi.json
