Get the live TLS certificate for any domain in JSON: issuer, validity dates, SANs, signature algorithm, key bits, and days until expiry. Every response from a real TLS handshake — not a third-party scanner that may be days out of date.
Type any domain to see the live SSL certificate response from the API. Free, no signup — rate-limited to 5 lookups/day per browser.
// Click "Run lookup" to see the live API response for this endpoint
Most SSL "APIs" are wrappers around periodic scanner data that's hours or days old. This API performs a real TLS handshake on every uncached request — the data is fresh from the live server.
days_until_expiry returned as an integer. No date parsing, no timezone math — just check the number and alert when it crosses your threshold (typically 30 or 7)./domain/{d}/ssl, or grab SSL + DNS + WHOIS + subdomains + email security in a single /lookup/{d} call. Same API key, same pricing.Below: a real response for cloudflare.com. days_until_expiry is the field most monitoring code cares about.
{
"domain": "cloudflare.com",
"issuer": "Google Trust Services",
"subject": "cloudflare.com",
"valid_from": "2026-03-12T00:00:00Z",
"valid_to": "2026-06-10T23:59:59Z",
"days_until_expiry": 19, // alert when this drops below 30
"sans": [
"cloudflare.com",
"*.cloudflare.com"
],
"signature_algorithm": "sha256WithRSAEncryption",
"key_bits": 2048,
"serial_number": "0a1b2c3d..."
}
The Python example below is the canonical "alert on certs expiring within 30 days" pattern. Drop it in cron, pipe alerts to Slack/PagerDuty/email.
curl "https://domain-intelligence-api.p.rapidapi.com/domain/cloudflare.com/ssl" \ -H "X-RapidAPI-Host: domain-intelligence-api.p.rapidapi.com" \ -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY"
import requests
DOMAINS = ["yourapp.com", "api.yourapp.com", "marketing.yourapp.com"]
ALERT_THRESHOLD = 30
headers = {
"X-RapidAPI-Host": "domain-intelligence-api.p.rapidapi.com",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
}
for domain in DOMAINS:
r = requests.get(
f"https://domain-intelligence-api.p.rapidapi.com/domain/{domain}/ssl",
headers=headers, timeout=15,
)
data = r.json()
days = data.get("days_until_expiry")
if days is None:
print(f"{domain}: could not fetch cert")
elif days <= ALERT_THRESHOLD:
print(f"{domain}: ALERT — cert expires in {days} days ({data['valid_to']})")
else:
print(f"{domain}: OK — {days} days remaining")// Node 18+ has built-in fetch — no import needed
const DOMAINS = ["yourapp.com", "api.yourapp.com"];
const ALERT_THRESHOLD = 30;
const headers = {
"X-RapidAPI-Host": "domain-intelligence-api.p.rapidapi.com",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
};
for (const domain of DOMAINS) {
const res = await fetch(
`https://domain-intelligence-api.p.rapidapi.com/domain/${domain}/ssl`,
{ headers }
);
const data = await res.json();
if (data.days_until_expiry <= ALERT_THRESHOLD) {
console.log(`ALERT: ${domain} cert expires in ${data.days_until_expiry} days`);
}
}<?php
$domain = "cloudflare.com";
$ch = curl_init("https://domain-intelligence-api.p.rapidapi.com/domain/$domain/ssl");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-RapidAPI-Host: domain-intelligence-api.p.rapidapi.com",
"X-RapidAPI-Key: YOUR_RAPIDAPI_KEY",
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Days until expiry: " . $data["days_until_expiry"];Production-grade workflows for cert monitoring, compliance, and security.
Billed monthly via RapidAPI. Same pricing across all endpoints (SSL, DNS, WHOIS, subdomains, email security, and bundled /lookup). Cancel anytime.
Quick answers to common developer questions about the SSL API.
issuer, subject, valid_from, valid_to, days_until_expiry, sans (Subject Alternative Names), signature_algorithm, key_bits, and serial_number. Enough to monitor expiry, check for weak algorithms, and verify SAN coverage.*.example.com). The cert object reflects whatever the TLS handshake returns for the requested hostname.openssl s_client or a self-hosted version of the API (MIT-licensed, source on GitHub).Free tier · No credit card · All endpoints included
Get your API key →