The SSL Checker API allows you to retrieve information about the SSL certificate of a given domain.
URL: https://api.apipip.com/v1/check-ssl/
Parameters
Name | Description |
---|---|
domain |
(Required) (query parameter): The domain name for which you want to check the SSL certificate. |
Headers
Name | Description |
---|---|
X-Key |
(No required) |
How to use SSL Certificate Checker API
import requests
# API URL
api_url = "https://api.apipip.com/v1/check-ssl/"
# Domain to check
domain_to_check = "apipip.com"
# Set the query parameter
params = {"domain": domain_to_check}
try:
# Make the GET request
response = requests.get(api_url, params=params)
# Check if the request was successful (status code 200)
if response.status_code == 200:
print(response.text)
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
const api_url = "https://api.apipip.com/v1/check-ssl/";
const domain_to_check = "apipip.com";
// Set the query parameter
const queryParams = new URLSearchParams({ domain: domain_to_check });
try {
// Make the GET request
fetch(`${api_url}?${queryParams}`)
.then(response => {
if (!response.ok) {
throw new Error(`Request failed with status ${response.status}`);
}
return response.json();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error(`An error occurred: ${error}`);
});
} catch (error) {
console.error(`An error occurred: ${error}`);
}
import Foundation
let apiURL = URL(string: "https://api.apipip.com/v1/check-ssl/")!
let domainToCheck = "apipip.com"
// Set the query parameter
var components = URLComponents(url: apiURL, resolvingAgainstBaseURL: false)!
components.queryItems = [URLQueryItem(name: "domain", value: domainToCheck)]
do {
let requestData = try Data(contentsOf: components.url!)
let decoder = JSONDecoder()
if let responseData = try? decoder.decode([String: String].self, from: requestData) {
print(responseData)
} else {
print("Failed to decode response data.")
}
} catch {
print("An error occurred: \(error)")
}
curl "https://api.apipip.com/v1/check-ssl/?domain=apipip.com"
API Response
{
"domain":"apipip.com",
"issuer":"R3",
"expiration_date":"2023-10-18T23:50:22Z"
}
Note: The API works with all programming languages