SSL Certificate API Guide
Inspect HTTPS certificate identity, issuer, and validity dates with clear request examples, chain fields, and error handling.
SSL Certificate API Guide
Inspect certificate identity, issuer, and validity dates for an HTTPS domain. Use the results to maintain a certificate inventory, review upcoming renewals, or investigate certificate changes.
View API details or try the Demo.
Request
Send a GET request to https://api.gugudata.io/v1/websitetools/sslcertinfo with your appkey and domain as query parameters.
curl --get 'https://api.gugudata.io/v1/websitetools/sslcertinfo' \
--data-urlencode 'appkey=YOUR_APPKEY' \
--data-urlencode 'domain=https://example.com'
The domain can be a bare name or an HTTPS URL, up to 2,048 characters. Internationalized domain names are accepted. Paths, query strings, and fragments do not affect the certificate lookup. HTTP URLs, IP addresses, URLs with credentials, and nonstandard ports are not supported.
Read the certificate chain
A successful response contains dataStatus and a nonempty data array, not a single certificate object. Each array item represents one certificate in the chain presented by the server. A root certificate is not necessarily included.
| Field in each item | Type | Meaning |
|---|---|---|
subjectDN |
string | Certificate subject distinguished name |
issuerDN |
string | Issuer distinguished name |
serialNumber |
string | Decimal serial number |
validFrom, validTo |
string | Existing textual date representation; not ISO 8601 |
signatureAlgorithm |
string | Signature algorithm name |
publicKey |
string | Public-key description |
version |
string | Certificate version |
signature |
string | Base64 certificate signature |
publicKeyAlgorithm |
string | Public-key algorithm |
extensions |
string or null | Available extension information |
keyUsage |
string array or null | Optional usage information |
extendedKeyUsage, basicConstraints |
string or null | Optional extension fields |
subjectAlternativeNames, issuerAlternativeNames |
string or null | Optional name fields |
Optional extension fields may be absent or null; do not infer a negative security finding from missing values.
const endpoint = new URL('https://api.gugudata.io/v1/websitetools/sslcertinfo');
endpoint.search = new URLSearchParams({
appkey: 'YOUR_APPKEY',
domain: 'https://example.com'
}).toString();
const response = await fetch(endpoint);
const payload = await response.json();
if (!response.ok || payload.dataStatus?.statusCode !== 200) {
throw new Error(payload.dataStatus?.statusDescription || 'Certificate lookup failed');
}
for (const certificate of payload.data) {
console.log(certificate.subjectDN, certificate.issuerDN, certificate.validTo);
}
Errors and limits
Invalid input returns HTTP 400. Authentication and access checks retain HTTP 401/403; rate limits use 429. A certificate lookup failure returns HTTP 500 with the existing business failure envelope. Check both HTTP status and dataStatus.statusCode.
The HTTPS connection must pass certificate validation. An expired, untrusted, or hostname-mismatched certificate can cause the lookup to fail instead of returning certificate details. This endpoint is not a complete TLS security scan and does not provide a security grade, cipher inventory, revocation verdict, or a guarantee that a site is safe.
Demo and monitoring
The Demo queries GuGuData’s HTTPS certificate and caches successful results for 15 minutes. Its X-GuGuData-Demo-Mode header indicates live or cached; X-GuGuData-Generated-At identifies when the result was produced. Failed lookups are not replaced with sample certificates.
Use the authenticated endpoint for your own domains. Store observation timestamps alongside certificate data, and allow for certificate rotation and chain changes. The API returns an observation, not an automatic renewal service.