LeadGen Pro is a powerful, AI-driven lead generation system with Firecrawl-style web scraping capabilities. Built for businesses and agencies that need to discover, enrich, score, and manage leads at scale.
-
Firecrawl-Style Web Scraping
- Single page scraping with AI extraction
- Full site crawling with link discovery
- Site mapping and structure analysis
- Search-based lead discovery
-
AI-Powered Lead Intelligence
- Automatic lead data extraction using GPT-4
- Multi-dimensional lead scoring (Fit, Intent, Engagement)
- ICP (Ideal Customer Profile) matching
- Personalized talking points generation
-
Lead Enrichment
- Email and phone extraction
- Technology stack detection
- Company size estimation
- Social profile discovery
-
Campaign Management
- Email campaign templates
- SMS outreach templates
- Variable personalization
- Campaign analytics
-
Modern Web Interface
- Real-time dashboard with analytics
- Lead management with bulk operations
- WebSocket-powered live updates
- Dark/Light mode support
- Responsive design
- Single Mode - Scrape individual URLs with custom extraction schemas
- Crawl Mode - Crawl entire websites, following links within the domain
- Map Mode - Create comprehensive sitemaps showing site structure
- Search Mode - Search the web and scrape results
- Discovery Mode - Find leads by industry and location
- Python 3.9+
- OpenAI API key
- (Optional) Airtable API key
- Clone the repository:
git clone https://github.com/your-repo/lead-gen-system.git
cd lead-gen-system- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create your environment file:
cp env_template.txt .env- Add your API keys to
.env:
OPENAI_API_KEY=sk-your-key-here
AIRTABLE_API_KEY=your-key-here # Optional
AIRTABLE_BASE_ID=your-base-id # Optional
python run.pyOr directly with uvicorn:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Access the application:
- Dashboard: http://localhost:8000
- API Docs: http://localhost:8000/api/docs
- ReDoc: http://localhost:8000/api/redoc
curl -X POST "http://localhost:8000/api/v1/scrape" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"mode": "single",
"extraction_schema": {
"company_name": "string",
"contact_email": "string"
}
}'curl -X POST "http://localhost:8000/api/v1/scrape" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"mode": "crawl",
"max_pages": 50
}'curl -X POST "http://localhost:8000/api/v1/discover" \
-H "Content-Type: application/json" \
-d '{
"industry": "SaaS",
"location": "San Francisco",
"num_leads": 20
}'curl -X POST "http://localhost:8000/api/v1/leads/1/score"curl -X POST "http://localhost:8000/api/v1/leads/1/enrich"curl -X POST "http://localhost:8000/api/v1/leads/export" \
-H "Content-Type: application/json" \
-d '{
"format": "csv"
}'lead-gen-system/
├── app/
│ ├── api/
│ │ └── routes.py # API endpoints
│ ├── core/
│ │ └── config.py # Configuration
│ ├── models/
│ │ └── database.py # SQLAlchemy models
│ ├── services/
│ │ ├── scraper.py # Firecrawl-style scraper
│ │ └── lead_scoring.py # AI scoring engine
│ ├── static/ # Static assets
│ ├── templates/ # Jinja2 templates
│ └── main.py # FastAPI application
├── data/ # Sample documents
├── src/ # Legacy pipeline (v1)
├── requirements.txt # Python dependencies
├── run.py # Startup script
└── README.md
LeadGen Pro uses a multi-dimensional scoring system:
| Dimension | Weight | Description |
|---|---|---|
| Fit Score | 35% | How well the lead matches your ICP |
| Intent Score | 30% | Buying intent signals detected |
| Engagement Score | 20% | Website and social engagement |
| Data Quality | 15% | Completeness of lead data |
- A+ (90-100): Hot lead - Contact immediately
- A (80-89): High priority - Prioritize outreach
- B (70-79): Warm lead - Add to nurture sequence
- C (60-69): Moderate - Research further
- D (50-59): Cool lead - Monitor
- F (<50): Low priority - Deprioritize
- Backend: FastAPI, SQLAlchemy, Pydantic
- Frontend: Tailwind CSS, Alpine.js, Chart.js
- AI/ML: OpenAI GPT-4, Custom scoring algorithms
- Scraping: httpx, BeautifulSoup, lxml
- Database: SQLite (upgradable to PostgreSQL)
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key for GPT-4 | Yes |
AIRTABLE_API_KEY |
Airtable API key | No |
AIRTABLE_BASE_ID |
Airtable base ID | No |
DATABASE_URL |
Database connection string | No |
SECRET_KEY |
Application secret key | No |
LLM_MODEL |
GPT model to use | No |
Configure your ICP in the Settings page or via the API:
{
"company_sizes": ["11-50", "51-200", "201-500"],
"industries": ["technology", "software", "saas"],
"technologies": ["react", "python", "aws"],
"locations": ["united states", "canada"]
}- Airtable: Sync leads to Airtable
- HubSpot: (Coming soon)
- Salesforce: (Coming soon)
- Zapier: (Coming soon)
- CSV
- JSON
- Excel (.xlsx)
- Rate Limiting: Respect website rate limits (1 request/second default)
- Robots.txt: Check robots.txt before aggressive crawling
- Data Quality: Always verify enriched data
- GDPR: Ensure compliance with data protection laws
- DNC Lists: Check Do-Not-Call lists before outreach
The original document processing pipeline is still available in the src/ directory:
# Process documents
python src/main.py
# Run campaign triggers
python src/campaign_trigger.pyContributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT License - see LICENSE file for details.
- Documentation: See
/api/docsfor API documentation - Issues: Report bugs on GitHub Issues
- Feature Requests: Submit via GitHub Issues
Built with care for lead generation professionals