API Usage

Integrate the SSL check system into your own application. Get started with the examples below.

Authentication

The API is currently open and does not require a key, but a rate limit is applied for fair usage.

Rate Limit: 20 requests per minute per IP

Endpoint

The base URL for all API requests is below.

GET /check_ssl.php

Parameters

Parameter Type api_param_desc Required
domain String Domain address to check (e.g., example.com) Yes

Example Requests

JSON Format Request (cURL)
curl -X POST -d "domain=google.com" -d "csrf_token=your_csrf_token" "https://your-domain.com/check_ssl.php"
Request with PHP
<?php
$domain = 'google.com';
// CSRF token'ınızı oturumdan almanız gerekir
$csrf_token = 'your_session_csrf_token'; 
$apiUrl = "https://your-domain.com/check_ssl.php";

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'domain' => $domain,
    'csrf_token' => $csrf_token
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);
?>
Request with JavaScript
const formData = new FormData();
formData.append('domain', 'google.com');
// CSRF token'ınızı bir yerden almanız gerekir, belki bir meta etiketinden
formData.append('csrf_token', 'your_csrf_token'); 

fetch('https://your-domain.com/check_ssl.php', {
    method: 'POST',
    body: formData
})
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));

Response Field Descriptions (JSON)

Field Name Data Type Description
domainStringThe queried domain name.
status.validBooleanCurrent validity status of the certificate (true/false).
status.expiredBooleanWhether the certificate has expired (true/false).
status.days_until_expiryIntegerNumber of days remaining until the certificate expires.
certificate_info.issuerStringThe name of the authority that issued the certificate.
certificate_info.organizationStringThe name of the organization that owns the certificate.
certificate_primary_domainStringThe primary domain name (Common Name) for which the certificate was issued.
network_info.ip_addressStringThe server IP address to which the domain name resolves.
network_info.additional_domainsArrayOther domain names covered by the certificate (Subject Alternative Names).
dates.start_dateStringThe start date of the certificate's validity.
dates.expiry_dateStringThe end date of the certificate's validity.

Error Responses

HTTP Status Code Reason
400 Bad Request The `domain` parameter is missing or empty in the request.
400 Bad Request The `domain` parameter is in an invalid format.
400 Bad Request The specified domain name could not be found or has no DNS record.
400 Bad Request Could not establish an SSL connection to the domain (port 443).