Domain Expiration API in Python: CBS News WHOIS

October 05, 2026
Domain Expiration API in Python: CBS News WHOIS

A domain expiration API in Python posts a website and reads WHOIS dates. On Klazify that is POST /api/domain_expiration — form field url, not JSON. Official sample: https://www.cbsnews.com.

Starter is $39.99/mo (500 successful calls) with a 7-day trial. Failed / unreachable calls are not billed. This is not IAB and not domain_tech. Docs: klazify.com/api-docs.

Request: official CBS News URL

curl 'https://www.klazify.com/api/domain_expiration' -X POST \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--data $'url=https://www.cbsnews.com' 

Python: same contract

import os, urllib.request
req = urllib.request.Request(
"https://www.klazify.com/api/domain_expiration",
data=b"url=https://www.cbsnews.com",
headers={"Authorization": "Bearer " + os.environ["KLAZIFY_KEY"], "Accept": "application/json"},
)
print(urllib.request.urlopen(req).read().decode())

Response: official domain_expiration sample (2022-12-19)

{
"domain": {"domain_url": "https://cbsnews.com", "updated_at": "2022-12-19T15:50:47.000000Z"},
"success": true,
"domain_registration_data": {
"domain_age_date": "1994-10-04",
"domain_age_days_ago": 10303,
"domain_expiration_date": "2023-10-03",
"domain_expiration_days_left": 287
}
}

The fixture is 19 Dec 2022. Copy a live call for today’s days_left.

Go live

1. Register — 7-day trial.

2. Copy the Bearer key.

3. POST /api/domain_expiration with form url.

4. Store domain_expiration_date and days_left.

Read expiry in Python →

Ready to use Klazify?

Start classifying websites, enriching company data, and exploring web intelligence.

Get Started Free