Integrate the Company Funding API in PHP
Your team needs to enrich signups and vendor domains with company funding context so you can route leads faster, score accounts, or filter partners by “has raised capital.” By the end of this guide, you’ll be able to call Klazify’s company endpoint from PHP, extract raised amounts and related firmographics, cache results, and plug everything into your existing pipeline with predictable latency and failure handling.
Why Klazify is the right fit for funding-aware domain enrichment
When you need to know if a company has raised capital and place that in operational context, you also need accurate classification and consistent enrichment for the same domain. Klazify brings those threads together in a single response: funding signals (raised), company size and revenue ranges, location, and business tags—plus the option to map content to IAB categories for downstream controls.
- Accurate website categorization using AI: Klazify analyzes on-site content and structure, not just metadata, so your enrichment can reliably distinguish between corporate homepages, product microsites, and press subdomains when you later apply funding-based routing or filtering.
- Global coverage: Funding-aware enrichment needs to work for companies worldwide; Klazify processes domains in multiple languages so you can scale enrichment beyond a single region.
- Real-time classification: You get fresh categorization and company fields suitable for lead scoring or compliance checks that run as data arrives.
- Industry-level categories: With IAB taxonomy mapping available, you can layer brand-safety or industry allowlisting/denylisting logic alongside your funding criteria.
- Simple API integration: The REST interface keeps the call footprint small—send a domain, receive normalized company data including raised and revenue ranges—and is easy to wire into webhooks or background jobs.
- Compliance and filtering: Combine “raised” with categories and tags to block or approve certain industries (for example, high-risk categories) while still enriching the rest.
You can start for $39.99/month on Starter with a 7-day trial, and failed or unreachable calls are not billed. Create a free account to get an API key and test your integration: Register. Explore the product and platform at Klazify.
What you’ll build: funding-aware domain enrichment from PHP
We’ll implement a PHP call to the company endpoint, parse the returned fields, and structure them for analytics or routing. Along the way we’ll cover caching behavior, batched processing, and handling unknown/new domains.
Endpoint to use:
- POST https://www.klazify.com/api/domain_company
Authentication:
- HTTP Authorization: Bearer YOUR_API_KEY
Request body:
- JSON: {"url":"domain or URL"}
Make your first request (curl)
Send the target domain or URL to retrieve funding and company details. Below is a complete, copy-pasteable example:
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, the response includes the company object with these fields: name, city, stateCode, countryCode, employeesRange, revenue, raised, tags. According to the endpoint’s schema, revenue is provided as a range (not an exact figure). Use raised to capture known funding and tags to understand business model or sector signals.
Official response format and how to use it
The following JSON is the official sample response format you can expect when calling Klazify for categorization and company information. Use it as a reference to locate the fields you need for funding-aware enrichment and category-based controls.
{
"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:
- objects.company.raised: Funding raised by the company. Use this to set lead priority, route to an enterprise sales path, or filter vendors by funding status.
- objects.company.revenue: Treat as a range for segmentation and thresholding; use alongside employeesRange to infer scale.
- objects.company.employeesRange: Useful for go-to-market tiering and quota assignment.
- objects.company.tags: Quick business descriptors for scoring, enrichment, or vertical routing.
- domain.categories and the IAB mapping: Apply category-based allow/deny lists, brand-safety gates, or segment audiences by interest domain.
- domain.logo_url: Display a visual identifier in your CRM or admin console without scraping.
- domain_registration_data: Supplement risk assessment or onboarding checks with domain age and expiration windows.
- similar_domains: Suggest related accounts for SDRs or build “lookalike” cohorts for analytics.
For implementation details and schema notes, see the Documentation.
PHP integration: extract raised, revenue range, size, and tags
Below is a minimal PHP example showing how you could call the endpoint, parse the company payload, and normalize values into your model. You can adapt this to your framework or job runner.
<?php
$apiKey = 'YOUR_API_KEY';
$payload = json_encode(['url' => 'https://cbsnews.com']);
$ch = curl_init('https://www.klazify.com/api/domain_company');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($httpCode >= 200 && $httpCode < 300) {
$data = json_decode($response, true);
// Defensive checks
$company = $data['objects']['company'] ?? null;
if ($company) {
$raised = $company['raised'] ?? null; // numeric or null, represents capital raised
$revenue = $company['revenue'] ?? null; // treat as a range when present
$employeesRange = $company['employeesRange'] ?? null;
$tags = $company['tags'] ?? [];
// Normalize for your DB
$record = [
'name' => $company['name'] ?? null,
'city' => $company['city'] ?? null,
'state' => $company['stateCode'] ?? null,
'country' => $company['countryCode'] ?? null,
'employees_range' => $employeesRange,
'revenue_band' => is_string($revenue) ? $revenue : ($revenue !== null ? (string)$revenue : null),
'raised' => $raised,
'tags' => $tags
];
// Upsert $record to your datastore...
// echo json_encode($record, JSON_PRETTY_PRINT);
}
} else {
// Handle failure; failed or unreachable calls are not billed
// Retry with backoff, queue, or mark as UNKNOWN
}
This snippet shows a safe way to parse the company object and handle revenue as a range. If the endpoint returns null for raised (unknown or not found), default your routing to a neutral path.
JavaScript example: consume and route in a Node worker
Here’s a Node.js example using fetch to call the same endpoint and route by funding and size bands.
import fetch from 'node-fetch';
const API_KEY = 'YOUR_API_KEY';
async function enrichDomain(url) {
const res = await fetch('https://www.klazify.com/api/domain_company', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ url })
});
if (!res.ok) {
// Not billed for failed or unreachable calls
throw new Error(`HTTP ${res.status}`);
}
const data = await res.json();
const company = data?.objects?.company;
if (!company) return { status: 'NO_COMPANY_DATA' };
const raised = company.raised ?? null;
const employeesRange = company.employeesRange ?? null;
const revenue = company.revenue ?? null; // Expect a range band for routing
const tags = company.tags ?? [];
// Example routing logic
const funded = typeof raised === 'number' && raised > 0;
const enterprise = employeesRange === '100K+' || employeesRange === '10K-100K';
let route = 'STANDARD';
if (funded && enterprise) route = 'STRATEGIC';
else if (funded) route = 'FUNDED';
else if (enterprise) route = 'ENTERPRISE';
return {
route,
raised,
revenueBand: typeof revenue === 'string' ? revenue : String(revenue ?? ''),
employeesRange,
tags,
normalized: {
name: company.name ?? null,
city: company.city ?? null,
state: company.stateCode ?? null,
country: company.countryCode ?? null
}
};
}
enrichDomain('https://cbsnews.com')
.then(console.log)
.catch(console.error);
Which fields to store and how to use them
| Field | Type | Purpose | Typical Actions |
|---|---|---|---|
| name | string | Human-readable company name | Display in CRM; deduplicate accounts |
| city, stateCode, countryCode | string | Location signals | Regional routing; compliance checks |
| employeesRange | string band | Company size | Lead scoring; quota assignment |
| revenue | range band | Scale proxy | Tiering; pricing models |
| raised | number or null | Funding indicator | Route to enterprise reps; filter vendors by funding status |
| tags | list | Business descriptors | Vertical routing; enrichment; audience segmentation |
| categories (IAB) | list | Content classification | Allow/deny lists; brand safety; analytics grouping |
Operational guidance: batching, caching, unknowns, and taxonomy mapping
Batching and throughput
If you need to enrich large domain sets, run multiple POSTs concurrently from your worker pool with backoff and retry on transient errors. Keep your batch size aligned with your job queue to avoid overloading your outbound connections. For formal constraints and endpoint behavior, refer to the Documentation; plan specifics vary and should be validated during rollout.
Caching per domain
- Cache results keyed by the normalized domain (e.g., example.com) for a sensible TTL—commonly 24 hours to 7 days for enrichment pipelines.
- Store a timestamp next to each record; if your TTL lapses, refresh in the background and serve stale data until new data arrives.
- Segment caches by environment (prod vs. staging) to avoid data pollution.
Handling unknown or new domains
- If raised or other fields are null, persist a status like UNKNOWN and schedule a retry policy (e.g., 1h, 6h, 24h) before giving up.
- Use domain_registration_data to identify very new domains; you may want to increase review for domains with low age or imminent expiration.
- Provide a manual override pathway in your admin UI to set funding or category hints when your ops team has authoritative data.
Mapping to your own taxonomy
- Use IAB mapping from domain.categories to anchor your internal categories; maintain a static lookup table that converts IAB leaf nodes into your custom buckets.
- For funding-based routing, keep that logic separate from content categories. Combine them at the decision point: category is for safety/industry placement; raised/revenue is for scale and prioritization.
Resilience and cost control
- Implement idempotent jobs keyed by domain to avoid duplicate charges during retries. Failed or unreachable calls are not billed, but successful duplicates waste compute and increase latency.
- Log the response success flag and HTTP status for auditing, then persist only the fields you use (name, employeesRange, revenue band, raised, tags, categories, logo_url).
End-to-end workflow: from signup to enriched record
- Capture the user’s email or website domain during signup and normalize it (lowercase, strip protocol and path if needed).
- Check your cache; if the domain is fresh, use cached enrichment; otherwise, enqueue a background task.
- Call POST /api/domain_company with the domain URL and your Bearer token.
- Parse objects.company for name, employeesRange, revenue (range), raised, tags. Optionally supplement with domain.categories and logo_url from categorize responses in your broader workflow.
- Write the normalized record to your CRM or user profile store. Add a “funded” boolean and a size tier derived from employeesRange and revenue band.
- Apply your routing rules (e.g., funded AND enterprise → Strategic queue).
- Expose highlights in your admin UI: name, logo, size, revenue band, raised, tags, and main IAB category.
Security, governance, and observable integration
- Store YOUR_API_KEY in secrets management; never in code or client-side bundles.
- Add structured logs for domain, job ID, HTTP status, and elapsed request time.
- Alert on sudden increases in UNKNOWN responses or request failures; this catches upstream issues or malformed inputs fast.
- Record the request timestamp and the response’s domain_registration_data for context in reviews.
Testing your logic with real responses
Use known domains across different sizes and verticals to exercise your routing and enrichment code paths. Verify:
- Null-safe parsing when raised is null.
- Revenue parsing as a range band; avoid arithmetic on bands.
- Deterministic routing outcomes for your funded/enterprise rules.
- Cache invalidation and refresh flows.
For controlled test inputs and schema validation, consult the MCP and the API reference in the Documentation. If you haven’t yet, get an API key here: Register. You can also learn more about the platform at klazify.com.
FAQ
Does the API return exact revenue?
Use the revenue field as a range band for segmentation and routing. Avoid treating it as a precise figure in analytics or pricing.
What happens if the API can’t reach a domain or the call fails?
Failed or unreachable calls are not billed. Implement retries with backoff and mark the domain as UNKNOWN until a successful enrichment occurs.
How often should I refresh enrichment data?
A practical cadence is 24 hours to 7 days based on your use case. Cache by domain, store a fetched_at timestamp, and refresh asynchronously after TTL expiration.
Can I combine funding with category-based filters?
Yes. Use raised and size fields for prioritization and the IAB categories for allow/deny logic or brand safety. Keep the two decision layers independent and merge at routing time.
Is there a free trial?
Yes. The Starter plan is $39.99/month with a 7-day trial, suitable for implementing and validating your pipeline before scaling.
Ready to enrich domains with funding, size, and categories in one call? Create a free account and get your API key today: Register. Then ship your integration using the Documentation.
Ready to use Klazify?
Start classifying websites, enriching company data, and exploring web intelligence.
Get Started Free