🚀 Experience the new and improved APIVoid! Check out what's new

SSL Info API: Get SSL certificate details

A JSON API to get SSL certificate information (e.g owner, issuer, country, creation date, expiration date). Use this API to verify SSL certificate, check if it expired, get certificate type (DV, EV, OV), validate SSL certificate.

Consumes 1 credit per API call

# Example Curl request from the command line:
                          
curl -X POST "https://api.apivoid.com/v2/ssl-info" \
     -H "Content-Type: application/json" \
     -H "X-API-Key: YOUR_API_KEY_HERE" \
     -d '{"host": "paypal.com"}'

# Example JSON output for a 200 HTTP status code:

{
    "host": "paypal.com",
    "certificate": {
        "found": true,
        "debug_message": "",
        "fingerprint_sha1": "6f55d7d0b407cb6bb13bd14a1cbb105c0ee5c3d5",
        "fingerprint_sha256": "faf941ad6b7339463bcea590e77e39f7930a168eb6d130d79c3be12c5de83894",
        "type": "Extended Validation",
        "deprecated_issuer": false,
        "name_match": true,
        "expired": false,
        "revoked": false,
        "valid": true,
        "details": {
            "subject": {
                "name": "SERIALNUMBER=3014267,CN=paypal.com,O=PayPal\\, Inc.,L=San Jose,ST=California,C=US,2.5.4.15=#131450726976617465204f7267616e697a6174696f6e,1.3.6.1.4.1.311.60.2.1.2=#130844656c6177617265,1.3.6.1.4.1.311.60.2.1.3=#13025553",
                "common_name": "paypal.com",
                "alternative_names": "paypal.com, paypal-workplace.com, xoom-experience.com, www.curv.cc, buyindiaonline.com, www.curv.co, curv.co, xoom.com, venmo-experience.com, sandbox.paypal.com, paypal.me, curv.cc, simility.com, paypal-experience.com, www.paypal.biz, www.simility.com, paypal.biz, cash2india.com, pypl.com, fastlane.paypal.com, paypal.co.uk, paypal.com.tr, paypal.ca, paypal-promo.es, paypal-marketing.co.uk, paypal-sverige.se, paypalgivingfund.org, paypal.com.hk, paypal.com.tw, paypalobjects.com, paypal-partners.com, paypal.se, PAYPAL.CO, paypal-nakit.com, paypal-mktg.com, paypal-marketing.ca, paypal-communications.com, paypal.fr, paypal.jp, paypal.no, paypal-donations.co.uk, paypal.be, paypal-passport.com, paypal.fi, paypal.nl, paypal-latam.com, paypal.vn, paypal-gifts.com, paypal.co.za, PAYPAL-MARKETING.PL, paypal.at, paypal-australia.com.au, paypal.co.in, paypal-danmark.dk, paypal-turkiye.com, paypal.co.il, paypal.com.cn, paypal-prepagata.com, paypal.es, paypal.eu, paypal.it, paypal.com.pe, paypal.in, paypal-business.com.au, paypal.co.id, paypal-globalshops.com, paypal-optimizer.com, paypal-mena.com, paypal-donations.com, paypal.ie, paypal.co.nz, paypal-media.com, paypal-information.com, paypal.com.sa, paypal-knowledge.com, paypal-businesscenter.com, paypal-community.com, PAYPAL-DEUTSCHLAND.DE, paypal.lu, PAYPAL.COM.MY, paypal.com.sg, paypal.dk, paypal.com.br, paypal.de, paypal-knowledge-test.com, paypal.pt, paypal.co.th, thepaypalblog.com, paypal-norge.no, paypal.pl, paypal.ph, paypal.com.ve, paypal.com.mx, paypal.cl, paypal-business.co.uk, paypal.com.au, paypalbenefits.com, paypal.ch, paypal.com.ar, paypal-support.com",
                "organization_unit": [],
                "organization": "PayPal, Inc.",
                "category": "Private Organization",
                "country": "US",
                "street": [],
                "postal_code": "",
                "state": "California",
                "location": "San Jose",
                "serial_number": "3014267",
                "inc_country": "US",
                "inc_state": "Delaware"
            },
            "issuer": {
                "common_name": "DigiCert EV RSA CA G2",
                "organization": "DigiCert Inc",
                "country": "US",
                "state": "",
                "location": "",
                "organization_unit": []
            },
            "public_key": {
                "algorithm": "RSA",
                "size": 2048
            },
            "crl_endpoints": [
                "http://crl3.digicert.com/DigiCertEVRSACAG2.crl",
                "http://crl4.digicert.com/DigiCertEVRSACAG2.crl"
            ],
            "signature": {
                "serial": "b149eff02f1c650cf59029012764f8c",
                "serial_hex": "14728578715614846917259483520735530892",
                "type": "SHA256-RSA"
            },
            "validity": {
                "days_left": 269,
                "valid_from": "Mon, 26 Aug 2024 00:00:00 UTC",
                "valid_to": "Mon, 25 Aug 2025 23:59:59 UTC",
                "valid_from_timestamp": 1724630400,
                "valid_to_timestamp": 1756166399
            },
            "certificate_authority": false,
            "authority_key_id": "301680146a4e50bf98689d5b7b2075d45901794866923206",
            "subject_key_id": "04148d939fbf9c7cf8ba64066baa73bb814351b7dc41",
            "key_usages": [
                "Digital Signature",
                "Key Encipherment"
            ],
            "extended_key_usages": [
                "Server Authentication",
                "Client Authentication"
            ],
            "authority_info": [
                {
                    "location": "http://ocsp.digicert.com",
                    "method": "OCSP"
                },
                {
                    "location": "http://cacerts.digicert.com/DigiCertEVRSACAG2.crt",
                    "method": "CA Issuers"
                }
            ]
        }
    },
    "elapsed_ms": 289
}
Code analysis

Key Features

Get SSL certificate details, validity, issuer, subject, and more

Businesses and startups use this SSL Info API to easily check SSL certificate of a website, get valuable certificate details such as validity, fingerprint, type, signature, subject and issuer.

Certificate Type

Identify certificate type: Domain Validation (DV), Extended Validation (EV) or Organization Validation (OV).

Complete Information

With this API you can obtain complete SSL certificate information which include everything you need to know.

Certificate Details

Get all certificate metadata: fingerprint, expiration, creation, owner, issuer, organization.

Fast Response

The submitted domain is analyzed in real-time and the response is returned in 1-5 seconds on average.

Common Use Cases

Take a look at some real-world use cases of this API service

Our API can be used in many ways, from cybersecurity tasks to marketing-specific tasks. Here we showcase the most popular use cases according to our customers usage:

Verify SSL Certificate

This API can be used to quickly verify if a domain has a valid SSL certificate and gain important insights.

Spot Bad Certificates

Identify if a SSL certificate is expired, invalid, revoked, host-mismatch, self-signed, untrusted-root.

Enrich SIEM Data

Using a SIEM platform? Add context to security incidents, populate domain SSL certificate data.

Check Your Customers

Use this API to monitor and verify that your customers or suppliers are using valid SSL certificates.

Use cases

EVERYTHING YOU GET

Do it all with one certificate lookup

One request fetches the live certificate and returns it fully parsed: validity and revocation, subject and issuer, key and signature details, fingerprints and every usage extension.

Validity and trust

  • Certificate found or missing
  • Valid, expired and revoked flags
  • Hostname name-match check
  • Deprecated issuer detection
  • Days left before expiry
  • Valid-from and valid-to dates
  • Unix timestamps for both dates

Subject and organisation

  • Common name of the certificate
  • Every alternative name (SAN)
  • Organisation and organisational unit
  • Validation category
  • Country, state and location
  • Company serial number
  • Incorporation country and state

Issuer and authority

  • Full issuer details
  • Certificate authority flag
  • Authority key identifier
  • Subject key identifier
  • Authority info access location
  • CRL revocation endpoints

Key, signature and fingerprints

  • Public key algorithm and size
  • Signature algorithm type
  • Serial number in decimal and hex
  • SHA-1 fingerprint
  • SHA-256 fingerprint
  • Pin or compare certificates yourself

Usage extensions

  • Key usages declared
  • Extended key usages declared
  • Certificate type, e.g. Extended Validation
  • Full raw subject string
  • Debug message when a fetch fails
  • See exactly what the certificate permits

Built for developers

  • Plain JSON over HTTPS
  • All SSL data organized in one place
  • Alert on expiry before it happens
  • Works on any host and any port
  • One credit per lookup
  • Simple integration

USAGE EXAMPLE

Learn how seamless it is to add and use SSL Info API anywhere you want

All it takes is a HTTPS POST request with JSON payload to our endpoint, and you’ll receive the response within seconds, usually within 1-5 seconds. Here are a few code examples to use the API:

$domain = 'paypal.com';

$apiUrl = 'https://api.apivoid.com/v2/ssl-info';
$apiKey = 'your_api_key_here';

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['host' => $domain]));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $responseData = json_decode($response, true);

    print_r($responseData);
    
    // Check if SSL certificate is found
    if (!($responseData['certificate']['found'] ?? false)) {
        echo "Certificate not found.";
        exit;
    }
    
    // Check if SSL certificate is valid
    if (!($responseData['certificate']['valid'] ?? false)) {
        echo "Certificate is found but is not valid.\n\n";
    }
    
    // Show SSL certificate details
    echo "Name Match: " . ($responseData['certificate']['name_match'] ?? false ? 'true' : 'false') . "\n";
    echo "Deprecated Issuer: " . ($responseData['certificate']['deprecated_issuer'] ?? false ? 'true' : 'false') . "\n";
    echo "Expired: " . ($responseData['certificate']['expired'] ?? false ? 'true' : 'false') . "\n";
    echo "Revoked: " . ($responseData['certificate']['revoked'] ?? false ? 'true' : 'false') . "\n";
    echo "Valid: " . ($responseData['certificate']['valid'] ?? false ? 'true' : 'false') . "\n";
    echo "Expiration Date: " . htmlspecialchars($responseData['certificate']['details']['validity']['valid_to'] ?? '') . "\n";
    echo "Expiration Days Left: " . htmlspecialchars($responseData['certificate']['details']['validity']['days_left'] ?? 0) . "\n";
    echo "Subject Organization: " . htmlspecialchars($responseData['certificate']['details']['subject']['organization'] ?? '') . "\n";
    echo "Subject Country: " . htmlspecialchars($responseData['certificate']['details']['subject']['country'] ?? '') . "\n";
    echo "Subject State: " . htmlspecialchars($responseData['certificate']['details']['subject']['state'] ?? '') . "\n";
    echo "Issuer Organization: " . htmlspecialchars($responseData['certificate']['details']['issuer']['organization'] ?? '') . "\n";
    echo "Issuer Country: " . htmlspecialchars($responseData['certificate']['details']['issuer']['country'] ?? '') . "\n";
    echo "Fingerprint (SHA1): " . htmlspecialchars($responseData['certificate']['fingerprint_sha1'] ?? '') . "\n";
    echo "Fingerprint (SHA256): " . htmlspecialchars($responseData['certificate']['fingerprint_sha256'] ?? '') . "\n";
    echo "Type: " . htmlspecialchars($responseData['certificate']['type'] ?? '') . "\n";
} else {
    print_r('An error occurred: '.$response);
}

Start using our API services, it takes just a few minutes

Create your account, pick a subscription plan, and make your first API call instantly with your API key, simple as that!

Get started now