LinkedIn, from the command line
linkedin is a single pure-Go binary that turns public LinkedIn pages into clean, structured records. Fetch profiles and company pages, read a job posting, search the jobs board, and save records to a local store, with no API key and nothing to sign up for.
LinkedIn has no open public API for this, so getting structured data out of it usually means writing a scraper. linkedin does that part for you: it reads a public page and turns it into a record with real fields, JSON-LD first and an HTML fallback when a page does not carry it.
linkedin profile williamhgates # a public member profile as a record
linkedin company microsoft # a company page from its Organization JSON-LD
linkedin jobs "golang engineer" -n 25 # the jobs board via the guest endpoint
linkedin job 3801234567 # one job posting in full
It talks to www.linkedin.com over plain HTTPS with no API key. The binary is
pure Go with no runtime dependencies. Output is a readable list on a terminal and
JSONL when piped, with table, markdown, json, csv, tsv, url, raw, --fields, and
--template when you want something else.
What you can do with it
- Fetch profiles and companies.
linkedin profilereads a public member profile from the page's Person JSON-LD, with--postsand--articlesto also emit the member's recent posts and long-form articles.linkedin companyreads a company page from its Organization JSON-LD and the about panel, with--poststo also collect recent public company posts. - Read and search jobs.
linkedin jobfetches a single posting in full, andlinkedin jobssearches the board through the anonymous guest endpoint, with filters for location, posting age, remote mode, experience, and job type. - Classify input.
linkedin idturns a slug, path, or URL into a (kind, id) pair without fetching, andlinkedin urlbuilds a canonical URL from a kind and an id. - Build a dataset.
--saveupserts records into a local SQLite store across calls, anddb queryreads them back.cachemanages the on-disk page cache. - Script it. Stable exit codes, a
--templatefor any line shape, and the localidcommand make linkedin safe to drop into a pipeline.
Honest about what is walled
LinkedIn serves some surfaces to anonymous visitors and walls the rest behind a
sign-in wall. Profiles, company pages, and job detail all return 200 and work
reliably, and jobs search works through the guest endpoint. Single public posts
and articles generally return data, best effort, through JSON-LD with an Open
Graph backstop. What is still walled: school pages return LinkedIn's bot block
(HTTP 999), the dedicated activity and /posts/ subpages of profiles and
companies redirect to a login (which is why posts come from the JSON-LD graph on
the main page instead), and people and company search require sign-in. When a
page is walled, linkedin exits with code 4 and you can lend a session with
--cookies (a Netscape cookies.txt jar).
Independent and public-data only
linkedin is an independent, open-source tool. It is not affiliated with, endorsed by, or sponsored by LinkedIn or Microsoft. It reads only public pages, at a polite default rate (a two second gap between requests).
Where to go next
- New here? Start with the introduction for the mental model, then the quick start.
- Want to install it? See installation.
- Looking for a specific task? The guides cover profiles and companies, finding jobs, posts and lookups, storing records, and output formats.
- Need every flag? The CLI reference is the full surface.