pricing background

Python API Integration for Ssl Certificate API

SDK

Check SSL Certificate Info Using WhoisFreaks Python SDK

The WhoisFreaks Python SDK allows you to fetch SSL certificate details for any domain, including the certificate’s validity period, issuing authority, and other essential information. This helps ensure secure communication, verify website authenticity, and is crucial for maintaining web security and protecting online transactions.

SSL Lookup

This package is for performing any type of SSL lookup.
To utilize the WhoisFreaks Python SDK for SSL Lookup of domain names, follow these steps:

First, ensure that Python and the WhoisFreaks Python SDK are installed on your system. To install the necessary modules, please visit the Installation Steps page.
In all lookups, replace "your_api_key" with your actual API key.

1. SSL Live Lookup

ssl_live_lookup retrieves live SSL information for a specific domain using the Python SDK's SSL endpoint.

python
ssl_live_lookup(api_key='your_api_key', domain_name='google.com')

Parameters:

  1. domain_name: The domain name for which live SSL information is requested (e.g., "example.com").
  2. chain: A boolean flag indicating whether to include SSL certificate chain information.
  3. ssl_raw: A boolean flag indicating whether to include raw SSL certificate information.
  4. format: Two response formats are available: JSON and XML. If the 'format' parameter is not specified, JSON will be used by default.
  5. api_key: Get your API key from our billing dashboard.

Returns:

  1. Success: A pointer to a domain_ssl_info struct containing live SSL information.
  2. Error: A JSON string containing the error structure if an API error occurs, or 'nil' if the request fails.

For a comprehensive details of response fields, please visit the SSL Live Lookup Documentation.

Example Usage:

python
from whoisfreaks import WhoisfreaksApi
from whoisfreaks.core.api_error import ApiError

client = WhoisfreaksApi()

try:
    response = client.ssl_live_lookup(api_key='your_api_key', domain_name='google.com')
    response = {k: v for k, v in response.dict().items() if v is not None}     # Filtering the Null values

    print(response)
except ApiError as e:
    print(e.body)

Replace "google.com" with the domain you wish to query.

Other SDK Lookups

WHOIS lookups

Offers live, reverse, historical, IP, ASN, and bulk domain WHOIS lookups.

Learn more

DNS Lookups

Provides live, reverse, historical, and bulk DNS lookup services.

Learn more

Domain Availability

Checks domain availability across TLDs and suggests alternatives.

Learn more

SSL Lookups

Performs SSL lookup and shows certificate chain from start to present.

Learn more