A Python library that uses Playwright to scrape LinkedIn profiles, companies, jobs, and posts into typed Pydantic models.
Overview
LinkedIn Scraper is an async Python library built on Playwright for pulling structured data from LinkedIn. It replaces an older Selenium-based design with async APIs and explicit scraper classes for different page types.
Person scraping covers names, headlines, locations, about text, experience, education, skills, and accomplishments. Company scraping captures overview fields, industry, size, and headquarters. Job and company-post scrapers extract listing details, engagement counts, and post content.
Scraped records are returned as Pydantic models for validation and downstream use. Progress callbacks can report status during long runs. LinkedIn sign-in is required; sessions can be created through a manual login script or programmatic login and reused to limit repeated authentication.
Use is intended for education; users must comply with LinkedIn’s terms. Conservative patterns help: rate limiting, error handling, session reuse, and restrained request volume.
Key features
- Playwright browser automation
- Async scraper APIs
- Pydantic result models
- Profile company job scrapers
- Company post extraction
- Session file authentication
- Progress callbacks
- Configurable browser options
Use cases
- Collecting public profile fields
- Extracting company overview data
- Harvesting job listing details
- Research pipelines needing LinkedIn text