# Check SSL certificate expiry for domains

**Use case:** 

Get the SSL certificate issuer, valid-to date and days left to expiry for every domain in your list, to catch certificates before they lapse.

## Input

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "wikipedia.org"
  ],
  "text": "apify.com\ngithub.com\nwikipedia.org",
  "expiringWithinDays": 30
}
```

## Output

```json
{
  "domain": {
    "label": "Domain",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "error": {
    "label": "What is missing or wrong",
    "format": "string"
  },
  "checksFailed": {
    "label": "Checks that failed",
    "format": "array"
  },
  "expiresSoon": {
    "label": "Domain or certificate expires in under 30 days",
    "format": "boolean"
  },
  "noMx": {
    "label": "No MX (takes no mail)",
    "format": "boolean"
  },
  "noSpf": {
    "label": "No SPF",
    "format": "boolean"
  },
  "noDmarc": {
    "label": "No DMARC",
    "format": "boolean"
  },
  "redirectsToOtherDomain": {
    "label": "Redirects to another domain",
    "format": "boolean"
  },
  "registrar": {
    "label": "Registrar",
    "format": "string"
  },
  "registrarIanaId": {
    "label": "Registrar IANA id",
    "format": "string"
  },
  "registrantOrganization": {
    "label": "Registrant company",
    "format": "string"
  },
  "domainCreated": {
    "label": "Domain created",
    "format": "string"
  },
  "domainUpdated": {
    "label": "Record last changed",
    "format": "string"
  },
  "domainExpires": {
    "label": "Domain expires",
    "format": "string"
  },
  "domainAgeDays": {
    "label": "Domain age (days)",
    "format": "integer"
  },
  "domainDaysToExpiry": {
    "label": "Days to domain expiry",
    "format": "integer"
  },
  "domainStatus": {
    "label": "Registry status codes",
    "format": "array"
  },
  "nameservers": {
    "label": "Name servers (registry)",
    "format": "array"
  },
  "dnssecSigned": {
    "label": "DNSSEC signed",
    "format": "boolean"
  },
  "rdapStatus": {
    "label": "RDAP status",
    "format": "string"
  },
  "whoisSource": {
    "label": "Registration data from",
    "format": "string"
  },
  "whoisError": {
    "label": "WHOIS error",
    "format": "string"
  },
  "dnsStatus": {
    "label": "DNS status",
    "format": "string"
  },
  "a": {
    "label": "A (IPv4)",
    "format": "array"
  },
  "aaaa": {
    "label": "AAAA (IPv6)",
    "format": "array"
  },
  "mx": {
    "label": "MX",
    "format": "array"
  },
  "emailProvider": {
    "label": "Email provider (from MX)",
    "format": "string"
  },
  "dkimSelectorsFound": {
    "label": "DKIM selectors found",
    "format": "array"
  },
  "ns": {
    "label": "NS (DNS)",
    "format": "array"
  },
  "spf": {
    "label": "SPF record",
    "format": "string"
  },
  "dmarc": {
    "label": "DMARC record",
    "format": "string"
  },
  "dmarcPolicy": {
    "label": "DMARC policy",
    "format": "string"
  },
  "caa": {
    "label": "CAA",
    "format": "array"
  },
  "txt": {
    "label": "TXT records",
    "format": "array"
  },
  "tlsStatus": {
    "label": "TLS status",
    "format": "string"
  },
  "tlsIssuer": {
    "label": "Certificate issuer",
    "format": "string"
  },
  "tlsSubject": {
    "label": "Certificate subject (CN)",
    "format": "string"
  },
  "tlsSans": {
    "label": "Certificate names (SANs)",
    "format": "array"
  },
  "tlsValidFrom": {
    "label": "Certificate valid from",
    "format": "string"
  },
  "tlsValidTo": {
    "label": "Certificate valid to",
    "format": "string"
  },
  "tlsDaysToExpiry": {
    "label": "Days to certificate expiry",
    "format": "integer"
  },
  "tlsTrusted": {
    "label": "Certificate trusted",
    "format": "boolean"
  },
  "tlsError": {
    "label": "Certificate problem",
    "format": "string"
  },
  "tlsProtocol": {
    "label": "TLS version",
    "format": "string"
  },
  "httpStatus": {
    "label": "HTTP status",
    "format": "integer"
  },
  "httpError": {
    "label": "HTTP problem",
    "format": "string"
  },
  "finalUrl": {
    "label": "Final URL",
    "format": "string"
  },
  "redirects": {
    "label": "Redirects",
    "format": "integer"
  },
  "redirectChain": {
    "label": "Redirect chain",
    "format": "array"
  },
  "responseTimeMs": {
    "label": "Response time (ms)",
    "format": "integer"
  },
  "title": {
    "label": "Page title",
    "format": "string"
  },
  "input": {
    "label": "Entry (invalid only)",
    "format": "string"
  },
  "duplicateOf": {
    "label": "Repeat of",
    "format": "string"
  },
  "checkedAt": {
    "label": "Checked at",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Domain Lookup: WHOIS, DNS, SSL Certificate & Redirect Check Actor is ready to run with the inputs already set for "Check SSL certificate expiry for domains". [Sign up or log in](https://console.apify.com/create-task-from-example/lybLWek9nD9AnxXHY) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Check SSL certificate expiry for domains" task

The Domain Lookup: WHOIS, DNS, SSL Certificate & Redirect Check Actor will start running based on the input automatically. You can also change all the input fields, like domains, or paste a list, and more, to match your specific use case.

### 3. Receive the "Check SSL certificate expiry for domains" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as domain, status, what is missing or wrong, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Check SSL certificate expiry for domains" task via API](https://apify.com/solidfetch/domain-lookup.md).

## About this Actor

This example demonstrates how to use [Domain Lookup: WHOIS, DNS, SSL Certificate & Redirect Check](https://apify.com/solidfetch/domain-lookup.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/solidfetch/domain-lookup.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/solidfetch/domain-lookup.md

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`).
