← Back to Blog
API GuideMarch 18, 20258 min read

Domain Enrichment API: Extract Company Intelligence from Any Website URL

Turn any website domain into a detailed company profile. Learn how domain enrichment works, when to use it, and how to integrate it with Python and Node.js.

You have a domain name. Maybe it came from an email address, a referral URL in your analytics, or a webhook payload. A domain enrichment API takes that URL and returns everything you need to know about the company behind it: name, logo, industry, tech stack, employee count, and social profiles. It is one of the fastest ways to turn anonymous web traffic or email contacts into actionable intelligence.

What Is Domain Enrichment?

Domain enrichment maps a website URL (like stripe.com) to structured company data. Unlike company name lookups, domain-based enrichment has a major advantage: domains are unique identifiers. There are hundreds of companies named "Mercury," but only one mercury.com. This makes domain enrichment more precise and reliable.

The API typically crawls the target domain, extracts metadata, cross-references business databases, and returns a normalized company profile. Modern providers like Easy Enrichment use AI to parse unstructured web content, giving you accurate results even for smaller companies that are not in traditional business directories.

Top Use Cases

  • Sales Intelligence: Extract the domain from a prospect's email (john@acme.com → acme.com), enrich it, and auto-populate your CRM with company size, industry, and social links before the first call.
  • Lead Enrichment: When a user signs up with a work email, enrich their domain to understand the company they work for. This enables automatic lead scoring and routing.
  • Security & Fraud: Verify that a domain associated with a transaction or signup belongs to a legitimate business. Domain enrichment reveals registration age, hosting details, and company verification status.
  • Analytics & Attribution: Identify companies visiting your website by enriching referral domains and reverse-IP data with company profiles.
  • Vendor Management: Automatically categorize and profile vendors from invoice domains to build a structured supplier database.

How the /enrich/domain Endpoint Works

Easy Enrichment's domain endpoint accepts a URL or bare domain and returns a structured company profile. The AI engine extracts data from the live website, social profiles, and business registries to compile the most current information available.

cURL Example

curl -X POST https://api.easyenrichment.com/enrich/domain \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "linear.app"
  }'

Example Response

{
  "domain": "linear.app",
  "company_name": "Linear",
  "logo_url": "https://linear.app/static/logo.png",
  "industry": "Project Management Software",
  "description": "Linear is a modern issue tracking and project management tool built for software teams.",
  "employee_range": "100-250",
  "headquarters": "San Francisco, CA",
  "website": "https://linear.app",
  "social_profiles": {
    "linkedin": "https://linkedin.com/company/linear-app",
    "twitter": "https://twitter.com/linear"
  },
  "tech_stack": ["React", "Node.js", "PostgreSQL"]
}

Python Integration

Here is a complete Python example that extracts a domain from an email address and enriches it:

import requests

API_KEY = "YOUR_API_KEY"

def enrich_domain(domain: str) -> dict:
    """Enrich a domain with company intelligence."""
    response = requests.post(
        "https://api.easyenrichment.com/enrich/domain",
        headers={
            "Authorization": f"Bearer {API_KEY}",
            "Content-Type": "application/json",
        },
        json={"domain": domain},
    )
    response.raise_for_status()
    return response.json()

def enrich_from_email(email: str) -> dict:
    """Extract domain from email and enrich it."""
    domain = email.split("@")[1]
    return enrich_domain(domain)

# Usage
result = enrich_from_email("jane@figma.com")
print(f"Company: {result['company_name']}")
print(f"Industry: {result['industry']}")
print(f"Size: {result['employee_range']}")

Node.js / TypeScript Integration

For JavaScript and TypeScript projects, here is a typed integration using fetch:

interface DomainEnrichment {
  domain: string;
  company_name: string;
  logo_url: string;
  industry: string;
  description: string;
  employee_range: string;
  headquarters: string;
  website: string;
  social_profiles: {
    linkedin?: string;
    twitter?: string;
  };
}

async function enrichDomain(
  domain: string
): Promise<DomainEnrichment> {
  const res = await fetch(
    'https://api.easyenrichment.com/enrich/domain',
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${process.env.EASY_ENRICHMENT_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ domain }),
    }
  );

  if (!res.ok) throw new Error(`API error: ${res.status}`);
  return res.json();
}

// Enrich on user signup
app.post('/api/signup', async (req, res) => {
  const { email } = req.body;
  const domain = email.split('@')[1];

  // Skip free email providers
  const freeProviders = ['gmail.com', 'yahoo.com', 'hotmail.com'];
  if (!freeProviders.includes(domain)) {
    const company = await enrichDomain(domain);
    await db.leads.update({
      email,
      company_name: company.company_name,
      company_size: company.employee_range,
      industry: company.industry,
    });
  }

  res.json({ success: true });
});

Domain vs. Company Name Enrichment: When to Use Which

  • Use domain enrichment when: You have a URL, email address, or referral source. Domains are unique identifiers and produce more precise results.
  • Use company name enrichment when: You only have a business name (from a form field, invoice, or bank transaction). The API handles disambiguation, but results may need verification for common names.
  • Use both together: For maximum accuracy, pass both the company name and domain to cross-verify results. If the enriched domain's company name matches the provided name, you have a high-confidence match.

Best Practices

  • Strip subdomains: Send acme.com instead of blog.acme.com or app.acme.com for best results.
  • Filter free email providers: Domains like gmail.com, outlook.com, and yahoo.com will not return useful company data. Maintain a blocklist and skip enrichment for these.
  • Cache aggressively: Domain-to-company mappings rarely change. Cache results for 7-30 days to minimize API usage.
  • Handle errors gracefully: Some domains are parked, expired, or belong to individuals rather than companies. Always check the response status and handle 404s.

Try Domain Enrichment Free

Sign up and get 100 free API calls. Test with any domain and see the full company profile returned in milliseconds.

Get Your API Key →