This project is a production-level API for finding and verifying email addresses similar to Hunter.io. The application is built using Flask and can be run locally.
app.py: Main application file containing the API endpoints.models.py: Database models using SQLAlchemy.init_db.py: Script to initialize the database.requirements.txt: List of Python dependencies.Procfile: Configuration for Heroku deployment (not needed for local setup).README_local.md: Instructions for local setup and usage.
- Python 3 installed on your machine
- Pip (Python package installer) installed
- Open a terminal and navigate to the directory where you extracted the project.
- Create a virtual environment:
python3 -m venv env
- Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS and Linux:
source env/bin/activate
- On Windows:
- Install the required libraries:
pip install -r requirements.txt
- Initialize the SQLite database:
python init_db.py
-
Start the Flask application:
python app.py
-
The application should now be running at
http://localhost:5000.
-
Endpoint to Find Emails:
- URL:
/find_emails - Method:
POST - Payload:
multipart/form-datawith a CSV file containing domains - Example:
curl -X POST -F "file=@domains.csv" http://localhost:5000/find_emails
- URL:
-
CSV File Format:
- The CSV file should have a single column with each row containing a domain name.
- Example:
example.com anotherdomain.com
- Ensure your CSV file is properly formatted and only contains domain names.
- The API will scrape and verify emails for each domain in the CSV file.