This project provides two different implementations for lead verification:
REFilterLeads/
├── free_api/ # Free API Implementation
│ ├── free_lead_verification.py
│ ├── test_numverify.py
│ ├── test_free_verification.py
│ ├── sample_leads.csv
│ └── sample.env
│
└── forewarn/ # Forewarn API Implementation
├── lead_verification.py
├── lead_utils.py
├── mock_forewarn_api.py
├── test_lead_verification.py
└── Project Guide for Forewarn API Integration.markdown
Located in the free_api directory, this implementation uses free APIs for lead verification:
- Numverify for phone verification
- NeverBounce for email verification
- Searchbug for background checks
- Copy
sample.envto.envand add your API keys - Install dependencies:
pip install -r requirements.txt - Run tests:
python test_numverify.pyfor API testingpython test_free_verification.pyfor unit tests
Located in the forewarn directory, this implementation uses the Forewarn API for comprehensive lead verification.
- Follow the instructions in the Project Guide
- Install dependencies:
pip install -r requirements.txt - Run tests:
python test_lead_verification.py
Both implementations require:
- Python 3.6+
- requests
- python-dotenv
- pytest (for testing)
Install all requirements:
pip install -r requirements.txtA system for verifying real estate leads using free APIs (Numverify, NeverBounce, and Searchbug) to validate contact information and perform basic background checks.
-
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile in the project root with the following content:# API Keys for Lead Verification NUMVERIFY_API_KEY=your_numverify_api_key_here NEVERBOUNCE_API_KEY=your_neverbounce_api_key_here SEARCHBUG_API_KEY=your_searchbug_api_key_here # Optional: Set to true to use mock API for testing USE_MOCK_API=false # Optional: Set the output directory for JSON files OUTPUT_DIR=results # Optional: Set the log level (DEBUG, INFO, WARNING, ERROR) LOG_LEVEL=INFO -
Get your API keys:
- Numverify: https://numverify.com/
- NeverBounce: https://www.neverbounce.com/
- Searchbug: https://www.searchbug.com/
Run the lead verification script with sample leads:
from free_lead_verification import process_new_leads, save_leads_to_json
# Your leads as (name, phone, email) tuples
leads = [
("John Doe", "1234567890", "john.doe@example.com"),
("Jane Smith", "9876543210", "jane.smith@example.com")
]
# Process leads
verified, flagged = process_new_leads(leads)
# Save results
save_leads_to_json(verified, flagged)Run the test suite:
python -m pytest test_free_verification.py -v
- Phone number validation using Numverify
- Email verification using NeverBounce
- Basic background checks using Searchbug
- Risk assessment for each lead
- JSON export of verified and flagged leads
- Comprehensive test coverage
The system exports verified and flagged leads to separate JSON files with this structure:
[
{
"name": "John Doe",
"phone": "123-456-7890",
"email": "john.doe@example.com",
"verification_details": {
"phone_verification": { ... },
"email_verification": { ... },
"background_check": { ... },
"verification_status": {
"overall_status": "verified",
"risk_factors": []
}
}
}
]- Ensure compliance with data privacy regulations (e.g., GDPR, CCPA) when handling personal data
- Monitor API usage to manage costs, especially for APIs with per-call pricing
- Consider implementing rate limiting for API calls
- Keep your API keys secure and never commit them to version control
A web-based lead verification system with a TypeScript frontend and Python backend.
- Install Python dependencies:
pip install -r requirements.txt- Install Node.js dependencies:
npm install- Build the TypeScript frontend:
npm run build- Run the Flask application:
python app.pyThe application will be available at http://localhost:5000.
- Frontend TypeScript files are in the
srcdirectory - Compiled JavaScript files are output to
distdirectory - Static files (HTML, JS) are served from the
staticdirectory - Python backend code is in the root directory
To watch for TypeScript changes during development:
npm run watch.
├── src/ # TypeScript source files
│ ├── main.ts # Main application logic
│ ├── types.ts # TypeScript type definitions
│ └── index.html # Main HTML template
├── static/ # Static files served by Flask
│ ├── js/ # Compiled JavaScript
│ └── index.html # Copied from src/
├── dist/ # TypeScript compilation output
├── app.py # Flask application
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies
└── tsconfig.json # TypeScript configuration