A Python API to interact with LinkedIn without using official API access.
Project description
OpenLinkedInAPI
An Open-Source Python Library for LinkedIn Automation
Features
✅ No official API access required – just use a valid LinkedIn account.
✅ Direct HTTP API interface – no Selenium, Puppeteer, or browser-based scraping.
✅ Search and retrieve profiles, companies, jobs, and posts.
✅ Send and receive messages.
✅ Send and accept connection requests.
✅ React to posts and extract data efficiently.
✅ Community-driven and regularly updated.
⚠ Disclaimer: This library is not officially supported by LinkedIn. Using it may violate LinkedIn's Terms of Service. Use it at your own risk.
Installation
Note: Python >= 3.10 required
pip install openlinkedinapi
For the latest version from GitHub:
pip install git+https://github.com/your-repo/openlinkedinapi.git
Quick Start
from openlinkedinapi import Linkedin
# Authenticate with LinkedIn credentials
api = Linkedin('your-email@example.com', 'your-password')
# Get a profile
profile = api.get_profile('john-doe')
# Get profile contact info
contact_info = api.get_profile_contact_info('john-doe')
# Get first-degree connections
connections = api.get_profile_connections('123456789')
Development
Dependencies
- Poetry
- A valid LinkedIn account (avoid using your personal account)
Setup
Clone the repository and install dependencies:
git clone https://github.com/your-repo/openlinkedinapi.git
cd openlinkedinapi
poetry install
poetry self add poetry-plugin-dotenv
Running Tests
poetry run pytest
Troubleshooting
LinkedIn Challenge Prompts
LinkedIn may require additional verification (e.g., CAPTCHA, 2FA). If you encounter login issues, try:
- Logging into LinkedIn manually.
- Using a different IP (VPN or proxy).
- Avoiding excessive requests in a short period.
How It Works
This project interacts with LinkedIn’s internal API, Voyager, which powers LinkedIn’s web interface. By analyzing network requests, we extract structured data directly from LinkedIn pages without requiring an official API key.
Contributing
We welcome contributions! Feel free to submit issues, feature requests, or pull requests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_linkedin_api-2.3.1.tar.gz.
File metadata
- Download URL: open_linkedin_api-2.3.1.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.11.0-19-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d596de868bb677d02fd03c003c5a271a8bbb2554acf56a748fcd0a3a4a193ef6
|
|
| MD5 |
f37f1adcc54ba6f6373195a391f1aab9
|
|
| BLAKE2b-256 |
2e8747473ec27774fd1e03b12892dd022c451bb39f3b1620ca6d130e931533ab
|
File details
Details for the file open_linkedin_api-2.3.1-py3-none-any.whl.
File metadata
- Download URL: open_linkedin_api-2.3.1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.11.0-19-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326459846598f1048985eb54e01c84f2d9ff9053a3ccbae9849b0ab062f41651
|
|
| MD5 |
86e0b66479de426c2738ee8d7e7607ea
|
|
| BLAKE2b-256 |
7ed00a093c25d0474121f7f71d1b1a74f6b1ab52dc59fb639a0336fd1b3a8b25
|