How to List Website Categories

October 31, 2026
How to List Website Categories

You need a canonical list of website categories to build filters, map to your internal taxonomy, and enforce rules (for example, blocking “Mobile Phones” traffic in a school network or whitelisting “Consumer Electronics” for a campaign). By the end of this guide, you’ll fetch Klazify’s category taxonomy with a single API call, cache it for your stack, and wire it to downstream logic like blocking, enrichment, and reporting.

Why Klazify for listing and using website categories

Listing categories is only useful if the taxonomy is accurate, widely applicable, and easy to integrate with a real-time classifier. Klazify provides a machine-learning-driven categorization system designed for high-volume pipelines that need to act on content in seconds.

Illustration: How to List Website Categories
  • Accurate category discovery using AI: Categories reflect analysis of real page content, so the taxonomy you retrieve is built to support precise matches like “/Internet & Telecom/Mobile & Wireless/Mobile Phones,” not just coarse labels.
  • Global coverage: The taxonomy supports multilingual content, helping teams apply consistent filtering or targeting across regions without switching lists per language.
  • Real-time alignment: The same taxonomy you list is what Klazify’s live classifier uses, preventing mismatches between your ruleset and the categories assigned at classify time.
  • IAB taxonomy mapping: Each category can align to IAB groups to support ad tech and brand safety workflows where IAB is the standard.
  • Simple API integration: A single REST call returns the category list (v2), which you can cache and version within your service.
  • Compliance and filtering control: A stable, granular taxonomy lets you implement precise allow/deny logic without overblocking or gaps.

What you’ll build: a working path to list, map, and act on categories

This workflow gets you from taxonomy to enforcement:

  1. Pull Klazify’s taxonomy via the list-category v2 endpoint and cache it (for example, in Redis or a config store).
  2. Map each category path to your internal policy (Allowed, Blocked, Flagged) or to your product’s domain model.
  3. Use the Klazify classifier to categorize URLs/domains in real time and match returned categories to your cached taxonomy mapping.
  4. Apply outcomes: block network requests, tag CRM leads with industry segments, route ad placements, or annotate analytics events.

New to Klazify? Create a free account with the Starter plan ($39.99/mo, 7-day trial) to test in your environment. Failed or unreachable calls are not billed.

List the category taxonomy (v2)

Use the list-category v2 endpoint to retrieve the taxonomy your pipeline should respect. Version 2 is the current taxonomy list; version 1 is older.

cURL example

curl -sS -X GET "https://www.klazify.com/api/list-category/v2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Notes:

  • Use the Bearer token in the Authorization header.
  • GET is shown here, and POST is also supported for the same endpoint if your environment prefers it.
  • No domain or URL parameter is required for listing categories; this endpoint returns the taxonomy itself.

Python example to fetch and cache the taxonomy

import os
import time
import json
import requests

API_KEY = os.environ.get("KLAZIFY_API_KEY", "YOUR_API_KEY")
LIST_URL = "https://www.klazify.com/api/list-category/v2"
CACHE_PATH = "/tmp/klazify_taxonomy_v2.json"
CACHE_TTL_SECONDS = 86400  # cache for 24 hours; adjust based on your update policy

def taxonomy_cached() -> bool:
    if not os.path.exists(CACHE_PATH):
        return False
    age = time.time() - os.path.getmtime(CACHE_PATH)
    return age < CACHE_TTL_SECONDS

def load_taxonomy():
    with open(CACHE_PATH, "r") as f:
        return json.load(f)

def fetch_taxonomy():
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Accept": "application/json",
    }
    resp = requests.get(LIST_URL, headers=headers, timeout=20)
    resp.raise_for_status()
    return resp.json()

def get_taxonomy():
    if taxonomy_cached():
        return load_taxonomy()
    data = fetch_taxonomy()
    with open(CACHE_PATH, "w") as f:
        json.dump(data, f)
    return data

if __name__ == "__main__":
    taxonomy = get_taxonomy()
    # For example, collect all category paths into a set for your mapping UI or policy engine
    # Exact field names depend on the response; inspect 'taxonomy' and persist what you need.
    print(json.dumps(taxonomy, indent=2)[:2000])

Operational guidance:

  • Cache the taxonomy. It changes infrequently, so a 24-hour or multi-day TTL is typical. Persist it as a versioned artifact if you need deterministic runs.
  • On transient errors (timeouts, 5xx), back off and retry. Failed or unreachable calls are not billed.
  • Use v2 in new builds. Keep a migration note in your repo indicating that v1 is the older list.

How categories are used during classification

The list-category endpoint gives you the taxonomy. To see how categories appear in real classification results, examine the following official sample from the Klazify categorization endpoint. You’ll use the names and paths here to match back to the taxonomy you retrieved.


{
    "domain": {
        "categories": [
            {
                "confidence": 0.92,
                "name": "/Computers & Electronics/Consumer Electronics",
                "IAB-632-596": "Consumer Electronics/Technology & Computing/Consumer Electronics"
            },
            {
                "confidence": 0.89,
                "name": "/Internet & Telecom/Mobile & Wireless/Mobile Phones"
            }
        ],
        "social_media": null,
        "logo_url": "https://klazify.s3.amazonaws.com/2110787991611585019600ed5fb1d1300.04730104.png"
    },
    "success": true,
    "objects": {
        "company": {
            "url": "https://www.apple.com/",
            "name": "Apple",
            "city": "Cupertino",
            "stateCode": "CA",
            "countryCode": "US",
            "employeesRange": "100K+",
            "revenue": 274515000000,
            "raised": null,
            "tags": [
                "E-commerce",
                "Consumer Electronics",
                "Mobile",
                "B2C"
            ],
            "tech": [
                "omniture_adobe_analytics",
                "atlassian_confluence",
                "successfactors",
                "apache_apex",
                "talend",
                "oracle_peoplesoft",
                "salesforce",
                "stripe",
                "dell_boomi_atomsphere",
                "gigya",
                "sage_50cloud",
                "quickbooks",
                "webmethods",
                "apache_tomcat",
                "alteryx",
                "tibco_rendezvous",
                "atlassian_jira",
                "..."
            ]
        }
    },
    "domain_registration_data": {
        "domain_age_date": "1987-02-19",
        "domain_age_days_ago": "13026",
        "domain_expiration_date": "2030-02-20",
        "domain_expiration_days_left": "123"
    },
    "similar_domains": [
        "bestbuy.com",
        "icloud.com",
        "microsoft.com",
        "macrumors.com",
        "google.com",
        "samsung.com",
        "twitter.com",
        "hp.com",
        "bhphotovideo.com",
        "dell.com"
    ]
}

How to use these fields:

  • domain.categories: Each object includes a category path in name and a confidence score. Your policy engine should match the name value to the taxonomy you fetched from list-category/v2.
  • IAB-632-596: Example of IAB mapping. Use this to drive ad safety or IAB-compliant targeting when needed.
  • logo_url: Useful for UI when reviewing or moderating classifications.
  • objects.company.*: Enrichment for CRM or analytics (e.g., employeesRange, revenue, location, tags, tech) when classifying domains tied to companies.
  • domain_registration_data: Helpful for risk signals or auditing (e.g., very new domains in sensitive categories).
  • similar_domains: Seed discovery or broader filtering (e.g., extend a denylist to close neighbors after review).

Mapping the taxonomy to your internal policy

Teams typically maintain a mapping from category paths to internal actions. Start with the exact names from the JSON above (for instance, “/Computers & Electronics/Consumer Electronics” and “/Internet & Telecom/Mobile & Wireless/Mobile Phones”).

# Example mapping for enforcement or routing in Python
CATEGORY_POLICY = {
    "/Computers & Electronics/Consumer Electronics": "ALLOW",
    "/Internet & Telecom/Mobile & Wireless/Mobile Phones": "BLOCK",
    # extend with other paths from list-category/v2
}

def decide_action(classification):
    for cat in classification.get("domain", {}).get("categories", []):
        path = cat.get("name")
        if path in CATEGORY_POLICY:
            return CATEGORY_POLICY[path], cat.get("confidence")
    return "REVIEW", None

Best practices:

  • Normalize paths exactly as returned (case and spacing preserved). Store them as canonical keys.
  • Decide precedence rules if multiple categories are returned (e.g., first match by highest confidence, or any match to a “BLOCK” group wins).
  • Maintain a separate layer for IAB mappings if your use case requires IAB-aligned logic.

Versioning and comparison: v1 vs v2 list endpoints

Use v2 for current builds. Keep the older v1 only if you have legacy behavior tied to it.

Attribute list-category/v1 list-category/v2
Status Older list Current list
Endpoint /api/list-category/v1 /api/list-category/v2
Recommended for new builds No Yes

Migrate your mapping tables to v2 paths and keep a rollback plan during the cutover. Store the version alongside your cached taxonomy to ensure deterministic audits.

Operational integration: batching, latency, caching

While the list-category endpoint is typically called infrequently and cached, your classifier usage will likely be high-volume. Keep these points in mind:

  • Batching: For classification workloads, batch requests where your architecture allows or run parallel workers with connection pooling. For the list-category taxonomy, fetch once per deploy or per TTL window.
  • Rate limits: Observe your plan’s guidelines and monitor HTTP status codes in logs. If you see throttling responses, add jittered backoff and queueing.
  • Caching: Cache the taxonomy for long TTLs (for example, 24 hours or more) and invalidate on demand if you detect a version update. For classification results, cache per domain or URL for a short TTL to reduce redundant calls in hot paths.
  • Unknown or new domains: If a classification result yields sparse data or no categories, treat it as “REVIEW” or “DEFAULT POLICY” and re-attempt later. Persist a “first seen” timestamp to manage retries and audits.
  • Observability: Log which taxonomy version drove each decision. This allows you to reproduce outcomes and satisfy internal review or brand safety audits.

How to use categories across core scenarios

  • Content filtering and brand safety: Use the category path names to route allow/block decisions at gateways or ad placement engines. Add IAB mapping for exchanges or DSP integrations requiring it.
  • CRM and lead enrichment: Merge classification with company fields (name, employeesRange, revenue, tags, tech) to segment accounts and route to industry-specific playbooks.
  • Cybersecurity and analytics: Combine domain_registration_data and categories to flag risky combinations (for example, very new domains under sensitive categories) and annotate analytics streams.
  • Whitelisting: Maintain a whitelist set using the taxonomy paths from list-category v2. On classification, allow if any returned category is in your approved set.

Putting it all together: end-to-end flow

  1. Provision an API key. If you don’t have one, create a free account on the Starter plan ($39.99/mo, 7-day trial).
  2. Fetch taxonomy with list-category/v2 and cache it with a version tag in your config store.
  3. Build a mapping table: category path to action or internal segment. Optionally store IAB alignment per path.
  4. Classify domains/URLs in your pipeline using Klazify. Match returned category name strings to your mapping.
  5. Apply action, log decision with taxonomy version and confidence, and expose metrics for audits.

If you need implementation details on response shapes, consult the API reference. Keep your taxonomy caching and mapping logic in a small, testable module that your services import.

Key references

  • Register for an API key (Starter includes a 7-day trial; failed or unreachable calls are not billed).
  • Read the Documentation for endpoints and response fields.
  • Review MCP for model and classification policy context.

FAQ

  • How often should I refresh the category list?
    Cache for at least 24 hours. The taxonomy is relatively stable; set a refresh cadence that balances freshness with stability, and version your cached copy.
  • Does the list-category endpoint classify a domain?
    No. It returns the taxonomy. Use the classification endpoint to categorize a specific URL or domain, then match the returned category name to your cached taxonomy.
  • What should I do if a classification returns multiple categories?
    Define precedence rules. Common approaches: choose the highest-confidence match or apply “deny wins” if any category maps to a block policy.
  • How do I handle unknown categories in my mapping?
    Default to a safe action like REVIEW or DEFAULT POLICY. Log and surface unmapped paths so your team can update the mapping quickly.
  • Can I rely on IAB mapping for ad placements?
    Yes, when present. Use the IAB field alongside the category path to drive IAB-compliant ad safety or targeting logic.

Ready to integrate? Start by pulling the taxonomy with list-category v2, map it to your policies, and wire decisions to your pipeline. Create your free account to get an API key and ship your integration today: Register. For endpoint specifics and field references, check the Documentation.

Ready to use Klazify?

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

Get Started Free