How to Get the Employee Count
Your team needs a reliable employee count for any domain to power lead scoring, signup enrichment, or routing rules (for example, fast-tracking prospects over a certain headcount). By the end of this guide, you’ll call a single API to retrieve employeesRange and related company fields, parse the response in code, and plug it into your pipeline with caching, batching, and fallback behaviors.
Why Klazify is a strong fit for headcount-driven enrichment
Employee count is most useful when it’s paired with accurate company context. Klazify combines website classification and company enrichment in one API, making it straightforward to get a size signal and act on it in downstream systems.
- Accurate website categorization using AI: Klazify analyzes on-site content, letting you associate an employeesRange with correctly identified companies, even for niche sites.
- Global coverage: Get data across languages and regions, useful when sizing international leads.
- Real-time classification: Fresh crawls avoid stale records, enhancing confidence in headcount-driven routing.
- Industry-level categories (IAB): Pair employeesRange with IAB categories to filter, qualify, or personalize messaging per vertical.
- Simple API integration: One REST call returns employeesRange, revenue, tags, and location fields you can store and query.
- Compliance and filtering: Combine IAB categories with employeesRange to gate access, flag high-risk industries, or shape content access.
If you’re new to Klazify, you can review product capabilities on the homepage at https://www.klazify.com and create a free account to start testing.
The endpoint for employee count and company fields
Use the company enrichment endpoint to retrieve employee count and business context from a URL or domain:
- Method: POST
- Endpoint: https://www.klazify.com/api/domain_company
- Auth: Bearer token
- Body: JSON with a single key: url
Returned fields you’ll rely on include:
- name: Company name.
- city, stateCode, countryCode: Location data.
- employeesRange: A normalized headcount range (for example, “1-10”, “11-50”, “51-200”, “100K+”).
- revenue: A range, not an exact figure.
- raised: Total capital raised, when available.
- tags: A list of business descriptors.
Operational notes:
- Failed or unreachable calls are not billed.
- Starter plan is $39.99/mo with a 7-day trial.
- For complete parameter and field references, see the Documentation.
Quickstart: example cURL request
Authenticate with a Bearer token and provide the URL you want to enrich. The following request demonstrates a real call pattern you can paste into your terminal (replace YOUR_API_KEY):
curl -X POST "https://www.klazify.com/api/domain_company" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://cbsnews.com"}'
On success, you’ll receive a JSON object with company fields. In the next section, we’ll parse the fields you care about most for employee count–driven workflows.
Parse employeesRange and related fields in code
The example below shows a minimal Python script that posts a domain, checks for the company object, and extracts employeesRange, revenue, and location fields. Adapt it to your data flow (signup hook, queue worker, or batch job).
import json
import os
import requests
API_KEY = os.getenv("KLAZIFY_API_KEY", "YOUR_API_KEY")
ENDPOINT = "https://www.klazify.com/api/domain_company"
def enrich_domain(domain_url: str) -> dict:
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
payload = {"url": domain_url}
r = requests.post(ENDPOINT, headers=headers, data=json.dumps(payload), timeout=20)
r.raise_for_status()
return r.json()
def to_size_bucket(employees_range: str) -> str:
# Normalize to your internal buckets; examples:
# "1-10" -> "micro", "11-50" -> "small", "51-200" -> "mid", "201-1000" -> "large", "1001+" -> "enterprise"
if not employees_range:
return "unknown"
er = employees_range.replace(" ", "").lower()
if "100k" in er or "100k+" in er or "100,000" in er:
return "enterprise"
if "+" in er:
return "enterprise"
# Fallback for ranges like "51-200"
try:
lo, hi = er.split("-")
lo_i, hi_i = int(lo.replace("k","000")), int(hi.replace("k","000"))
if hi_i <= 10:
return "micro"
if hi_i <= 50:
return "small"
if hi_i <= 200:
return "mid"
if hi_i <= 1000:
return "large"
return "enterprise"
except Exception:
return "unknown"
if __name__ == "__main__":
data = enrich_domain("https://cbsnews.com")
company = data.get("objects", {}).get("company") or data.get("company")
if not company:
print("No company data returned; queue for retry and mark as unknown.")
exit(0)
name = company.get("name")
employees = company.get("employeesRange")
revenue = company.get("revenue")
city = company.get("city")
state = company.get("stateCode")
country = company.get("countryCode")
tags = company.get("tags", [])
bucket = to_size_bucket(employees)
print(f"Company: {name}")
print(f"Employees Range: {employees} (bucket: {bucket})")
print(f"Revenue: {revenue}")
print(f"Location: {city}, {state}, {country}")
print(f"Tags: {', '.join(tags) if tags else '(none)'}")
# Example: Decide lead routing based on size bucket
if bucket in {"large", "enterprise"}:
print("Route to Strategic SDR queue.")
else:
print("Route to SMB queue.")
Official Klazify JSON example and how to use it
This is the official sample response format. It shows how categorization and company objects are structured, including the company fields you’ll use for employee count–driven logic.
{
"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 it for headcount and enrichment:
- objects.company.employeesRange: Your primary headcount signal. Normalize this value to your internal buckets for routing, segmentation, or scoring.
- objects.company.revenue: Use as a range-based signal to complement employeesRange in your scoring model.
- objects.company.name and url: Canonicalize company identity in your CRM or CDP.
- objects.company.city/stateCode/countryCode: Geo-routing and territory assignment.
- objects.company.tags: Feature engineering for fit scoring and personalization.
- domain.categories and IAB mapping: Optional content-based filters; for example, segment B2B tech leads vs. consumer-oriented sites.
- domain.logo_url: Display in your CRM or internal tools to improve agent UX.
- domain_registration_data: Heuristic for maturity; useful if you flag very new domains for additional review.
- similar_domains: Seed for discovery workflows or deduping lookalike sites.
Operational guidance: batching, caching, unknowns, and taxonomy mapping
Batching at scale
- Queue inbound domains (from signups, forms, or logs) and post to the API in small concurrent batches to balance throughput and latency.
- Persist raw responses for replay and auditing. Store parsed fields (employeesRange, revenue, tags, location) in your data warehouse for analytics.
High-level rate limiting
- Design with backoff and jitter. If you approach rate limits, slide to queue-based processing rather than synchronous calls on your critical path.
- Prefer idempotent enrichment: don’t re-enrich a domain too frequently. Use cache TTLs (see below).
Caching and TTLs
- Cache by registrable domain (e.g., example.com) for 7–30 days depending on your freshness needs; shorter TTL if you rely on very dynamic data.
- Store a stable “company key” in your CRM to avoid duplicate accounts when the same domain appears via multiple sources.
Handling unknown or new domains
- If the response lacks employeesRange or company object, mark the record as unknown, route to a fallback queue, and retry later.
- Optionally, call the classification endpoint (see docs) to gather categories while the company record matures; this can still inform provisional routing.
Mapping employeesRange to your taxonomy
- Define buckets such as micro, small, mid, large, enterprise and map all observed ranges to these buckets for consistent analytics.
- Keep the raw employeesRange for transparency; store both the raw value and the derived bucket.
IAB categories and internal segments
- If you use IAB-aligned segments, join employeesRange with domain.categories to form two-dimensional qualification rules (e.g., Enterprise x B2B Tech).
- For custom taxonomies, maintain a mapping table where IAB categories resolve to your internal labels.
Field-to-use-case mapping
| Field | Type | Common Uses |
|---|---|---|
| employeesRange | String (range) | Lead routing, ICP fit scoring, tiered SLAs, ABM list building |
| revenue | Range | Complementary firmographic signal, pricing tier recommendations |
| city, stateCode, countryCode | Strings | Geo routing, territory ownership, data residency rules |
| tags | Array of strings | Personalization, feature flags, downstream ML features |
| domain.categories (IAB) | Array with confidence | Vertical segmentation, content gating, brand safety |
| logo_url | String (URL) | Agent UI enhancement, CRM account cards |
Pipeline patterns: from API call to business action
Signup enrichment
- On form submit, enqueue domain enrichment and return a generic “Thanks” page immediately.
- When the job completes, upsert account with employeesRange, revenue, and location; apply routing rules (enterprise → strategic SDR; SMB → pooled queue).
- Attach the raw response JSON to the record for audit and reprocessing.
Ad placement audit
- For domains where your ads run, capture employeesRange to measure reach by company size alongside IAB categories for brand safety checks.
- Cache results and revalidate on a rolling schedule for frequently changing inventories.
Content filtering and access control
- Combine employeesRange with categories to decide whether to allow trials, enable advanced features, or request additional verification (e.g., enterprise-only beta).
Quality, latency, and error handling
- Timeouts: Use a client timeout (e.g., 15–20s) and treat timeouts as retryable. Failed or unreachable calls are not billed.
- Retries: Apply exponential backoff with a max attempt cap to avoid thundering herds.
- Partial data: Proceed when only some fields are present (e.g., employeesRange without revenue). Fill gaps later via scheduled refresh.
- Observability: Log domain, HTTP status, and a short hash of the response; emit metrics for success rate and latency.
For governance and multi-connector planning, see MCP. If you’re exploring how this fits your stack, start from the product overview at https://www.klazify.com.
Pricing and getting access
You can start with the Starter plan at $39.99/month, which includes a 7-day trial. Calls that fail or time out are not billed. Create an account to obtain your API key and test the examples in this article.
Register to get your API key, then review the Documentation for additional endpoints and schema details.
FAQ
-
Which field should I use for headcount?
Use objects.company.employeesRange. Normalize this to your own size buckets for routing and analytics. -
Is revenue an exact number?
For the domain_company endpoint, revenue is returned as a range. Use it as a complementary sizing signal alongside employeesRange. -
How often should I refresh enrichment data?
Cache per domain with a TTL (for example, 7–30 days). Shorten the TTL for high-value accounts or frequently changing targets. -
What if the domain returns no company object?
Treat it as unknown, enqueue a retry, and consider using categorization data in the interim to make provisional decisions. -
Can I map Klazify’s categories to my taxonomy?
Yes. Maintain a mapping table between IAB categories and your internal segments, then join with employeesRange for composite rules.
Ready to pull employee counts into your product? Create your API key and ship your first integration today: Register.
Ready to use Klazify?
Start classifying websites, enriching company data, and exploring web intelligence.
Get Started Free