Helenis API
Start for free

BusinessLead Generation

Company Enrichment API: From a Website URL to Contacts and a Lead Score

Company enrichment API guide: turn a company website into role-based contacts, an AI profile, a lead score and icebreakers with Python, GDPR-minded.

Company Enrichment API cover: an office building sticker, an arrow and a JSON response with Plausible Analytics, size 11-50, industry Web Analytics Software, a score of 95 and the verdict strong fit.
A small EU analytics company read from its own website: industry, size 11-50, and a strong fit at 95.

Most prospect lists start as a column of domains: an export from a trade-show app, a directory scrape, sign-ups with a work email. Before anyone writes to them, someone has to open each site, find out what the company sells, guess its size, look for a contact address and decide whether it is worth the effort. At ten minutes per domain, a list of 300 is a week of work.

A company enrichment API automates that research. The common approach is a lookup in a database of companies, which works well for large firms and returns little for the small and recent ones that make up most real lists. This article takes the other route: read the company's own website at the moment you ask, extract its public contacts with deterministic code, and let a model write the profile, the lead score and the opening lines from what the site actually says.

Where company data comes from

There are three common ways to fill in a row about a company, and they fail in different places:

Approach Coverage Freshness Contacts Judges fit with your offer
Enrichment database (lookup by domain) Strong on large and well-known companies As old as the last refresh Often personal emails, with GDPR questions attached No
Contact scraper (regex over the site) Any public website Live Whatever matches, personal addresses included No
Reading the website with a model Any public website that serves HTML Live Role-based addresses only, here Yes, against a profile you write

This API takes the third approach. Its weak spot: a site that blocks bots or renders everything in JavaScript gives it little to read.

What the API reads, and what it returns

For each URL, the service fetches the home page and up to three key pages found through the site's own links, matched by path: contact (/contact, /kontakt, /contactez-nous), about (/about, /team, /qui-sommes-nous), legal notice (/imprint, /impressum, /mentions-legales) and careers (/careers, /jobs). The legal notice matters more than it seems: in Germany, Austria and France, the law requires commercial sites to publish a contact address there, so it often holds the email the contact page hides behind a form. Each page is capped at 10 seconds and 2 MB, and the crawl is reused for 10 minutes, so a second call on the same domain does not fetch it again.

The response is built in two layers:

  • Contacts, without AI. Emails, phone numbers, company social profiles and the contact page are extracted from links and text by code. Nothing in this layer is generated.
  • AI sections, on request. A model reads up to 24,000 characters of the collected text, delimited as untrusted content, and writes the company profile, the lead_score and the icebreaker. It is told to use only facts present on the site and to answer null or Unknown rather than guess.
Endpoint Returns Credits
GET /v1/lead-intelligence/contacts Contacts and page meta, no AI 1
GET /v1/lead-intelligence/profile AI company profile + contacts 10
POST /v1/lead-intelligence/score Score, verdict, reasons, concerns + contacts 10
POST /v1/lead-intelligence/icebreaker Opening lines, subject line, the fact used + contacts 10
POST /v1/lead-intelligence/enrich Any combination of the three, in one AI pass 12

Find a company's public contacts with Python (website contact finder)

The contacts endpoint is the cheap first pass: no AI, 1 credit, about a second when the site answers quickly.

Python
import requests

HOST = "website-contact-finder-company-enrichment2.p.rapidapi.com"
API = f"https://{HOST}/v1/lead-intelligence"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}

response = requests.get(
    f"{API}/contacts",
    headers=HEADERS,
    params={"url": "https://plausible.io"},
    timeout=60,
)
response.raise_for_status()
lead = response.json()

print(lead["contacts"]["emails"], lead["contacts"]["contact_page"])

The real response for Plausible Analytics, a web analytics company, with the meta description cut:

JSON
{
  "url": "https://plausible.io/",
  "final_url": "https://plausible.io/",
  "domain": "plausible.io",
  "pages_analyzed": [
    "https://plausible.io/",
    "https://plausible.io/contact",
    "https://plausible.io/about",
    "https://plausible.io/imprint"
  ],
  "meta": {
    "title": "Plausible Analytics | Simple, privacy-friendly Google Analytics alternative",
    "language": "en"
  },
  "contacts": {
    "emails": ["hello@plausible.io"],
    "phones": [],
    "social": {
      "linkedin": "https://www.linkedin.com/company/plausible-analytics",
      "twitter": "https://twitter.com/PlausibleHQ",
      "github": "https://github.com/plausible/analytics"
    },
    "contact_page": "https://plausible.io/contact",
    "personal_emails_omitted": 0
  }
}

The crawler found the contact, about and imprint pages on its own. Empty lists stay in the response (phones: []), and social profiles only appear for networks the site links to. Phone numbers come back as digits with a leading + when the site prints an international format, close to E.164 but not validated against numbering plans.

Why personal emails are counted, not returned

Under the GDPR, an address like firstname.lastname@company.com is personal data, because it identifies a person, even at work. Mailing it requires a lawful basis, and in several EU countries cold email to individuals needs prior consent. Role-based addresses such as contact@, sales@ or hello@ reach a function, not a person.

The API therefore classifies every address it finds. A local part that starts with a known role (contact, info, hello, sales, support, press, billing, jobs, privacy and about a hundred more, in several languages) is returned; anything else is counted in personal_emails_omitted and dropped. Personal LinkedIn profiles (/in/ URLs) are ignored; only company pages come back. If you need the named decision-maker, that step belongs to a tool and a legal basis of your own.

Company enrichment API in one call: profile, score and icebreakers

/enrich runs every AI section you ask for in a single model pass over the same crawl. Here, a consultancy selling GDPR audits checks whether Plausible fits its target market:

Python
payload = {
    "url": "https://plausible.io",
    "sections": ["profile", "score", "icebreaker"],
    "ideal_customer_profile": (
        "Small B2B software companies (under 50 employees) in Europe "
        "that sell subscriptions online and care about GDPR."
    ),
    "offer": "We run fixed-price GDPR audits for SaaS companies, delivered in two weeks.",
    "tone": "professional",
    "language": "English",
    "count": 2,
}
response = requests.post(f"{API}/enrich", headers=HEADERS, json=payload, timeout=90)
response.raise_for_status()
lead = response.json()

The real response took 4.6 seconds. The contacts block is the one shown above, so it is cut here, along with the profile's description:

JSON
{
  "company": {
    "company_name": "Plausible Analytics",
    "one_liner": "Plausible is a lightweight, open-source, and privacy-friendly alternative to Google Analytics.",
    "industry": "Web Analytics Software",
    "categories": ["SaaS", "Privacy Tech", "Web Analytics", "Open Source", "Data Compliance"],
    "business_model": "B2B",
    "products_and_services": ["Web Analytics Dashboard", "Custom Event Tracking", "Revenue Attribution", "API Access", "White-label Analytics"],
    "target_customers": ["SaaS companies", "Ecommerce businesses", "Agencies", "Public sector", "Publishers"],
    "headquarters": "Tartu, Estonia",
    "founded_year": 2018,
    "company_size": "11-50",
    "size_signals": ["Stated team size of 11 employees on the about page."]
  },
  "lead_score": {
    "score": 95,
    "verdict": "strong fit",
    "reasons": [
      "The company is a small B2B SaaS team based in the EU.",
      "They are highly privacy-conscious, making them an ideal partner for GDPR-related services.",
      "They operate on a subscription business model.",
      "They are under the 50-employee threshold."
    ],
    "concerns": []
  },
  "icebreaker": {
    "subject_line": "GDPR audit for Plausible Analytics",
    "lines": [
      "Since Plausible is built on a commitment to privacy and EU-hosted infrastructure, ensuring your own internal compliance remains airtight is likely a priority. We provide fixed-price GDPR audits for SaaS companies, delivered in just two weeks.",
      "I noticed Plausible’s strong focus on privacy-friendly analytics and GDPR compliance. We help SaaS teams maintain that same standard of excellence with our fixed-price, two-week GDPR audits."
    ],
    "hook": "Plausible is built and hosted in the EU, with a strong focus on privacy and GDPR compliance."
  }
}

Three details are worth noticing. company_size is one of six fixed buckets (1-10, 11-50, 51-200, 201-1000, 1000+, Unknown), and size_signals gives the evidence behind it: here a team size stated on the about page, not a guess from the design of the site. founded_year is only filled when the site states it. And the profile has no hiring key: nothing on the pages read said the company was recruiting, so the field is left out instead of being set to false.

Lead scoring API: judging fit against your ideal customer profile

The score is only as useful as the profile it is measured against. Given Mailchimp and the profile "B2B SaaS companies with 50-500 employees selling to marketing teams", returned this (real response, from the API's documentation):

JSON
{
  "lead_score": {
    "score": 40,
    "verdict": "weak fit",
    "reasons": [
      "The company is significantly larger than the 500-employee limit in the ideal customer profile.",
      "They already possess extensive internal AI marketing and automation capabilities."
    ],
    "concerns": ["They are a direct competitor in the marketing automation space."]
  }
}

A low score with reasons is more useful than a high one without: a sales rep can read the concern and disagree. The verdict takes four values (strong fit, possible fit, weak fit, not a fit), which map directly to routing rules. Some habits make the profile work better:

  • Write it as you would brief a new sales hire. Size range, geography, business model, what the company sells and to whom. The model compares those facts with the site.
  • Include disqualifiers. "Not agencies", "no public sector" or "must sell online" give the model something to put in concerns.
  • Keep one profile per segment. Scoring the same list against two profiles is clearer than one profile with "or" in every sentence.
  • Use the score to sort, not to decide. It reflects what the website says, and a website is a sales document.

Icebreakers built on one fact

The hook field states the fact from the website that the opening lines rely on. Check it before sending: if the hook is true, the line is at worst generic; if it is not on the site, discard the line. tone accepts friendly, professional, casual or bold, count asks for one to three variants, and language sets the language of every AI-written field, whatever the language of the site.

Enrich a list of domains with retries and cost control

The script below reads domains.txt, enriches each site in one call, and writes one CSV row per domain, failures included. A failed call is not billed, and only 503 responses are worth retrying.

Python
import csv
import time
from concurrent.futures import ThreadPoolExecutor

import requests

HOST = "website-contact-finder-company-enrichment2.p.rapidapi.com"
API = f"https://{HOST}/v1/lead-intelligence"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
ICP = "Small B2B software companies (under 50 employees) in Europe that sell subscriptions online."
OFFER = "We run fixed-price GDPR audits for SaaS companies, delivered in two weeks."


class DailyLimitReached(Exception):
    pass


def enrich(url: str, attempts: int = 3) -> dict:
    payload = {
        "url": url,
        "sections": ["profile", "score", "icebreaker"],
        "ideal_customer_profile": ICP,
        "offer": OFFER,
        "tone": "professional",
        "count": 1,
    }
    for attempt in range(attempts):
        try:
            r = requests.post(
                f"{API}/enrich", headers=HEADERS, json=payload, timeout=90
            )
        except (requests.Timeout, requests.ConnectionError):
            time.sleep(5 * 2**attempt)
            continue
        if r.status_code == 429:
            raise DailyLimitReached(r.text)  # resets at 00:00 UTC
        if r.status_code == 503:  # ai_error, capacity_exhausted: not billed
            time.sleep(int(r.headers.get("Retry-After", 5 * 2**attempt)))
            continue
        return r.json()  # a lead, or {"error": {...}} for a 400
    return {"error": {"code": "gave_up"}}


def row(url: str, lead: dict) -> list:
    if "error" in lead:
        return [url, "", "", "", "", "", "", "", lead["error"]["code"]]
    company = lead.get("company", {})
    score = lead.get("lead_score", {})
    contacts = lead["contacts"]
    opener = lead.get("icebreaker", {}).get("lines", [""])[0]
    return [
        url,
        company.get("company_name"),
        company.get("company_size"),
        score.get("score"),
        score.get("verdict"),
        "; ".join(contacts["emails"]),
        contacts.get("contact_page"),
        opener,
        "",
    ]


with open("domains.txt", encoding="utf-8") as f:
    domains = [line.strip() for line in f if line.strip()]

with (
    ThreadPoolExecutor(max_workers=4) as pool,
    open("leads.csv", "w", newline="", encoding="utf-8") as out,
):
    writer = csv.writer(out)
    writer.writerow(
        [
            "url",
            "company",
            "size",
            "score",
            "verdict",
            "emails",
            "contact_page",
            "opener",
            "error",
        ]
    )
    for url, lead in zip(domains, pool.map(enrich, domains)):
        writer.writerow(row(url, lead))

What to watch in production:

  • One call, not three. When you need more than one section, /enrich costs 12 credits where separate /profile, /score and /icebreaker calls cost 30.
  • Don't retry 400s. site_unreachable, site_blocked and not_html describe the website, not a transient fault. site_unreachable can be tried again on the next run.
  • Deduplicate first. Normalise to the domain before calling; www. variants and tracking parameters otherwise cost you twice.
  • Clean the addresses. Role-based addresses still bounce when a domain has no mail server. The email verification walkthrough checks MX records before anything reaches the CRM.
  • Need other fields? If you want something the profile does not cover (pricing tiers, integrations listed on a page), the AI web scraper extracts any field list you define.

What it costs

Plan Price per month Credits In practice
BASIC Free, no card 15 per day 15 contact lookups, or one full enrichment
PRO $4.99 8,000 8,000 contact lookups (about $0.0006 each), or 666 full enrichments
ULTRA $14.99 24,000 2,000 full enrichments
MEGA $49.99 80,000 6,666 full enrichments

A full /enrich on PRO comes to about $0.0075 per company; beyond the quota, paid plans continue at $0.007 per credit. For comparison, contact-lookup APIs on RapidAPI charge $16 for 15,000 to $25 for 10,000 lookups, and AI company profiles sell for $10 to $25 per 1,000. Plans are on the API page, parameters in the reference.

Run it without code on Apify

The same engine runs as an Apify Actor, Website Contact Finder & AI Lead Enrichment. Paste websites, or give it the dataset ID of another actor such as a Google Maps or directory scraper, switch the profile, score and icebreakers on or off, and export one row per website to CSV, Excel or Google Sheets. It charges $0.0015 per website crawled and $0.008 per website with AI sections; sites that cannot be read are listed with their error and not charged.

What the company enrichment API does not do

  • No named people. No personal emails, no personal LinkedIn profiles, no guessed first.last@ patterns. It finds the company's published channels, not its employees.
  • No email verification. An address on a website can still bounce; check deliverability separately.
  • No JavaScript rendering or bot walls. It reads the HTML the server sends, from the home page and at most three other pages. Sites that answer with a challenge return site_blocked, unbilled.
  • No firmographic database. Revenue, funding rounds and exact headcount only appear when the website states them; company_size is an estimate with its evidence.
  • No sending. Icebreakers are drafts. Sending cold email is subject to the GDPR, the ePrivacy rules of each EU country and laws such as CAN-SPAM in the US.

Frequently asked questions

How do I find a company's email address from its website?

Call a website contact finder such as GET /v1/lead-intelligence/contacts with the company URL. It reads the home, contact, about, legal-notice and careers pages and returns the role-based addresses, phone numbers and social profiles published there, for 1 credit and without AI.

What is a company enrichment API?

An API that takes a company identifier, usually a domain, and returns structured facts about it: industry, products, size, location and contacts. Some query a pre-built database; this one reads the company's website at request time and writes the profile from what it finds.

How does AI lead scoring work?

You describe your ideal customer in plain words. The model compares that description with the facts on the company's website and returns a 0-100 score, a verdict, the reasons and the concerns. Read the reasons before trusting the number.

Is scraping company contact details GDPR compliant?

Role-based company addresses such as contact@ are not tied to a person, which is why the API returns only those and drops personal addresses. How you then contact a company remains your responsibility under the GDPR and local direct-marketing rules.

Why does the API return no email for some companies?

Many companies publish a contact form instead of an address, and personal addresses are never returned. You still get the contact page, phone numbers and social profiles, and personal_emails_omitted tells you when named addresses were found and left out.

Get started

Website Contact Finder & Company Enrichment API

Website to lead data: company emails, phones, socials, AI profile, lead score & icebreakers.

  • Lead Generation
  • Sales Prospecting
  • API
  • Python
  • GDPR