webfilteringdatabase.com
Home Find Your Solution
Features
Domain Categorization API Real-Time Classification 59 Filtering Categories Offline Database (100M) ML Classification Content Classification
Industries
K-12 Schools Corporate Healthcare Government ISPs
Tools
Domain Lookup Bulk Categorization Category Explorer
Resources
Pricing API Documentation Login / Sign Up
Knowledge Base

Domain Categorization API

Complete technical reference for querying our database of 100 million categorized domains across 59 content categories with sub-millisecond response times

How the Categorization API Works

Submit any domain to our RESTful API and receive instant classification across 59 content categories. The high-performance pipeline checks 100 million pre-classified domains, returning cached results in under 5ms or triggering real-time classification via machine learning models for unknown domains.

Real-Time Classification

Unknown domains are analyzed on-the-fly using ML models, returning results within 200-500ms with full category detail.

59 Content Categories

Granular taxonomy covering news, education, e-commerce, social media, malware, phishing, and dozens more.

Simple REST API

JSON-based endpoints let you classify domains in bulk with batch support for up to 1,000 domains per request and SDKs for every major language.

100M+
Domains Indexed
59
Categories
<10ms
Avg Response
99.9%
Uptime SLA

API Endpoints and Parameters

All endpoints use HTTPS, accept JSON request bodies, and return JSON responses with standard HTTP status codes

Method Endpoint Description Rate Limit
GET /v2/domain/{domain} Look up a single domain's categories, category score, and metadata 1,000 req/min
POST /v2/domains/batch Classify up to 1,000 domains in a single request 100 req/min
GET /v2/domain/{domain}/history Retrieve historical category changes for a domain 500 req/min
POST /v2/url/classify Classify a full URL including path-level analysis 500 req/min
GET /v2/categories List all 59 categories with descriptions and group hierarchy 100 req/min
POST /v2/domain/{domain}/suggest Submit a category correction or suggestion for review 50 req/min

Example Request

// Single domain lookup
GET /v2/domain/example.com
Authorization: Bearer YOUR_API_KEY
Accept: application/json

// Batch request
POST /v2/domains/batch
Content-Type: application/json

{
  "domains": [
    "example.com",
    "news.ycombinator.com",
    "unsafe content-site.xyz"
  ],
  "include_metadata": true,
  "include_history": false
}

Example Response

{
  "domain": "example.com",
  "categories": [
    {
      "id": 45,
      "name": "Technology",
      "confidence": 0.94,
      "group": "Business"
    }
  ],
  "risk_score": 5,
  "risk_level": "low",
  "metadata": {
    "domain_age_days": 10542,
    "popularity_rank": 2847,
    "last_scanned": "2026-04-09T14:22:00Z"
  },
  "cached": true,
  "query_time_ms": 3
}

classification details and Multi-Category Classification

Every classification result includes granular confidence scoring to help you make informed filtering decisions

Understanding classification details

Each category assignment includes a classification detail between 0.0 and 1.0, representing the model's certainty in its classification. Scores above 0.85 indicate high-confidence classifications based on strong signals such as well-known domains, clear content patterns, or verified content classification. Research into domain age and business owner age correlation suggests these signals carry additional value for market analysis. Scores between 0.60 and 0.85 represent moderate confidence, typically for domains with mixed content or newly observed sites.

Domains frequently belong to multiple categories simultaneously. A news website might be classified as both "News/Media" (0.92) and "Advertising" (0.68) because it contains significant ad content. Your filtering rules can use these multi-category results with threshold logic: block if any category is in your deny-list with confidence above your chosen threshold.

The API also returns a composite category score from 0 to 100, aggregating content classification signals, domain reputation, content analysis, and behavioral indicators. This single number simplifies policy decisions when you need a quick safe-or-unsafe determination, and the same scoring methodology can be adapted for use cases like building a seller readiness scoring model for business intelligence.

High Confidence (0.85-1.0)

Well-established domains with clear content signals and verified classifications

Moderate Confidence (0.60-0.85)

Mixed-content sites or newly scanned domains with partial signal coverage

Low Confidence (below 0.60)

Recently registered domains, parked pages, or sites with ambiguous content

Integration Patterns and Best Practices

Architectural guidance for embedding domain categorization into your infrastructure

1

DNS-Level Integration

The most common pattern integrates the API at the DNS resolver layer. When a client requests a domain resolution, the resolver queries our API in parallel with the upstream DNS lookup. If the domain falls into a blocked category, the resolver returns an NXDOMAIN or redirect response. This approach provides network-wide filtering with zero client-side software required.

2

Proxy and Gateway Filtering

HTTP/HTTPS proxies and secure web gateways call the API for each outbound request. This allows URL-level classification, not just domain-level. The proxy can inspect the full URL path to detect specific content on otherwise safe domains, block individual pages, or apply different policies for different URL patterns on the same site. Educational institutions use this same pattern to deliver web filtering for schools that integrates with any LMS or proxy.

3

Firewall Policy Automation

Use batch endpoint queries to populate firewall rules automatically. Periodically sync your deny-lists by querying domains in your traffic logs, then push updated IP and domain block lists to your network firewall or next-generation firewall appliances. This keeps your security perimeter aligned with the latest classifications.

4

Local Cache with TTL

For high-throughput deployments, maintain a local cache of API results with configurable TTL. Our response headers include recommended cache durations based on domain volatility. Frequently changing domains get shorter TTLs (5-15 minutes) while stable domains can be cached for hours, reducing API calls by up to 95% without sacrificing accuracy.

Sub-5ms Cached Lookups

Pre-classified domains return results from our edge cache in under 5 milliseconds. With 100 million domains already indexed, over 99% of real-world traffic hits the cache layer for instantaneous response.

99.99% API Uptime SLA

Our globally distributed infrastructure spans multiple availability zones with automatic failover. Anycast routing directs your requests to the nearest edge node for optimal latency and reliability.

SDKs for Every Language

Official client libraries for Python, Node.js, Go, Java, C#, Ruby, and PHP handle authentication, retries, connection pooling, and local caching so you can integrate in minutes.

API Key and OAuth 2.0 Auth

Authenticate with simple API keys for server-to-server calls or use OAuth 2.0 client credentials flow for enterprise environments with token rotation and scope-based access control.

Response Fields Reference

Every API response follows a consistent schema designed for both human readability and machine parsing. The top-level object contains the queried domain, an array of category objects sorted by descending confidence, and a metadata block with supplementary intelligence.

Each category object includes a numeric ID for programmatic matching, a human-readable name, the parent group for hierarchical filtering, and the classification detail. The risk assessment block adds a 0-100 composite score, a qualitative category level label (low, medium, high, critical), and an array of specific category flags when applicable.

The metadata block provides domain WHOIS age in days, global popularity ranking from traffic analysis, the ISO 8601 timestamp of the last content scan, the primary content language detected, and the hosting country code. For content risk-flagged domains, additional fields include content risk type, first-seen and last-seen timestamps, and associated indicator references from our content classification feeds.

Quick Integration Example

Classify domains with a single API call. Look up bbc.co.uk, stackoverflow.com, netflix.com, or flag threats like phishing-site.xyz.

import requests

API_KEY = "your_api_key_here"
domains = ["bbc.co.uk", "stackoverflow.com", "netflix.com", "phishing-site.xyz"]

for domain in domains:
    response = requests.get(
        f"https://api.webfilteringdb.com/v2/domain/{domain}",
        headers={"Authorization": f"Bearer {API_KEY}"}
    )
    data = response.json()
    categories = ", ".join(c["name"] for c in data["categories"])
    print(f"{domain}: {categories} (risk: {data['risk_level']})")
const API_KEY = 'your_api_key_here';
const domains = ['bbc.co.uk', 'stackoverflow.com', 'netflix.com', 'phishing-site.xyz'];

for (const domain of domains) {
    const res = await fetch(
        `https://api.webfilteringdb.com/v2/domain/${domain}`,
        { headers: { 'Authorization': `Bearer ${API_KEY}` } }
    );
    const data = await res.json();
    const cats = data.categories.map(c => c.name).join(', ');
    console.log(`${domain}: ${cats} (risk: ${data.risk_level})`);
}
# Look up a single domain
curl -s https://api.webfilteringdb.com/v2/domain/bbc.co.uk \
  -H "Authorization: Bearer YOUR_API_KEY" | jq .

# Classify multiple domains sequentially
for domain in bbc.co.uk stackoverflow.com netflix.com phishing-site.xyz; do
    curl -s https://api.webfilteringdb.com/v2/domain/$domain \
      -H "Authorization: Bearer YOUR_API_KEY" \
      | jq '{domain: .domain, categories: [.categories[].name], risk: .risk_level}'
done
<?php
$apiKey = 'your_api_key_here';
$domains = ['bbc.co.uk', 'stackoverflow.com', 'netflix.com', 'phishing-site.xyz'];

foreach ($domains as $domain) {
    $ch = curl_init("https://api.webfilteringdb.com/v2/domain/{$domain}");
    curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer {$apiKey}"]);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $data = json_decode(curl_exec($ch), true);
    curl_close($ch);

    $cats = implode(', ', array_column($data['categories'], 'name'));
    echo "{$domain}: {$cats} (risk: {$data['risk_level']})\n";
}

Start Classifying Domains in Minutes

Get your free API key and begin querying 100 million categorized domains across 59 content categories with enterprise-grade performance.