agentsvc.io

services / ssl-check

utilityoperational · 17 ms

SSL Certificate Check

Inspect SSL/TLS certificate for any domain. Returns valid boolean, days_remaining, issuer, valid_from, valid_to, subject_alt_names (SANs), fingerprint_sha256, and protocol version. Default port 443. Use for certificate expiry monitoring, security audits, or HTTPS verification.

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/ssl-check", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"domain":"github.com"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
domain *stringDomain to check SSL for (e.g. 'github.com', 'api.example.com'). Do not include https://
portinteger = 443Port to check (default: 443)

Output

FieldTypeDescription
domainstringThe checked domain
portintegerThe port that was checked
validbooleantrue if certificate is currently valid and not expired
subjectstringCertificate subject (CN=...)
subject_alt_namesarraySubject Alternative Names the cert is valid for
issuerstringCertificate issuer organization
valid_fromstringCertificate valid-from date (ISO 8601)
valid_tostringCertificate expiry date (ISO 8601)
days_remainingintegerNumber of days until certificate expires (negative = already expired)
serial_numberstringCertificate serial number (hex)
fingerprint_sha256stringSHA-256 fingerprint of the certificate
protocolstringTLS protocol version in use (e.g. TLSv1.3)

Example response (data)

{
  "domain": "github.com",
  "port": 443,
  "valid": true,
  "subject": "CN=github.com",
  "subject_alt_names": [
    "github.com",
    "www.github.com"
  ],
  "issuer": "DigiCert Inc",
  "valid_from": "2024-03-07T00:00:00.000Z",
  "valid_to": "2025-03-07T23:59:59.000Z",
  "days_remaining": 156,
  "serial_number": "0a:bc:12:...",
  "fingerprint_sha256": "AB:CD:EF:...",
  "protocol": "TLSv1.3"
}