Integrate the Company Funding API in Python

November 25, 2026
Integrate the Company Funding API in Python

A signup form gives you a company website, but your CRM still needs a company name, location, size, revenue context and any available funding information. In this guide, you’ll send that website to Klazify from Python, read the company fields, and handle missing values without treating an unknown funding amount as zero.

Why use domain intelligence for company enrichment?

Documentation describes Klazify’s domain intelligence capabilities, including company information and website categorization. The company endpoint lets an enrichment job start with a URL rather than requiring a user to enter every business attribute manually.

Illustration: Integrate the Company Funding API in Python

That is useful when a signup needs a sales-routing decision. For example, employeesRange can inform a size-based routing rule, while tags can help an analyst understand the company’s business. The raised field is the relevant funding signal, but it may be unavailable; the integration should preserve that distinction.

Klazify also offers website classification based on content analysis, including IAB taxonomy mapping and URL-level categorization. That can complement company enrichment when a team needs to understand what a site publishes, rather than just the organization associated with it. Content analysis across languages can be useful for international websites, but a classification should still be reviewed against your own policy before it drives an automated decision.

The company endpoint and the categorization endpoint serve different purposes. This walkthrough calls https://www.klazify.com/api/domain_company for company data. The main categorization endpoint, https://www.klazify.com/api/categorize, is for website classification; do not assume a company tag is the same thing as an IAB category.

Send a company-domain request

Create an API key, then make a POST request with a JSON body containing the website URL. Replace YOUR_API_KEY with your key:

curl --request POST \
  --url https://www.klazify.com/api/domain_company \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"url":"https://cbsnews.com"}'

The URL is the input used to look up the company. The fields you will typically use for enrichment are under objects.company, including name, city, stateCode, countryCode, employeesRange, revenue, raised and tags.

Keep the API key on your server or in a secret manager, not in browser code or a repository. Test a single request before connecting the endpoint to a signup flow so you can inspect both the HTTP result and the returned data.

Read company data in Python

The following example uses Python’s standard library. Set KL A Z I F Y_API_KEY without the spaces as an environment variable containing your key, and set COMPANY_URL to the website you want to enrich. Set HTTP_TIMEOUT_SECONDS to a timeout appropriate for your application.

import json
import os
import sys
from urllib import error, request

api_key = os.environ["KLAZIFY_API_KEY"]
company_url = os.environ["COMPANY_URL"]
timeout = float(os.environ["HTTP_TIMEOUT_SECONDS"])

payload = json.dumps({"url": company_url}).encode("utf-8")
api_request = request.Request(
    "https://www.klazify.com/api/domain_company",
    data=payload,
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)

try:
    with request.urlopen(api_request, timeout=timeout) as response:
        result = json.load(response)
except error.HTTPError as exc:
    print(f"Company lookup failed with HTTP status {exc.code}", file=sys.stderr)
    sys.exit(1)
except (error.URLError, TimeoutError, OSError) as exc:
    print(f"Company lookup could not be completed: {exc}", file=sys.stderr)
    sys.exit(1)
except (json.JSONDecodeError, UnicodeDecodeError):
    print("Company lookup returned an unreadable response", file=sys.stderr)
    sys.exit(1)

if not isinstance(result, dict):
    print("Company lookup returned an unexpected response", file=sys.stderr)
    sys.exit(1)

if result.get("success") is not True:
    print("Company lookup did not report success", file=sys.stderr)
    sys.exit(1)

objects = result.get("objects") or {}
company = objects.get("company") if isinstance(objects, dict) else None

if not isinstance(company, dict):
    print("No company information was returned", file=sys.stderr)
    sys.exit(1)

fields = (
    "name",
    "city",
    "stateCode",
    "countryCode",
    "employeesRange",
    "revenue",
    "raised",
    "tags",
)

enrichment = {field: company.get(field) for field in fields}
print(json.dumps(enrichment, indent=2))

The script checks transport failures, unreadable JSON, the response’s success value and the presence of a company object before reading fields. Missing fields become null in the printed JSON rather than causing the lookup to fail or silently becoming zero.

In a production pipeline, replace the final print with your CRM update or queue message. Keep the original submitted domain alongside the enrichment in your own record so you can trace an update back to its input. Do not overwrite a verified CRM value with a missing API value without an explicit merge rule.

Interpret the response before updating your CRM

The following documented response illustrates the broader domain data structure. It is a sample for a different company, not a prediction of the result for the URL in the request above. The Python example reads its company fields; a company-endpoint response may not include every other section shown here.


{
    "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"
    ]
}

For the enrichment workflow, start with objects.company. The sample identifies a company and location, gives an employee range, and lists business tags. Its raised value is null, so the correct conclusion is that this response does not provide a funding amount—not that the company has raised nothing.

Treat revenue as range-oriented enrichment rather than a verified exact figure. The documented sample shows a numeric revenue value, so preserve the value and type actually returned instead of assuming every response will contain a formatted range. Confirm the applicable units and currency before using revenue or funding in financial calculations; do not infer them from a field name.

The domain.categories entries illustrate a separate classification use. Each has a category name and confidence; one also includes an IAB mapping. Those confidence values apply to the displayed classifications, not to the accuracy of the company’s revenue or funding information.

Returned field Enrichment use Handling decision
name Suggest a company name for the CRM record Review before replacing a verified name
city, stateCode, countryCode Add location context for routing Allow individual location fields to be missing
employeesRange Route by company-size band Keep the returned range, not an invented employee count
revenue Add revenue context Preserve the returned representation and verify units
raised Flag available funding information for review Keep missing or null values distinct from zero
tags Map business context to internal segments Retain the original tags alongside your mapping

For example, a CRM can route a record using employeesRange while leaving its funding field unfilled if raised is null. A sales analyst can then review the tags and location without mistaking the enrichment for a complete financial profile.

Operate the integration at scale

Queue and pace lookups. For a list of signups, submit individual company lookups through a worker queue and control concurrency according to your account’s limits. Check the documentation and your account for current rate limits rather than assuming a batch parameter or a particular quota. Retry transient failures with backoff, and keep failed jobs separate from successfully enriched records.

Cache by domain. Normalize the domain consistently in your application before using it as a cache key, and retain the submitted URL for traceability. Cache successful enrichment with a retrieval time and a refresh policy appropriate to your workflow. Company size, tags and funding information can change, so a cache should not become a permanent source of truth.

Handle unknown and new domains. A request can succeed without providing every company field, and a new or unreachable site may not yield useful enrichment. Mark the record for review or a later retry instead of blocking a legitimate signup solely because data is missing. Klazify states that failed or unreachable calls are not billed; your pipeline should still record the failure so it can be investigated.

Map to your own taxonomy. Store returned tags as source values, then apply a versioned internal mapping to the segments your CRM uses. If you also use website categories for an advertising or filtering workflow, map those separately from company tags. Review unmapped values and ambiguous matches rather than forcing them into an unrelated segment.

Keep enrichment out of the critical path when possible. A signup can be accepted first and enriched asynchronously, with the CRM record updated when the lookup finishes. If a product decision must happen immediately, define what happens when the lookup times out or returns no company data. The Python example’s timeout is configurable because that decision depends on your own latency budget.

For teams exploring other integration styles, Klazify also provides an MCP option. The REST request above remains the path used by the Python example.

FAQ

Does a null raised value mean the company has no funding?

No. It means the response does not provide a value in that field. Preserve it as unknown and use another verification process if a funding decision depends on it.

Can I use company tags as IAB categories?

No. Business tags and website categories describe different things. Use the returned classification and its IAB mapping for category-based workflows, and maintain a separate mapping for company tags.

How should I process many domains?

Queue individual lookups, limit concurrent requests according to your account’s rate limits, and cache results per normalized domain. Retry transient failures with backoff and review domains that remain unknown.

What does the Starter plan cost?

Starter is $39.99 per month with a 7-day trial. Check the account details for the limits that apply to your integration.

Ready to test the workflow? Register for a free account, create your API key, and run a company-domain lookup before connecting it to your CRM.

Ready to use Klazify?

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

Get Started Free