{
  "openapi": "3.0.1",
  "info": {
    "title": "Subdomain Finder via CT Logs: DNS, Takeover Hints & Alerts",
    "description": "Passive CT-log subdomain discovery with source-linked certificate dates, optional DNS and dangling-CNAME hints, and only-new monitoring. crt.sh by default; Cert Spotter requires explicit opt-in. Transparent per-host billing and strict run-budget guards.",
    "version": "0.2",
    "x-build-id": "TRDcIR23EwDT3Iy9j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foresighted_sunset~subdomain-finder-ct-logs/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foresighted_sunset-subdomain-finder-ct-logs",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/foresighted_sunset~subdomain-finder-ct-logs/runs": {
      "post": {
        "operationId": "runs-sync-foresighted_sunset-subdomain-finder-ct-logs",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/foresighted_sunset~subdomain-finder-ct-logs/run-sync": {
      "post": {
        "operationId": "run-sync-foresighted_sunset-subdomain-finder-ct-logs",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Root domains to search (max 100). Empty input returns 3 clearly labelled archived CT rows from 2026-10-29, without external requests or custom event fees. Set domains for live data.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "CT sources",
            "enum": [
              "auto",
              "both",
              "crtsh",
              "certspotter"
            ],
            "type": "string",
            "description": "crtsh (default): crt.sh only. auto: crt.sh with fallback ONLY if enableCertSpotter=true. both/certspotter also require explicit opt-in.",
            "default": "crtsh"
          },
          "includeExpired": {
            "title": "Include hosts seen only in expired certificates",
            "type": "boolean",
            "description": "Off = only hosts with a currently valid certificate. On = full history (good for finding forgotten hosts). Cert Spotter lists unexpired certificates only.",
            "default": false
          },
          "wildcardMode": {
            "title": "Wildcard names (*.dev.example.com)",
            "enum": [
              "merge",
              "separate",
              "drop"
            ],
            "type": "string",
            "description": "merge = count *.dev.example.com as dev.example.com and flag hasWildcardCert. separate = keep *.dev.example.com as its own row. drop = ignore wildcard names.",
            "default": "merge"
          },
          "includeRootDomain": {
            "title": "Include the root domain itself",
            "type": "boolean",
            "description": "Output a row for example.com itself when it appears in certificates.",
            "default": true
          },
          "maxSubdomainsPerDomain": {
            "title": "Max subdomains per domain",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap per root domain. If more are found, the most recently seen are kept and a warning is logged. Default 5000 (50 in the demo)."
          },
          "resolveDns": {
            "title": "Resolve DNS (A / AAAA / CNAME)",
            "type": "boolean",
            "description": "Look up each found host. Adds dnsStatus, a, aaaa, cname and a dangling-CNAME hint. Passive: DNS queries only, no ports or HTTP. On by default in the demo."
          },
          "onlyResolving": {
            "title": "Only output hosts that resolve",
            "type": "boolean",
            "description": "Drop hosts without A/AAAA records (turns DNS resolve on).",
            "default": false
          },
          "takeoverHints": {
            "title": "Dangling-CNAME takeover hints",
            "type": "boolean",
            "description": "Flag hosts whose CNAME points to a name that no longer resolves, naming the service (GitHub Pages, S3, Azure, Heroku…). A hint to verify manually, not a confirmed vulnerability.",
            "default": true
          },
          "dnsServers": {
            "title": "DNS servers (optional)",
            "type": "array",
            "description": "Resolver IPs, e.g. 1.1.1.1. Empty = the platform resolver.",
            "items": {
              "type": "string"
            }
          },
          "dnsConcurrency": {
            "title": "DNS lookups in parallel",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hosts looked up at the same time.",
            "default": 10
          },
          "monitor": {
            "title": "Monitor mode (remember seen subdomains)",
            "type": "boolean",
            "description": "Remember found hosts in a named key-value store, one record per domain. Schedule the Actor to get alerts for new subdomains. The first run outputs everything (baseline).",
            "default": false
          },
          "onlyNew": {
            "title": "Only output new subdomains",
            "type": "boolean",
            "description": "With monitor mode, output only hosts not seen in earlier runs.",
            "default": true
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memories for separate watch lists (letters, digits, - _ . ! ' ( ), max 60).",
            "default": "default"
          },
          "stateStoreName": {
            "title": "Memory key-value store",
            "type": "string",
            "description": "Named key-value store that keeps the monitor memory between runs.",
            "default": "subdomain-finder-ct-state"
          },
          "certspotterApiKey": {
            "title": "Cert Spotter API key (optional)",
            "type": "string",
            "description": "Without a key, SSLMate allows a limited number of Cert Spotter queries per hour for personal/evaluation use. Add your own key (sslmate.com) for regular or heavier use."
          },
          "certspotterMaxPages": {
            "title": "Cert Spotter max pages per domain",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Each page is one request. Default 5 without a key, 50 with one."
          },
          "crtshTimeoutSecs": {
            "title": "crt.sh timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Per request. On timeout or 5xx the Actor tries crt.sh's plain query once, then falls back to Cert Spotter (in auto mode).",
            "default": 60
          },
          "maxResponseMb": {
            "title": "Max crt.sh response size (MB)",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "Bigger crt.sh answers are not loaded; the domain falls back to Cert Spotter. Raise together with memory for very large domains.",
            "default": 40
          },
          "enableCertSpotter": {
            "title": "Enable Cert Spotter (explicit terms opt-in)",
            "type": "boolean",
            "description": "Off by default, even with an API key. Enable only if your SSLMate plan permits the intended commercial/personal use. Needed for auto fallback, both, or certspotter sources.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}