An open source lead generation tool is software with public source code that finds, captures or manages B2B leads, which you run on your own servers. Builders pick it to avoid per-record fees and vendor lock-in.
The catch: no open source project ships a contact database. Scrapy extracts structured data from the sites you point it at (Scrapy docs, September 2026). theHarvester is built for security reconnaissance, and its README says to run it only against targets you own or have permission to test (theHarvester README, September 2026). A CRM stores leads. It does not find them.
This page ranks six tools for API and agent builders, and it is honest about one thing. LeadOcean is not open source. It is first because it is the only entry here that returns people and company records, so we place it as the data layer under the open source parts. For the sizing step, see lead sources.
TL;DR
| Tool | Best for | Starting price | Cost at 1M records a month |
|---|---|---|---|
| LeadOcean | Contact data through an API or an agent | Free (1,000 records, one-off). Solo $97 a month | $497 a month on Agency. Fair use applies |
| Firecrawl | Turning sites into clean data for agents | Self-host free (AGPL-3.0). Hosted free plan has 1,000 credits a month | Software $0 self-hosted. Hosted: Scale is $749 a month for 1M credits ($599 billed yearly). Credits are pages, not leads |
| Scrapy | Custom crawlers you fully control | $0 (BSD-3-Clause) | $0 for the software. You pay servers, proxies and engineering time |
| theHarvester | Finding emails, names and hostnames for a domain you are authorized to test | $0 (GPL-2.0) | $0 for the software. Provider quotas cap volume |
| Twenty | A self-hosted CRM with an API for the leads you already have | Self-host free (AGPLv3). Pro $9 per seat a month, billed yearly | $0 for the software. Storage is your server |
| Mautic | Forms, landing pages and email campaigns | $0 (GPL-3.0) | $0 for the software. You pay hosting and email sending |
"1M records" means 1M people or pages you collect or store in a month. Open source tools have no per-record price. The real cost is servers, proxies, sending and the engineer who keeps them running. We give no dollar figure for that, because it depends on your team.
What we evaluated
- What it produces: contact records, raw pages, or storage and workflow for records you already hold.
- License: the exact license, and whether any part of the code is under a commercial license.
- API and MCP: how code or an agent calls it, and whether an MCP server exists in the docs.
- Cost at 1M: list price of the software and what it takes to run it, without inventing a figure.
- Limits that bite: rate limits, provider quotas, scope warnings and legal exposure.
We ran every tool through one imagined task: work emails for VPs of Sales at B2B SaaS companies in Canada. We read each vendor's docs and licenses in September 2026. We ran no find-rate or accuracy test, so this page quotes no quality numbers.
1. LeadOcean: best for contact data through an API or an agent
LeadOcean is closed source, so it does not meet the label in the title. We rank it first for the one thing the open source tools cannot do: it answers the task above. It holds 693M people, 366M with an email and 166M with a phone number, plus 67M companies. You filter with 50 people filters and 34 company filters.
On 2026-09-30, a free count for jobLevel VP, jobFunction Sales & Business Development and country CA returned 5,066 mailable people. Mailable means verified, catch_all_valid or catch_all. The count cost nothing. A search then returns those people, and POST /v1/people/enrich takes a linkedin_url, an email, a phone or a person_id.
curl -X POST "https://api.leadocean.io/v1/people/enrich" \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "content-type: application/json" \
-d '{"linkedin_url":"https://www.linkedin.com/in/jane-doe","reveal_email":true}'The hosted MCP server at https://api.leadocean.io/mcp has 13 tools and signs in with OAuth 2.1, so there is no key to paste into the client. Company lists are sized for free with GET /v1/companies/count and the leadocean_count_companies tool. The app at app.leadocean.io has an Exports page. It has no sequencer, dialer or CRM, so pair it with Twenty or Mautic below.
Pros
- Returns people and company records, which no other tool here does.
- Free counts and filters let you size a list before you spend a record.
- 13 MCP tools and a documented REST API.
- Paid plans have a fair-use pace, not credits and not an overage invoice.
- A free plan with 1,000 records for life and no card.
Cons
- Not open source. You cannot read or host the code.
- One search pages to 10,000 rows, so wide lists need narrower filters.
- Bulk CSV export is not on the Free plan.
- No rep workspace, so the sending side is yours to build.
Best for: builders who need people and company data through code or an agent, and want the open source tools below for storage and sending.
Pricing: Free $0 for 1,000 records, Solo $97 a month, Agency $497 a month, Platform $1,997 a month. Agency allows 200 requests a second and 5 keys (LeadOcean pricing, October 2026).
2. Firecrawl: best for turning sites into agent-ready data
Firecrawl crawls and scrapes sites and returns clean markdown or structured data. Its GitHub repository is under AGPL-3.0 and shows about 194k stars (Firecrawl on GitHub, September 2026). It is the most agent-friendly of the open source crawlers.
For the Canada task, it fetches a team page or a directory you name and extracts the people on it. It does not search for those people. You supply the URLs, then clean and verify what comes back.
It also ships an MCP server with keyless, OAuth and API-key access (Firecrawl MCP docs, September 2026). That makes it the easiest crawler to hand to an agent. The hosted plans meter credits, and the pricing page says 1,000 credits cover 500 searches or 1,000 pages scraped (Firecrawl pricing, September 2026).
Pros
- Source is public and self-hostable.
- Hosted MCP server with OAuth sign-in.
- Returns markdown and structured fields an LLM can read.
- A free hosted plan to try it.
Cons
- AGPL-3.0 means network use of a modified version obliges you to share your changes.
- It returns pages, not verified emails or phones.
- Scraping personal data raises site-terms and privacy-law questions you must answer yourself.
- Hosted credits are pages, so a lead costs several credits.
Best for: agent builders who need web pages turned into structured text for enrichment or research.
Pricing: the Free plan has 1,000 credits a month and 2 concurrent requests. Hobby is $19 a month ($16 billed yearly) for 5,000 credits, and Standard is $99 ($83) for 100,000. The 1,000,000-credit Scale plan is $749 a month ($599 billed yearly). Prices are in USD (Firecrawl pricing, October 2026).
3. Scrapy: best for custom crawlers you fully control
Scrapy is a Python framework for crawling sites and extracting structured data. It is BSD-3-Clause licensed and shows about 65k GitHub stars (Scrapy on GitHub, September 2026). It has been the default open source crawler for years.
Scrapy gives you the engine and nothing else. You write the spiders, choose the sites, run the proxies and handle blocks. For the Canada task, you would write a spider for each directory or conference page, then add your own email finder and verifier.
The docs list item pipelines, feed exports and an AutoThrottle extension to slow requests down (Scrapy docs, September 2026). That is real control. It is also real maintenance, because every site change breaks a spider.
Pros
- Permissive BSD-3-Clause license with no copyleft.
- Full control over pacing, pipelines and output formats.
- Large community and mature docs.
- No vendor in the way.
Cons
- It is a framework, not a lead source. You supply sites, logic and verification.
- Spiders break whenever a target site changes.
- No email finder, no phone data, no MCP server in the docs we read.
Best for: engineering teams that already run Python crawlers and want to own every step.
Pricing: $0 for the software. Proxies, servers and engineering time are your costs (Scrapy on GitHub, September 2026).
4. theHarvester: best for domain-level email and name discovery
theHarvester gathers emails, names, hostnames and URLs for a domain from search engines, certificate logs, DNS datasets and code repositories. It is GPL-2.0 licensed with about 18k GitHub stars (theHarvester on GitHub, September 2026). It runs as a CLI, a local browser UI and a local REST API.
The README frames it as an early-stage reconnaissance tool for authorized security assessments. That scope matters. Using it to build a sales list stretches what the project says it is for, so check your own legal position first.
For the Canada task, it can surface email patterns and names for one company domain at a time. It does not filter by job title, and it does not verify deliverability. Its emails selector pulls addresses that public sources happen to hold.
Pros
- Free, scriptable, with a local REST API.
- Passive sources that need no API key to start.
- Good for finding the email format used at one domain.
Cons
- Built for security recon, not prospecting.
- No title or seniority filters, and no verification.
- Provider quotas cap how much you can pull.
- Needs Python 3.14 and uv for the current version.
Best for: security-minded builders mapping a single domain they are allowed to test.
Pricing: $0 for the software (theHarvester on GitHub, September 2026).
5. Twenty: best for a self-hosted CRM with an API
Twenty is an open source CRM that positions itself as an alternative to Salesforce. It shows about 59k GitHub stars (Twenty on GitHub, September 2026). It stores and works leads. It does not find them.
The license is mostly AGPLv3. Files marked @license Enterprise are under a commercial license, and some packages are MIT (Twenty LICENSE, September 2026). The license also lets you build apps on its REST and GraphQL APIs and webhooks without the AGPL applying to your app.
Self-hosting runs through Docker Compose (Twenty self-host docs, September 2026). For the Canada task, Twenty is where the 5,066 people would land after you pull them from a data source.
Pros
- Modern CRM with REST, GraphQL and webhooks.
- Self-hostable, with unlimited records on the paid plans.
- Application exception keeps your own apps out of the AGPL.
- CSV import and export on every plan.
Cons
- Some code is under a commercial license.
- Contains no contact data. You bring the leads.
- You run and patch it yourself when self-hosted.
Best for: teams that want to own the CRM that sits behind their data pulls.
Pricing: self-hosting is free. Hosted Pro is $9 per seat a month billed yearly, Organization is $19, and Enterprise starts at $50k a year (Twenty pricing, September 2026).
6. Mautic: best for forms, landing pages and email campaigns
Mautic is open source marketing automation under the GPL v3 with about 10.8k GitHub stars (Mautic on GitHub, September 2026). It captures inbound leads through forms and landing pages, then runs email campaigns. It has a REST API (Mautic features, September 2026).
Mautic is inbound. It turns visitors into contacts. For outbound, it takes a list you already hold and sends to it. That makes it a good partner to a data API, and a poor choice if you start with no list.
Note that email sending is not free. You still pay for the SMTP service and the domains, and you carry the deliverability work.
Pros
- Form and landing page builders cover lead capture.
- GPL v3 with a large user base.
- REST API for custom integrations.
- Self-hostable.
Cons
- It does not source leads. It handles the ones you capture or import.
- PHP stack that you host and update.
- No MCP server in the docs we read.
Best for: teams that capture inbound leads and run nurture campaigns on their own servers.
Pricing: $0 for the software. A managed Mautic option exists, with its price on the vendor page (Mautic, September 2026).
Comparison table
| Tool | Best for | Starting price | Cost at 1M records a month | API | MCP | Rate limit |
|---|---|---|---|---|---|---|
| LeadOcean | Contact data via API or agent | Free, then Solo $97 a month | $497 a month on Agency. Fair use | REST | Hosted, 13 tools | 5, 50, 200 or 10,000 requests a second by plan |
| Firecrawl | Sites to agent-ready data | Free self-hosted, or 1,000 free credits a month | Scale: $749 a month for 1M credits ($599 billed yearly) | REST | Yes | 2 concurrent requests on Free, 25 on Standard, 100 on Scale |
| Scrapy | Custom crawlers | $0 | $0 plus infrastructure | Python library | None in docs read | You set it, with AutoThrottle |
| theHarvester | Domain emails and names | $0 | $0 plus provider quotas | Local REST | None in docs read | Provider quotas |
| Twenty | Self-hosted CRM | Free self-hosted, Pro $9 per seat billed yearly | $0 plus your server | REST and GraphQL | None in docs read | Set by your server |
| Mautic | Capture and campaigns | $0 | $0 plus hosting and sending | REST | None in docs read | Set by your server |
How to choose
- You need contact data and want one API: LeadOcean. Start with the free counts, then run a search.
- You want pages turned into text for an agent: Firecrawl. Add a verifier before you send anything.
- You have Python engineers and a defined target list of sites: Scrapy.
- You are mapping one domain you have permission to test: theHarvester.
- You want to own the CRM behind your data pulls: Twenty.
- You run inbound forms and nurture emails: Mautic.
- You want a free way to test the whole idea: LeadOcean Free gives 1,000 records for life, no card.
Verdict
Open source gives you control over the plumbing, not the data. For contact records through an API or an agent, LeadOcean wins, and you can still run Twenty or Mautic under it. For web extraction, Firecrawl wins for agent work and Scrapy wins for engineering teams that want total control. theHarvester fits security recon, not sales lists. Pick Twenty for a self-hosted CRM and Mautic for inbound capture. Size the list with a free count before you build anything.
FAQ
Is there an open source B2B contact database?
Not one we found that ships verified people and company records. The tools here crawl, store or send. Contact data comes from a provider such as LeadOcean, which is not open source.
Is LeadOcean open source?
No. LeadOcean is a hosted API and MCP server. We place it first because it supplies the data the open source tools lack, and we say so at the top of this page.
Can theHarvester find sales leads?
It finds emails, names and hostnames for a domain. Its README frames it for authorized security assessments, and it has no title filters or email verification. It is a weak fit for prospecting.
Is scraping leads legal?
It depends on the site's terms and on privacy law where the people live. Read both before you collect personal data. This page is not legal advice.
What does 1M leads cost with open source?
The software costs $0. Servers, proxies, email sending and engineering time are real costs, and we give no figure because it varies by team. A data API has a list price you can read.
Which open source tool works best with an AI agent?
Firecrawl, because it ships an MCP server and returns text an LLM can read. For people and company records, an agent can call the LeadOcean MCP server instead.
Related: predictive lead generation, outbound lead generation, lead generation funnel, pricing.
Get the data layer under your open source stack
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →