About the Security Tools API

API Version: 1.9

The Security Tools allow you to check security details for your website such as SSL certificates.

This is the API for the Security Tools.

Endpoints

GET
https://networkcalc.com/api/security/certificate/{hostname}

Lookup TLS/SSL certificate

. Get the TLS/SSL certificate for a site.

Parameters

{hostname}

The hostname, domain name, or IP address to look up.

Example: https://networkcalc.com/api/security/certificate/example.com

port

(Optional) Specify the TCP port to use on the remote host.

Values: 0-65535

Example: https://networkcalc.com/api/security/certificate/example.com?port=8080

Response Codes

200
OK - Success.
400
NO_HOST_SPECIFIED - The {hostname} parameter was not specified.
400
INVALID_PORT - The port you specified is invalid or out of range.
400
TIMEOUT - The network connection timed out or no certificate exists.
400
UNSPECIFIED_ERROR - An unknown error occurred. Check all parameters and try again.

Response Formats

CertificateResponse

{
  "status": "[string] The status of the request.",
  "certificate": {
    "issued_to": "[string] The host for which the certificate was issued.",
    "valid_from": "[date] The date on which the certificate became valid. Date format is ISO 8601.",
    "valid_to": "[date] The date on which the certificate expires. Date format is ISO 8601.",
    "alternate_names": "[array] Subnet Alternative Names (SANs), i.e., alternate hostnames.",
    "serial_number": "[string] The certificate's serial number, a unique identifier.",
    "fingerprint": "[string] The certificate's fingerprint, a computed has of the entire certificate",
    "raw": "[string] The certificate in its raw format. Includes newlines as '\n'"
  }
}