{
  "openapi": "3.0.1",
  "info": {
    "title": "DNS History API - Subdomains, WHOIS History, SSL, IP Search",
    "description": "DNS history, subdomain finder, current and historical WHOIS, SSL certificates, associated domains, reverse domain search and IP search from the SecurityTrails API. One row per record, paged, deduplicated, pay per result. Bring your own key.",
    "version": "0.1",
    "x-build-id": "jsXU31Lp0WrXRwOI7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~dns-history-subdomains-whois-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-dns-history-subdomains-whois-api",
        "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/nabeelbaghoor~dns-history-subdomains-whois-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-dns-history-subdomains-whois-api",
        "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/nabeelbaghoor~dns-history-subdomains-whois-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-dns-history-subdomains-whois-api",
        "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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "domainDetails",
              "subdomains",
              "dnsHistory",
              "whois",
              "whoisHistory",
              "sslCertificates",
              "associatedDomains",
              "domainSearch",
              "ipSearch",
              "ipWhois"
            ],
            "type": "string",
            "description": "Current DNS gives one row per domain with its A, AAAA, MX, NS, SOA and TXT records. Subdomains gives one row per known subdomain. DNS history gives one row per historical record period for each record type. Current WHOIS and WHOIS history give the registration record now and over time. SSL certificates lists the certificates seen for a domain. Associated domains finds domains sharing its owner. Domain search and IP search query the whole SecurityTrails database. IP WHOIS reads the owner of an IPv4 address. Some endpoints are not on every SecurityTrails plan.",
            "default": "domainDetails"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "One hostname per line, such as example.com or mail.example.com. A URL or an email address is reduced to its hostname. Used by every domain mode. Each domain is one request, or one per page for the paged modes.",
            "items": {
              "type": "string"
            }
          },
          "ips": {
            "title": "IP addresses",
            "type": "array",
            "description": "IP WHOIS only. One IPv4 address per line; the endpoint is documented for IPv4 only.",
            "items": {
              "type": "string"
            }
          },
          "dnsRecordTypes": {
            "title": "DNS history record types",
            "type": "array",
            "description": "DNS history only. Each record type is one lookup per domain.",
            "items": {
              "type": "string",
              "enum": [
                "a",
                "aaaa",
                "mx",
                "ns",
                "soa",
                "txt"
              ],
              "enumTitles": [
                "A (IPv4)",
                "AAAA (IPv6)",
                "MX (mail servers)",
                "NS (name servers)",
                "SOA (zone authority)",
                "TXT (SPF, verification)"
              ]
            },
            "default": [
              "a"
            ]
          },
          "sslStatus": {
            "title": "Certificate status",
            "enum": [
              "valid",
              "all",
              "expired"
            ],
            "type": "string",
            "description": "SSL certificates only. Which certificates to list.",
            "default": "valid"
          },
          "sslIncludeSubdomains": {
            "title": "Include subdomain certificates",
            "type": "boolean",
            "description": "SSL certificates only. Also list certificates issued for subdomains of the domain.",
            "default": false
          },
          "domainSearchFilter": {
            "title": "Domain search filter",
            "type": "object",
            "description": "Domain search only. A JSON object of documented filter fields, combined with AND: ipv4 (may include a CIDR mask), ipv6, apex_domain, keyword, mx, ns, cname, subdomain, soa_email, tld, whois_email, whois_name, whois_organization, whois_telephone, whois_fax, whois_city, whois_postalCode and whois_street1 to whois_street4. For example {\"ns\": \"ns1.example.net\"} finds domains on that name server, {\"whois_email\": \"dns-admin@example.com\"} is a reverse WHOIS."
          },
          "includeIps": {
            "title": "Include resolved IPs",
            "type": "boolean",
            "description": "Domain search only. Resolve each hit's A records and return the IP addresses.",
            "default": false
          },
          "ipSearchQuery": {
            "title": "IP search query",
            "type": "string",
            "description": "IP search only. A SecurityTrails DSL query against the IP database, for example ptr_part = 'amazon.com' or ports = 443."
          },
          "maxPages": {
            "title": "Maximum pages per lookup",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Paged modes only (DNS history, WHOIS history, associated domains, domain search, IP search). Every page is one request against your plan's monthly allowance.",
            "default": 10
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. A rate limit answer is waited out and retried.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own SecurityTrails API key. Stored as a secret and sent only to api.securitytrails.com in the APIKEY header; it is never logged or put in a URL. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}