Domestic Services IAB Categories Website Classification API Guide
You need to reliably identify “Domestic Services” websites (home cleaning, repair, and similar household services) to enforce category-based blocking, keep your ad placements brand-safe, or enrich signups from service providers. By the end of this guide, you’ll have a working implementation using Klazify’s categorization endpoint, plus patterns for batching, caching, and mapping the IAB outputs into your own Domestic Services taxonomy.
Why Klazify is the right fit for Domestic Services classification
Domestic Services sites often blend local pages, booking forms, and blog posts, making them easy to misclassify if you rely on metadata alone. Klazify analyzes live page content, returning industry-standard IAB mappings alongside human-readable category paths so you can take precise actions in pipelines that care about relevance and brand safety.
- Accurate categorization using AI: Klazify evaluates on-page content and structure, which helps separate household services (e.g., cleaning, moving, repairs) from unrelated local businesses that share geographic keywords.
- Global coverage: Many Domestic Services brands run multi-language portals and regional franchises; Klazify’s global approach helps classify these consistently across markets.
- Real-time analysis: Rather than relying only on static databases, Klazify analyzes the URL you submit, which matters when a service directory or aggregator frequently adds or removes providers.
- Industry-level categories with IAB taxonomy: You receive IAB-compatible outputs as sibling keys in each category object. This makes it straightforward to align Domestic Services with your ad tech, policy, or analytics pipelines.
- Simple API integration: A single REST call gets you content categories, company data, logo URLs, social links, and related domain signals. You can enrich new signups from service providers or gate app features by category.
- Compliance and filtering: Klazify’s outputs support whitelisting or blocking of Domestic Services categories for corporate networks, public WiFi filtering, or contextual ad placement controls.
In short, if your task involves detecting, whitelisting, or reporting on Domestic Services websites at scale, Klazify streamlines the end-to-end workflow with fields you can plug directly into your decision logic.
How classification data is returned and where IAB fits in
Use the main categorization endpoint to obtain both human-readable category paths and IAB taxonomy keys. For each category in the response, you’ll see:
- name: The hierarchical category path (e.g., “/Group/Subgroup/Subcategory”), suitable for rule-based matching or mapping into your own taxonomy.
- confidence: A score you can use for thresholds, tie-breaks, or routing uncertain domains for review.
- IAB keys: Returned as sibling fields (e.g., “IAB-632-596”), so you can map to IAB-aligned policies without crawling your own lookup tables. Different IAB versions may appear as distinct sibling keys.
This dual structure lets you write flexible logic. You can:
- Match on name for fine-grained, readable rules in domestic domains.
- Match on the presence of an IAB key for direct integration with ad servers or brand safety systems that expect IAB taxonomy.
- Retain both forms for long-term compatibility, since category names and IAB versions can evolve over time.
Quickstart: classify a URL and interpret the result
The main endpoint:
- POST https://www.klazify.com/api/categorize
- Authorization: Bearer YOUR_API_KEY
- Body: JSON with a url field
cURL request
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"}'
JSON response example
Use the following example response to build your parser. Keep in mind that category values are domain-dependent; the structure below is what your code should expect and handle.
{
"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"
]
}
What you’ll use for Domestic Services logic
- domain.categories: Iterate through each category. For policy decisions, inspect both name and the presence/value of any IAB-like sibling keys (e.g., IAB-632-596).
- confidence: Use a minimum threshold (e.g., 0.7–0.9) depending on your tolerance for false positives; route below-threshold results for manual review or temporary allowlisting.
- objects.company fields: Enrich CRM or signup records (company name, location, employee range, revenue, tags, tech) to route leads that operate in the Domestic Services space.
- domain.logo_url: Display logo in moderation dashboards to accelerate human review.
- domain_registration_data: Optional heuristics for new/ephemeral domains; brand safety teams sometimes flag very new domains for extra scrutiny.
- similar_domains: Seed discovery or blocklists by crawling related sites, then reclassify to confirm they fit your Domestic Services criteria.
Code walkthrough: classify, cache, and map to your Domestic Services taxonomy
The snippet below shows how to call the endpoint, cache by eTLD+1, and map returned categories into your internal “Domestic Services” flag. You own the mapping logic: maintain a list of rules that match category name strings and/or the presence of specific IAB sibling keys. This puts you in control of how strict or broad “Domestic Services” should be for your use case.
import os
import time
import json
import requests
from urllib.parse import urlparse
API_KEY = os.getenv("KLAZIFY_API_KEY", "YOUR_API_KEY")
API_URL = "https://www.klazify.com/api/categorize"
CACHE_TTL_SECONDS = 7 * 24 * 3600 # 7 days
cache = {} # simple in-memory cache: { eTLD1: (expires_at, response_json) }
def etld1(url):
netloc = urlparse(url).netloc
if not netloc:
netloc = urlparse("http://" + url).netloc
parts = netloc.split(":")[0].split(".")
return ".".join(parts[-2:]) if len(parts) >= 2 else netloc
def get_categories(url):
key = etld1(url)
now = time.time()
if key in cache and cache[key][0] > now:
return cache[key][1]
resp = requests.post(
API_URL,
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={"url": url},
timeout=20
)
# Handle non-2xx without assuming billing; failed/unreachable calls are not billed.
resp.raise_for_status()
data = resp.json()
cache[key] = (now + CACHE_TTL_SECONDS, data)
return data
# Your Domestic Services mapping rules:
# - These are examples of rule shapes. Populate with your own patterns that match
# category 'name' strings and/or specific IAB keys your team maintains.
DOMESTIC_SERVICES_RULES = {
"name_contains": [
# e.g., fragments you consider indicative of Domestic Services.
# Add your own strings that appear in category names in your data.
# Examples to fill in from your production observations:
# "Home Services", "Household", "Gardening", "Home Improvement", "Moving"
],
"iab_keys": [
# e.g., "IAB-324-JLBCU7", "IAB12"
# Fill with IAB keys you map to Domestic Services in your environment.
]
}
def is_domestic_services(category_obj):
name = category_obj.get("name", "") or ""
# 1) Name matching
for frag in DOMESTIC_SERVICES_RULES["name_contains"]:
if frag.lower() in name.lower():
return True
# 2) IAB sibling key presence/value matching
for key in DOMESTIC_SERVICES_RULES["iab_keys"]:
if key in category_obj:
return True
return False
def evaluate_url(url, min_confidence=0.75):
data = get_categories(url)
domain = data.get("domain", {})
cats = domain.get("categories", []) or []
matched = []
for c in cats:
if c.get("confidence", 0) >= min_confidence and is_domestic_services(c):
matched.append({
"name": c.get("name"),
"confidence": c.get("confidence"),
"iab_keys": {k: v for k, v in c.items() if k.startswith("IAB-")}
})
return {
"domestic_services": len(matched) > 0,
"matches": matched,
"logo_url": domain.get("logo_url"),
"company": (data.get("objects") or {}).get("company"),
"domain_registration_data": data.get("domain_registration_data"),
"similar_domains": data.get("similar_domains")
}
if __name__ == "__main__":
result = evaluate_url("https://cbsnews.com")
print(json.dumps(result, indent=2))
How to put this to work:
- Blocking: If result.domestic_services is true, add the domain to your blocked category or route to a moderation queue based on confidence.
- Lead enrichment: For signups from service providers, attach objects.company, logo_url, and your Domestic Services flag to their CRM profile for routing, scoring, or deduplication.
- Ad safety: Use the IAB sibling keys in matches[i].iab_keys to align with placement policies or DSP configurations that expect IAB taxonomy.
Batching, caching, and handling unknown domains
To scale beyond a single URL per call:
- Batching: Queue domains and call the API asynchronously. Use worker pools sized to your traffic profile and agreed throughput. If you have a bursty workload, smooth it with a small backlog queue.
- Caching: Cache by eTLD+1 (e.g., example.com) for at least several days. Domestic Services sites don’t change category frequently; a 7–30 day TTL is typical. Renew on demand when you detect major content changes.
- Unknown/new domains: If domain_registration_data suggests a very recent registration date or the response has low confidence categories, mark for recheck within hours or days. You can also implement a manual allowlist for newly onboarded partners.
- Retries: For network errors or transient 5xx, retry with exponential backoff. Failed or unreachable calls are not billed, so safe retry logic won’t create cost surprises.
Designing your Domestic Services mapping
Your production policy typically depends on your own taxonomy. You can maintain a compact ruleset that treats certain category names and/or IAB sibling keys as Domestic Services. The table below shows which fields to read and how to use them without hard-coding assumptions about IAB versions.
| Field | How to Use | Notes |
|---|---|---|
| domain.categories[i].name | Pattern match substrings you associate with Domestic Services; keep an audit log of which fragment matched. | Readable and version-agnostic. Update your fragments as you observe new category paths. |
| domain.categories[i].confidence | Apply a minimum threshold and surface borderline cases for review. | Tunable per integration (blocking vs enrichment may use different thresholds). |
| domain.categories[i].IAB-* | Whitelist or block based on specific IAB sibling keys present. | Keys appear as siblings (e.g., IAB-632-596). Support multiple IAB versions by checking any key that starts with “IAB-”. |
| objects.company | Attach to CRM profiles; match on tags or description to corroborate Domestic Services status. | Useful for sales routing and deduplication of service providers and directories. |
| similar_domains | Expand discovery of related Domestic Services domains; reclassify each candidate before acting. | Good for coverage improvement while preserving precision. |
Operational considerations for pipelines
Integrate thoughtfully so your Domestic Services decisions are fast and consistent.
- Latency budget: Run categorization out of band for first-time domains and rely on cache hits for synchronous requests (signup, ad request, or policy check). Refresh stale cache entries asynchronously.
- Rate limits: Design a pool of workers that respects typical REST API best practices. Use backoff on errors and track a rolling average of throughput to keep headroom.
- Reclassification cadence: For stable domains, a 30-day refresh works well. For aggregator directories or content networks that change frequently, shorten to 7–14 days.
- Observability: Log URL, eTLD+1, categories, confidence, mapping decision, and the rule or IAB key that triggered the decision. This speeds audits and rollbacks.
- MCP note: The MCP endpoint exists at the provided base, but GET /mcp is a 405. For categorization, use the main endpoint shown above.
Putting it into action: blocking vs enrichment vs audit
- Blocking Domestic Services: Use a minimal confidence threshold and a conservative rule set. If any category passes the rule and confidence threshold, mark the domain as Domestic Services and block. Add a temporary allowlist for edge cases.
- Lead enrichment: When new signups include a website, classify it once and attach the Domestic Services flag, logo_url, and company fields into your CRM. Cache results to prevent duplicate calls during sales reviews.
- Ad placement audit: For existing placements, reprocess the list of publisher domains daily or weekly. Log the IAB sibling keys for each domain and export flagged Domestic Services placements for your ad ops team to review.
Plan, trial, and billing notes
Getting started is straightforward: there’s a Starter plan at $39.99/month with a 7-day trial. Failed or unreachable calls are not billed, which simplifies retry logic and bulk backfills. For implementation details, see the Documentation. When you’re ready to test your pipeline, create your account here: Register.
Testing checklist for Domestic Services deployments
- Collect a labeled sample set of known Domestic Services domains and non-Domestic Services lookalikes (e.g., local blogs, community centers) to validate your mapping rules.
- Establish your minimum confidence threshold and define the manual review path for borderline results.
- Set cache TTL and a reclassification schedule per domain type (stable brands vs directories).
- Log the exact category name and IAB sibling key that triggered the Domestic Services decision for explainability.
- Implement safe retries with backoff; track failed/unreachable requests separately.
- Plan for ongoing taxonomy maintenance: periodically inspect new category names observed in production and update your rules.
Reference links and MCP
For full technical details, consult the Documentation. The MCP reference is available at MCP. To try the API with a free trial, head to Register.
FAQ
-
How do I map the response to my own Domestic Services category?
Inspect domain.categories entries and define rules that match category name fragments and/or IAB sibling keys (e.g., fields whose keys start with “IAB-”). Keep an internal mapping list and update it as you observe new patterns.
-
What should I do with low-confidence results?
Use a minimum confidence threshold. Below that, either defer the decision and recheck later, flag for manual review, or allowlist temporarily if the business impact of blocking is high.
-
Can I enrich signups from Domestic Services providers?
Yes. Attach objects.company fields (name, location, employeesRange, revenue, tags, tech) and your Domestic Services boolean to the lead’s CRM profile. This improves routing and scoring.
-
How often should I reclassify?
Cache results for days or weeks. For stable brands, monthly refresh is common. For directories or aggregators, refresh weekly. Trigger on-demand refreshes when major site changes are detected.
-
What happens if the API is temporarily unreachable?
Retry with exponential backoff and serve from cache. Failed or unreachable calls are not billed.
Ship your Domestic Services classification workflow with a single integration. Review the Documentation and start building by creating your account at Register.
Ready to use Klazify?
Start classifying websites, enriching company data, and exploring web intelligence.
Get Started Free