Skip to content

DeepMyst/Linkedin-Contact-Extractor-API

Repository files navigation

LinkedIn Contact Extractor API

A comprehensive solution for extracting, managing, and automating LinkedIn connections from various sources.

Overview

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.

Features

Contact Extraction

  • 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

LinkedIn Automation

  • Send personalized connection requests
  • Batch process multiple connections
  • Monitor connection request status
  • Generate AI-powered connection messages

Contact Insights

  • Extract and analyze LinkedIn profile information
  • Generate personalized conversation starters
  • Identify common interests and backgrounds
  • Suggest networking opportunities

AI Assistant

  • Chat interface for contact management
  • Natural language querying of contacts
  • AI-powered contact recommendations
  • Voice message transcription

Integrations

  • LinkedIn integration
  • Email service connectivity
  • Calendar integration
  • Cross-platform synchronization

Tech Stack

Backend

  • 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

Frontend

  • React - UI framework
  • Material-UI - Component library
  • Fetch API - Network requests

Installation

Prerequisites

  • Python 3.9+
  • Node.js 14+
  • OpenAI API key
  • LinkedIn account credentials

Backend Setup

  1. Clone the repository:

    git clone https://github.com/DeepMyst/linkedin-contact-extractor-api.git
    cd linkedin-contact-extractor-api
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Install Playwright browsers:

    playwright install
  5. Create a .env file with your configuration:

    OPENAI_API_KEY=your_openai_api_key
    LINKEDIN_EMAIL=your_linkedin_email
    LINKEDIN_PASSWORD=your_linkedin_password
    LINKEDIN_HEADLESS=true
    
  6. Start the server:

    uvicorn app:app --reload --port 5000

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Configure the API endpoint in src/config/env.config.js:

    export const API_CONFIG = {
      baseUrl: 'http://localhost:5000',
    };
  4. Start the development server:

    npm start

Usage

Extracting Contacts

  1. Go to the "Import" section
  2. Upload files containing contact information (business cards, attendee lists, etc.)
  3. Select the source type (conference, business cards, etc.)
  4. The system will extract contacts automatically
  5. Review and edit extracted contacts as needed

Managing Connections

  1. Select contacts you wish to connect with
  2. Use the AI assistant to generate personalized connection messages
  3. Review and send connection requests
  4. Monitor connection status

Using the AI Chat Assistant

  1. Open the chat dialog
  2. 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?"
  3. Request insights about specific contacts
  4. Get recommendations for networking strategies

API Endpoints

The system exposes the following key endpoints:

  • POST /api/contacts/extract - Extract contacts from files
  • GET /api/contacts - Get all contacts
  • POST /api/linkedin/connections - Send multiple connection requests
  • POST /api/linkedin/connection/{contact_id} - Send a single connection request
  • POST /api/linkedin/insight/{contact_id} - Generate insights for a contact
  • POST /api/chat/process - Process chat messages with AI
  • POST /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.

Troubleshooting

LinkedIn Automation Issues

  • 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

Contact Extraction Problems

  • 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

API Connection Issues

  • 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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages