B2B Lead Engine
An AI pipeline that finds small local businesses with no website, qualifies them, enriches their contact details and serves the results in a dashboard.
- Year
- 2026
- Role
- Solo, AI and full-stack
- Type
- AI & ML
- Stack
- Python, LangGraph, LangChain, SQLAlchemy, SerpAPI, Next.js
b2b-lead-engine/stack.json{"name": "B2B Lead Engine","built_with": ["Python","LangGraph","LangChain","SQLAlchemy","SerpAPI","Next.js"]}
The idea
Plenty of small service businesses, like food trucks, cleaners and handymen, live entirely on Facebook or Instagram. They're exactly the people who might pay for a website, and they're hard to find by hand.
The pipeline
Built as a LangGraph graph, where each step is a node with typed state:
- Discover businesses from search queries by trade and city (SerpAPI).
- Qualify them: classify their URLs and check whether a real website exists.
- Enrich contact details from Hunter, WHOIS and an LLM, behind one interface so sources can be swapped.
- Extract structured details with prompts that return validated models.
- Store everything in SQLite through SQLAlchemy and export to CSV or JSON.
Searches are configured in YAML, so targeting a new trade or city doesn't need code changes.
The dashboard
A Next.js dashboard reads the same database to list leads, show stats and open a detail page for each business, with pricing and checkout pages for selling access.
Engineering
- Pluggable providers for OpenAI, Google GenAI and Groq through LangChain.
- Tests with pytest, linting with ruff and type checks with mypy in CI.
Next project
Sobuj BD →