If you’re dealing with a pile of B2B leads and not enough data to tell the good from the garbage, you’re not alone. Maybe you have company names or LinkedIn URLs, but you need website domains, employee counts, or even just an actual company description before you hand those leads off to sales. You don’t want to buy another “AI-powered” tool or spend all day copy-pasting into Google. What you really need is a practical way to enrich leads with real company data—without losing your mind.
This guide is for anyone who wants to use the Phantombuster API to automate company data enrichment. I’ll show you exactly how to get from raw leads to enriched records, point out what’s worth your time, and flag the stuff that’s more hype than help.
Why bother with company data enrichment?
Let’s be honest: most B2B lead lists are half junk. Company names are misspelled, websites are missing, and you have no idea if it’s a three-person shop or a 5000-person enterprise. Enriching leads with actual company data lets you:
- Filter out bad fits before you waste time.
- Prioritize leads by industry, size, or location.
- Hand your sales team something other than a headache.
Done right, enrichment means fewer cold emails sent into the void and more real conversations.
What is Phantombuster, really?
Phantombuster is one of those automation tools that scrapes data from the web—mostly social media and business directories—using “Phantoms” (think: little bots for specific jobs). It’s not perfect, and it’s not magic. But it is one of the few tools that lets you automate scraping LinkedIn, Crunchbase, and other places salespeople haunt, without a ton of manual effort.
Phantombuster has a web interface (point and click) and an API (for coders and people who like to automate stuff). This article is about the API—because that’s where you really save time.
Step 1: Figure out exactly what data you need
Before you start, get clear on what “enrichment” means for you. Here’s what most B2B folks want:
- Company website and domain
- Industry
- Company size (employee count)
- Location (city, country)
- LinkedIn or Crunchbase URLs
- Maybe funding data or a short description
Don’t try to get everything. The more data you chase, the more likely you’ll hit API limits or run into sketchy results.
Pro Tip: Start with 2–3 fields you actually use to qualify leads. You can always add more later.
Step 2: Prep your lead list for enrichment
The API can’t work miracles with garbage input. At minimum, you’ll want:
- A company name and either a LinkedIn profile URL or website domain.
- Leads in a spreadsheet, CSV, or database you can export/import.
What doesn’t work:
Just a list of personal emails or people’s names. The API is built for company data, not individual lookups.
Best input formats:
- CSV with columns like Company Name
, LinkedIn URL
, Website
- JSON if you’re feeling fancy
Step 3: Choose the right Phantombuster Phantom(s)
Here’s where most people get tripped up. Phantombuster has a ton of Phantoms—each does something slightly different, and some are a waste of time for this use case. For company enrichment, focus on these:
-
LinkedIn Company Profile Scraper
Grabs company info from LinkedIn pages. Most useful if you already have the LinkedIn URLs. -
LinkedIn Search Export
Will search for company names and return LinkedIn URLs—handy if you just have company names. -
Crunchbase Organization Scraper
Pulls data from Crunchbase, like funding, descriptions, and basic info.
Ignore the Phantoms aimed at personal profiles, Instagram, or Twitter. They won’t help with company enrichment.
Pro Tip:
LinkedIn is pickier about scraping than Crunchbase. If you’re running a lot of requests, start slow to avoid getting blocked.
Step 4: Get your Phantombuster API key
You’ll need an account (no way around it). Once you’re logged in:
- Go to your dashboard.
- Click your profile/avatar.
- Find “API key” or “API settings.”
- Copy the key somewhere safe. You’ll use it for all API requests.
Don’t share this key. It gives full access to your account.
Step 5: Set up your first Phantom and get the API endpoint
Let’s say you’re starting with the LinkedIn Company Profile Scraper. Here’s what you do:
- Set up the Phantom in the web UI first.
- Add your LinkedIn session cookie (Phantombuster guides you through this).
- Upload a sample input file (just a few records to test).
-
Check the output—is the data what you need?
-
Find the Phantom’s API endpoint.
- On the Phantom dashboard, look for the “API” button or “Code” tab.
- You’ll see a pre-filled
curl
snippet and the endpoint URL. - This is what you’ll use in scripts or tools like Postman.
Why not skip the web UI?
The web setup helps you get the Phantom working before you automate. Trust me, it’s faster than debugging the API blindly.
Step 6: Automate enrichment with the API
Once your Phantom is set up and tested, you can automate the real work. Here’s a plain-English rundown:
-
Format your leads as JSON or CSV.
The API docs show the format, but usually it’s a list of LinkedIn URLs or company names. -
POST your data to the Phantom’s API endpoint.
You’ll include: - Your API key (as a header)
- The input file (as a URL or raw content)
-
Any Phantom-specific settings
-
Start the Phantom, then poll for results.
The API is asynchronous—meaning you start a job, then check back later to download the results.
Here’s a barebones example in Python (using requests
):
python import requests
PHANTOM_API_KEY = "your_api_key_here" PHANTOM_ENDPOINT = "https://api.phantombuster.com/api/v2/agent/launch" PHANTOM_ID = "your_phantom_id_here" # Found in the API docs
headers = { "X-Phantombuster-Key-1": PHANTOM_API_KEY, "Content-Type": "application/json" }
payload = { "id": PHANTOM_ID, "argument": { "input": [ {"linkedinUrl": "https://www.linkedin.com/company/example-company"} # Add more records as needed ] } }
response = requests.post(PHANTOM_ENDPOINT, headers=headers, json=payload) print(response.json())
You’ll need to poll for results using the container/launch ID Phantombuster returns. Their docs have copy-paste examples.
What to watch out for: - API limits: Free and paid plans both have limits. If you’re enriching hundreds or thousands of leads, expect to hit them. - Scraping errors: If LinkedIn changes their page layout or blocks your session, you’ll get errors or incomplete data. Check your logs.
Step 7: Download and merge enriched data
Once your Phantom run finishes, download the output (usually a CSV or JSON file). Now you’ll need to:
- Match results back to your original leads.
- Use company name, LinkedIn URL, or a unique ID.
- Merge new fields (like industry, website, size) into your master list.
- Spot-check the merged data.
- Look for obvious mismatches or empty fields.
Pro Tip:
Don’t trust 100% of the data. Take 10 random leads, Google them, and sanity-check the results. Every automation tool makes mistakes.
Step 8: Iterate, clean, and scale
Your first run will surface all kinds of weirdness—duplicate companies, missing data, or records that don’t match. Don’t fuss about perfection:
- Fix obvious input issues (bad names, missing URLs).
- Rerun enrichment for failed records.
- Batch your jobs to avoid API timeouts.
As you get comfortable, automate more of the process (e.g., nightly enrichment scripts, automatic merging). But don’t go crazy with complexity until you’ve nailed the basics.
Real talk: What works, what doesn’t
What works: - Automating LinkedIn/Crunchbase scraping for company data. - Enriching a few hundred to a few thousand leads at a time. - Combining Phantombuster with manual spot checks for quality.
What doesn’t: - Trying to enrich huge lists (10,000+) in one go—API limits and errors will slow you down. - Relying on enrichment for all data—some fields, like revenue or tech stack, are often missing or wildly inaccurate. - Using Phantombuster for personal emails or private info. It’s not built for that.
Ignore the hype:
No tool will give you a perfectly clean, magically enriched B2B list. Expect to clean up after the bots.
Keep it simple, and keep moving
Enriching B2B leads with the Phantombuster API is doable, but it’s not set-and-forget magic. Start with a small batch, get your fields right, and don’t let “perfect” get in the way of “actually useful.” Automate the boring parts, check your work, and make it a habit—not a one-time project.
If you run into issues, don’t waste hours fighting the API. Sometimes a little manual work is faster. Keep it simple, and always test before you scale up.