This release is a pre-release and may not be stable for production use.
leankedin-park
A fast, ergonomic, and memory-efficient Python client for the LinkedIn Voyager API, powered by a native Rust core.
Key Features
- ⚡ Ultra-Fast & Lightweight: Built on native Rust HTTP stack. No resource-heavy browser automation (Puppeteer/Playwright/Selenium) eating CPU and RAM.
- 🍪 Automatic Cookie Extraction: Effortlessly extract session cookies directly from local browsers (Firefox, Chrome, Safari, Edge, Brave, Chromium) or supply manual cookie headers.
- 🛡️ Anti-Bot Throttling: Built-in human-like request jitter, atomic timeline reservation, and serialized FIFO request queueing.
- 🐍 First-Class Python Ergonomics: Clean context managers (
with Linkedin...), fluent query builders, and complete type stubs (.pyi) for full autocompletion in VS Code, PyCharm, and type checkers (Pyright, Mypy). - 👥 Comprehensive Voyager API Coverage:
- People Search: Advanced filters (keywords, companies, locations, network depth) or direct import from copied LinkedIn search URLs.
- Profiles: Profile inspection, follower metrics, view counts, connection statuses.
- Connections & Invitations: Manage pending invitations, accept/reject requests, and send connection requests with personalized notes.
- Messaging: Retrieve inbox conversations, send direct messages and group chats.
- Posts: Publish new posts with custom audience visibility (
Anyone,ConnectionsOnly) and react to posts. - Account: Retrieve self profile and 90-day profile view metrics.
Getting Started
- If Firefox is open, exit the browser completely.
- (Re)open Firefox (do not use Private Browsing, as the tool will fail).
- Go to LinkedIn:
- Case 1: Already signed in. If you are already connected to the account you plan to use with
leankedin-park, no further action is required. Just be sure to VERIFY THE ACTIVE PROFILE (switch to your burner account to avoid putting your real account at risk). - Case 2: Not signed in. Sign in using your credentials, ensuring the "Keep me signed in" option is checked. Close Firefox, open it again, and return to LinkedIn. If you are still logged into your account, you are ready to run
leankedin-park.
pip install leankedin-park
Pre-built binary wheels are provided for Linux (x86_64), macOS (Apple Silicon & Intel), and Windows (x86_64) on Python 3.10+. No Rust toolchain is needed to install and run.
These wheels target standard CPython. Linux requires glibc 2.28 or newer; Alpine Linux (musl) and Linux ARM64 are not covered.
Quickstart
import json
from pprint import pformat
from leankedin_park import Browser, ClientConfig, Linkedin
# Initialize configuration with browser cookie extraction and human-like request jitter
config = ClientConfig(Browser.Firefox).with_evasion_delay_in_seconds(2.0, 4.0)
with Linkedin.with_config(config) as linkedin:
# Get current user profile
me = linkedin.get_my_profile()
print(f"Logged in as: {me.first_name} {me.last_name} ({me.vanity_name})")
# Fetch 90-day profile views
views = linkedin.get_current_profile_views_last_90_days()
print(f"Profile views: {views.num_views} ({views.time_frame})")
# Fetch a public profile and display all identity, location, and network fields
profile = linkedin.get_full_infos_of_a_profile("williamhgates")
profile_data = profile.to_dict()
print(f"Full profile:\n{pformat(profile_data, sort_dicts=False)}")
# Save the full profile as indented UTF-8 JSON
with open("williamhgates.json", "w", encoding="utf-8") as file:
json.dump(profile_data, file, indent=4, ensure_ascii=False)
# Search for people
results = linkedin.search_people(
keywords="Rust Developer",
limit=10,
include_private_profiles=True,
)
for person in results:
print(f"- {person.full_name}: {person.primary_subtitle}")
Advanced People Search
You can construct searches using the fluent SearchPeople facade or SearchPeopleBuilder, or parse an existing LinkedIn search URL:
from leankedin_park import Browser, Linkedin, SearchPeople, NetworkDepth, SearchPeopleBuilder
with Linkedin.new(Browser.Firefox) as linkedin:
# 1. Fluent builder
search = (
SearchPeople()
.keywords("Rust")
.companies(["12345", "67890"]) # Example IDs: replace with IDs from your search URL
.network([NetworkDepth.FirstDegree, NetworkDepth.SecondDegree])
.limit(20)
)
results = linkedin.search_people(search)
# 2. Or directly from a copied browser search URL
url = "https://www.linkedin.com/search/results/people/?keywords=Rust&network=%5B%22F%22%5D"
builder = SearchPeopleBuilder.from_url(url)
results = linkedin.search_people(builder)
SearchPeopleBuilder fields are readable and writable: use builder.limit = 10
and builder.offset = 5. Set builder.limit = None to clear the result limit.
These assignments replace the former builder.limit(10) and builder.offset(5)
calls. Fluent chaining remains available on SearchPeople via
SearchPeople().limit(10).offset(5).
Search values are encoded as Rest.li primitive values, including punctuation and
Unicode. A search returns a list only when its limit or the server-reported end
is reached. Invalid responses, malformed profile actions, invalid pagination and
safety-limit interruptions raise SearchError (a LinkedInAPIError subclass),
rather than returning silently partial results. Missing profile actions and
profiles excluded by visibility are allowed.
Company filters (current_company and its companies alias) take LinkedIn internal
company IDs as strings, not company names. Select companies in a LinkedIn people
search and copy the IDs from the URL’s currentCompany parameter. For example,
currentCompany=%5B%2212345%22%2C%2267890%22%5D encodes ["12345", "67890"]
(illustrative IDs). You can also pass the entire search URL to
SearchPeople.from_url(url) or SearchPeopleBuilder.from_url(url).
Examples
Explore full Python examples in the repository:
01_fetch_profiles.py: Profile inspection and follower metrics.02_search_and_network.py: Advanced search builder and URL parsing.03_messaging_and_posting.py: Publishing posts and messaging.04_manage_connections.py: Managing pending invitations and connection requests.
Contributing & Local Development
To build the extension locally for development:
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install build tool
pip install 'maturin>=1.15,<2.0'
# Compile and install in editable development mode
cd python
maturin develop --release
⚠️ Disclaimer
This project is intended for educational, research, and personal automation purposes only. It is not affiliated with, endorsed, or certified by LinkedIn Corporation. Using automated tools may violate LinkedIn's User Agreement and may result in account restrictions. We strongly recommend testing with a secondary/burner account and using sensible evasion delays.
📄 License
Licensed under the PolyForm Perimeter License 1.0.1.
Metadata
Release files for leankedin-park 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| leankedin_park-0.1.0a1.tar.gz | 118.7 kB | With provenance | Details for leankedin_park-0.1.0a1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| leankedin_park-0.1.0a1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for leankedin_park-0.1.0a1-cp310-abi3-win_amd64.whl |
| leankedin_park-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details for leankedin_park-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl |
| leankedin_park-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for leankedin_park-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl |
| leankedin_park-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for leankedin_park-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 20.8 MB
Release files / leankedin_park-0.1.0a1.tar.gz
| Download URL | leankedin_park-0.1.0a1.tar.gz |
|---|---|
| Size | 118.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0760079192dd49fd32d7f7a5f0f51afd88a477eb59ed57ee68066b5f5957b0ec
|
|
BLAKE2b-256 checksum How to use checksums |
0e623ca472e40ac83a9b8f4b521c31c3585227bc7e080a52ce9705f89c827f69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / leankedin_park-0.1.0a1-cp310-abi3-win_amd64.whl
| Download URL | leankedin_park-0.1.0a1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
197813d96a49e880b5769104c20c0ba8514367299d94ab6fba46eb639c994c1b
|
|
BLAKE2b-256 checksum How to use checksums |
6995e5e154a61252790eeb2fab5d273032c344cdda21ce9ebee7fae24a290ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / leankedin_park-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | leankedin_park-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d8e22c48773e6d1e12a2ff2c3e897ec245e9788c8c6fd75b6ad13b5e1fafa462
|
|
BLAKE2b-256 checksum How to use checksums |
65f5326b12c8a18a41af0332477bd950e8f527d4c2bd83281d8409cfc70e18d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / leankedin_park-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | leankedin_park-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3ee6b26153eb86d844f3570ea208a36092c007ae255ad15414fea9978af2d58b
|
|
BLAKE2b-256 checksum How to use checksums |
f0041855a5609462953874ba3e1b71960012271a2d408db63992d4637db6a6be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / leankedin_park-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | leankedin_park-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b642bf12f46ec43a110fc8b319d46c63a610eba5bc96bfc5fb9b80bd0cb8d503
|
|
BLAKE2b-256 checksum How to use checksums |
fe1b043dce97a53488bb51bfc7321b84036160ebc34c0ed3f63544a09c3024e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logSecurity for leankedin-park 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for leankedin_park-0.1.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.