Piloterr
Guías prácticas

Enrich a Lead with LinkedIn

Automatically enrich a prospect's company record with LinkedIn data — industry, headcount, description, and recent posts — using only a domain name.

Overview

This playbook builds a CRM enrichment pipeline: given a company's website domain, fetch its LinkedIn profile and extract structured data like industry, employee count, headquarters, and specialities.

Prerequisites

  • A Piloterr API key — get one at app.piloterr.com
  • Install dependencies for your language:
pip install requests

Steps

Look up a company by domain

Pass the company's website domain to the domain parameter. You can also use a LinkedIn URL via query.

import requests

API_KEY  = "YOUR_API_KEY"
response = requests.get(
    "https://api.piloterr.com/v2/linkedin/company/info",
    headers={"x-api-key": API_KEY},
    params={"domain": "stripe.com"},
)
company = response.json()
print(company)

Extract key company fields

The response contains company_name, industry, staff_count, staff_range, tagline, description, headquarter, and specialities.

print(f"Company   : {company.get('company_name')}")
print(f"Industry  : {company.get('industry')}")
print(f"Employees : {company.get('staff_count')} ({company.get('staff_range')})")
print(f"Website   : {company.get('website')}")
hq = company.get("headquarter", {})
print(f"HQ        : {hq.get('city')}, {hq.get('country')}")
print(f"Topics    : {', '.join(company.get('specialities', [])[:5])}")

Enrich a batch of leads

Loop over a list of email domains and build enriched company records ready to push to your CRM.

import json, time, requests

API_KEY = "YOUR_API_KEY"
leads = [
    {"email": "alice@stripe.com",  "domain": "stripe.com"},
    {"email": "bob@notion.so",     "domain": "notion.so"},
    {"email": "carol@figma.com",   "domain": "figma.com"},
]
enriched = []

for lead in leads:
    r = requests.get("https://api.piloterr.com/v2/linkedin/company/info",
        headers={"x-api-key": API_KEY}, params={"domain": lead["domain"]})
    if r.status_code == 200:
        c = r.json()
        enriched.append({"email": lead["email"], "domain": lead["domain"],
            "company": c.get("company_name"), "industry": c.get("industry"),
            "employees": c.get("staff_count"), "hq_country": c.get("headquarter", {}).get("country"),
            "linkedin_url": c.get("company_url")})
    time.sleep(0.5)

with open("enriched_leads.json", "w") as f:
    json.dump(enriched, f, indent=2)
print(f"Enriched {len(enriched)} leads → enriched_leads.json")

You can also pass a LinkedIn company URL or username to the query parameter instead of a domain — useful when you already have the LinkedIn URL from a scrape or manual research.

En esta página