Website Category API in Python: CBS News as JSON

September 30, 2026
Website Category API in Python: CBS News as JSON

A website category API in Python posts a URL and reads Klazify paths plus confidence. On Klazify that is POST /api/categorize — not the IAB sibling. Official sample URL: https://cbsnews.com.

Starter is $39.99/mo (500 successful calls) with a 7-day trial. Failed / unreachable calls are not billed. IAB keys stay on POST /api/domain_iab_categories. Docs: klazify.com/api-docs.

Request: official CBS News URL

curl -X POST "https://www.klazify.com/api/categorize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{{"url": "https://cbsnews.com"}}

Python: same contract

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

Response: official All Together sample (selected)

{
"domain": {
"categories": [
{"confidence": 0.97, "name": "/News"},
{"confidence": 0.78, "name": "/Arts & Entertainment/TV & Video"}
],
"domain_url": "https://cbsnews.com"
},
"success": true
}

confidence is 0–1. Company / logo fields can sit on the same categorize envelope — this H1 stays on categories[].name.

Go live

1. Register — 7-day trial.

2. Copy the Bearer key.

3. POST /api/categorize with a URL.

4. Store categories[].name and confidence.

Classify a URL in Python →

Ready to use Klazify?

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

Get Started Free