A comprehensive solution for extracting, managing, and automating LinkedIn connections from various sources.
LinkedIn Contact Extractor API is a powerful tool designed to streamline professional networking by automating contact extraction, LinkedIn connections, and relationship management. The application uses AI to extract contact information from business cards, event attendee lists, PDFs, images, and more, then helps you manage and connect with these contacts on LinkedIn with personalized messages.
- Extract contacts from multiple file formats:
- Images (JPG, PNG, JPEG)
- PDFs
- Excel files (XLSX, XLS)
- Word documents (DOCX)
- CSV files
- Text files
- OCR-powered business card scanning
- Automatic email and LinkedIn profile detection
- Send personalized connection requests
- Batch process multiple connections
- Monitor connection request status
- Generate AI-powered connection messages
- Extract and analyze LinkedIn profile information
- Generate personalized conversation starters
- Identify common interests and backgrounds
- Suggest networking opportunities
- Chat interface for contact management
- Natural language querying of contacts
- AI-powered contact recommendations
- Voice message transcription
- LinkedIn integration
- Email service connectivity
- Calendar integration
- Cross-platform synchronization
- Python 3.9+
- FastAPI - High-performance web framework
- OpenAI API - Powers intelligent contact extraction and insights
- Playwright - Browser automation for LinkedIn
- PDF2Image/Pillow - Document processing
- Pandas - Data handling
- React - UI framework
- Material-UI - Component library
- Fetch API - Network requests
- Python 3.9+
- Node.js 14+
- OpenAI API key
- LinkedIn account credentials
-
Clone the repository:
git clone https://github.com/DeepMyst/linkedin-contact-extractor-api.git cd linkedin-contact-extractor-api -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Install Playwright browsers:
playwright install
-
Create a
.envfile with your configuration:OPENAI_API_KEY=your_openai_api_key LINKEDIN_EMAIL=your_linkedin_email LINKEDIN_PASSWORD=your_linkedin_password LINKEDIN_HEADLESS=true -
Start the server:
uvicorn app:app --reload --port 5000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Configure the API endpoint in
src/config/env.config.js:export const API_CONFIG = { baseUrl: 'http://localhost:5000', };
-
Start the development server:
npm start
- Go to the "Import" section
- Upload files containing contact information (business cards, attendee lists, etc.)
- Select the source type (conference, business cards, etc.)
- The system will extract contacts automatically
- Review and edit extracted contacts as needed
- Select contacts you wish to connect with
- Use the AI assistant to generate personalized connection messages
- Review and send connection requests
- Monitor connection status
- Open the chat dialog
- Ask questions about your contacts:
- "How many contacts do I have from Microsoft?"
- "Show me my unconnected contacts from the AI Summit"
- "Who should I connect with next?"
- Request insights about specific contacts
- Get recommendations for networking strategies
The system exposes the following key endpoints:
POST /api/contacts/extract- Extract contacts from filesGET /api/contacts- Get all contactsPOST /api/linkedin/connections- Send multiple connection requestsPOST /api/linkedin/connection/{contact_id}- Send a single connection requestPOST /api/linkedin/insight/{contact_id}- Generate insights for a contactPOST /api/chat/process- Process chat messages with AIPOST /api/voice/transcribe- Transcribe voice messages
See the complete API documentation in the /docs directory or visit the interactive API docs at http://localhost:5000/docs when the server is running.
- Ensure your LinkedIn credentials are correct
- Consider using a dedicated LinkedIn account for automation
- Limit connection requests to stay within LinkedIn's rate limits
- If you encounter "browser automation detected" issues, try setting
LINKEDIN_HEADLESS=false
- For best OCR results, ensure images are clear and well-lit
- Use high-resolution scans of business cards
- For Excel or CSV files, ensure contact fields are clearly labeled
- Check that both backend and frontend servers are running
- Verify API URLs in
env.config.js - Check CORS settings if running on different ports/domains
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the AI capabilities
- Playwright team for the browser automation library
- FastAPI for the efficient backend framework
- All contributors who have helped build this project