# LinkedIn

Canonical: https://monsterapi.co/docs/linkedin

Read public LinkedIn data at `https://api.monsterapi.co/linkedin/api` with a MonsterAPI bearer key.

The API returns public LinkedIn information available without LinkedIn sign-in. LinkedIn sign-in isn’t required or offered.
Request linked resources and continuation separately.
The [API reference](https://monsterapi.co/docs/api) lists the parameters and response schemas for all 18 GET operations.

## Authentication and credits

Send the billing account’s API key in the `Authorization` header as `Bearer YOUR_API_KEY`.
Replace `YOUR_API_KEY` in the examples with that key. See [Authentication](https://monsterapi.co/docs/authentication) for key handling and authorization errors.

Check the current operation price in the [API reference](https://monsterapi.co/docs/api).
Under `http-status-v1`, endpoint responses with `2xx` or `4xx` are charged; `5xx` responses are refunded.
Requests the gateway refuses aren’t charged. See [Pricing](https://monsterapi.co/docs/pricing) for billing rules.

Documentation pages are free to read.

## First request

Search for jobs by keyword and location:

```bash
curl -sS --get 'https://api.monsterapi.co/linkedin/api/jobs/search' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'keywords=software engineer' \
  --data-urlencode 'location=United States'
```

The response includes `jobs` and result-count fields when available.
Keep each summary’s `id` and `url` when present: they open different requests for job details.

## Choose an operation

- **Jobs:** [`GET /jobs/search`](https://monsterapi.co/docs/api/linkedin-jobs) returns job summaries, counts and filter choices. `GET /jobs` returns job summaries and continuation. `GET /jobs/{id}` and `GET /jobs/view?url=…` return job details by ID or complete URL.
- **Job filters:** [`GET /typeahead/{kind}?q=…`](https://monsterapi.co/docs/api/linkedin-typeahead) returns suggestions for `geo`, `company` or `keyword`. Use `hits[].id` from `geo` as `geo_id`, or from `company` as `company_id`, in job search. `geo_id` takes precedence over `location`.
- **Members:** [`GET /in?id=…`](https://monsterapi.co/docs/api/linkedin-profiles) returns profile details, experience, education, skills and visible activity. `GET /people/search?firstName=…&lastName=…` returns people matching both required names, without continuation.
- **Organizations:** [`GET /company?name=…`](https://monsterapi.co/docs/api/linkedin-organizations), `GET /school?name=…` and `GET /showcase?name=…` return organization details and posts. `GET /organization/{id}/posts?cursor=…` continues a feed.
- **Directories:** [`GET /directory/{kind}`](https://monsterapi.co/docs/api/linkedin-organizations) returns entries and navigation branches for `companies` or `people`. Follow branch keys with separate requests.
- **Content:** [`GET /posts`](https://monsterapi.co/docs/api/linkedin-content) returns a post, its shared post and visible comments. `GET /pulse?slug=…` returns an article and visible comments. Comment previews aren’t complete comment listings.
- **Products:** [`GET /products/typeahead?keyword=…`](https://monsterapi.co/docs/api/linkedin-typeahead) returns product and category suggestions. `GET /products/search` returns product summaries, and `GET /products?slug=…` returns product details. Reviews aren’t available from `GET /products`.
- **Service providers:** [`GET /services/providers?services=…`](https://monsterapi.co/docs/api/linkedin-content) returns providers matching known service-category identifiers and optional `geos`. Use `providers[].username` as `id` in `GET /in` for profile details. A provider can include one review preview.

## Choose job filters

`job_type` and `experience` are temporarily unavailable in the current guest service.
A request with an accepted value for either returns `500` `upstream_shape`; that response is refunded.
Omit these parameters to search with the other filters.

`under_10_applicants=true` requests LinkedIn’s “Under 10 applicants” filter.
`early_applicant=true` is an alias for the same filter. If either parameter is `true`, the filter is enabled.
With both parameters absent or `false`, the filter is disabled.

A result can still say “Be among the first 25 applicants”.
That phrase gives a bound; it doesn’t prove fewer than ten applicants.

## Send page keys in query parameters

For clients moving from path keys, five operations now take their page key in the query:

- `/in?id=…` takes the profile key from a profile URL or `people[].username` in [`GET /people/search`](https://monsterapi.co/docs/api/linkedin-profiles).
- `/company?name=…` takes the company key from a company URL or `jobs[].company.username` in [`GET /jobs`](https://monsterapi.co/docs/api/linkedin-jobs).
- `/school?name=…` takes the school’s universal name.
- `/showcase?name=…` takes the showcase page’s universal name.
- `/pulse?slug=…` takes the article’s slug from its URL, including `articles[].url` in [`GET /in`](https://monsterapi.co/docs/api/linkedin-profiles).

Use the client’s query builder or curl’s `--data-urlencode` to encode each value.
Percent-encoded and decoded LinkedIn keys identify the same page; preserve their spelling and case.

`/posts?slug=…` takes the post’s slug; `/posts?activity_id=…` takes its numeric activity identifier instead. Send exactly one.
Post slugs accept Unicode characters and ASCII apostrophes. Encode the query value; percent-encoded and decoded forms identify the same post.

`/products?slug=…` takes `products[].username` from [`GET /products/search`](https://monsterapi.co/docs/api/linkedin-content) or [`GET /products/typeahead`](https://monsterapi.co/docs/api/linkedin-typeahead).
For school details, use `GET /school`.

## Choose a job page

Use `GET /jobs/{id}` with `jobs[].id` from [`GET /jobs`](https://monsterapi.co/docs/api/linkedin-jobs) or `GET /jobs/search` for the description, criteria and applicant information.
A closed posting can still return `200`, with `closed_text` stating that it no longer takes applications.

Use `GET /jobs/view` with `jobs[].url` from the same job searches for job details by complete URL.
These can include publication and expiry dates, salary, address and related jobs. The two endpoints have different response schemas.

Replace `<JOB_URL>` below with the complete `url` from a search card:

```bash
curl -sS --get 'https://api.monsterapi.co/linkedin/api/jobs/view' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'url=<JOB_URL>'
```

Keep the card’s regional host unchanged. The accepted HTTPS hosts are `www`, `de`, `uk`, `ca`, `es`, `fr`, `is`, `ee`, `aq`, `ph` and `ch` under `linkedin.com`.
The address must use `/jobs/view/{slug}-{id}`. Tracking query parameters are accepted; credentials, a port or a URL fragment aren’t.
Other hosts return `400` `bad_request`. There’s no regional-host selector for the other operations.
An expired job requested by URL returns `404` `not_found`.

## Continue searches

Copy `next_cursor` unchanged into `cursor`, keeping the same filters. Stop when it’s absent or `null`.

- **Jobs:** pass `next_cursor` from [`GET /jobs/search`](https://monsterapi.co/docs/api/linkedin-jobs) or `GET /jobs` as `cursor` to `GET /jobs` with the same filters. `GET /jobs` returns up to ten summaries per page. An empty result can receive `500` `upstream_shape`, even when matches exist; that error doesn’t confirm the end of a search. `GET /jobs/search` returns `404` for confirmed no matches.
- **Products:** pass `next_cursor` from [`GET /products/search`](https://monsterapi.co/docs/api/linkedin-content) as `cursor` to that endpoint with the same `keyword`, `currentCategoryUrn` and `productCategoryUrns`. Take category URNs from `categories[].entity_urn` in [`GET /products/typeahead`](https://monsterapi.co/docs/api/linkedin-typeahead). Its product keys are described above.
- **Service providers:** pass `next_cursor` from [`GET /services/providers`](https://monsterapi.co/docs/api/linkedin-content) as `cursor` to that endpoint with the same `services` and `geos`. Use `hits[].id` from [`GET /typeahead/geo`](https://monsterapi.co/docs/api/linkedin-typeahead) for `geos`. Service-category identifiers must be known already; this API has no service-category lookup.

Product and provider searches can return `200` with an empty list and a further cursor.
Their recognized terminal empty page returns `404` `not_found`; stop on that response.
A `500` `upstream_shape` response doesn’t establish that the listing ended.

## Continue organization posts

Request [`GET /company`](https://monsterapi.co/docs/api/linkedin-organizations), `GET /school` or `GET /showcase` first. Read its top-level `id` and separate `next_cursor`.
When both are available, use `id` in `GET /organization/{id}/posts` and pass `next_cursor` as `cursor`.
Continue with that endpoint’s `next_cursor` and the same `id`.
The page’s universal name and `entity_urn` aren’t the numeric `id` this endpoint takes.

Keep the cursor unchanged and with its organization. A malformed cursor, a cursor for another organization or one older than 55 minutes returns `400` `bad_request`.
Rejection may occur sooner.
Open the organization page again for a new cursor. A cursor rejected by LinkedIn also returns `400`.

Some organization responses have no feed or cursor. Continue only when `next_cursor` is present.
An empty feed result receives `500`; it doesn’t prove the organization has no posts.

## Walk a directory

Start at the root without `key`:

```bash
curl -sS 'https://api.monsterapi.co/linkedin/api/directory/companies' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Read `entries`, `letters` and `leaves` in the response from [`GET /directory/companies`](https://monsterapi.co/docs/api/linkedin-organizations).
Pass `letters[].key` or `leaves[].key` unchanged as `key` to `GET /directory/companies?key=…` to open a branch.
Use `GET /directory/people` the same way, keeping each key with its directory kind.
Every level can contain entries. Request each directory level separately.

## Read response values

Both autocomplete endpoints include additional information in `data` and named suggestions beside it:
`hits` for `GET /typeahead/{kind}`, and `products` and `categories` for `GET /products/typeahead`.
`data` preserves its field names and values.

Every other endpoint returns named fields without `data`.
Where a schema offers `other`, it holds additional information and may repeat values in the named fields.
Use the [API reference](https://monsterapi.co/docs/api) for each operation’s fields rather than treating every response as the same envelope.

Named identifiers are strings and exact counts are numbers. Nullable fields use `null` when a value is unavailable; it isn’t zero.
Keep returned empty strings, lists and objects (`""`, `[]`, `{}`) distinct from `null`.

Empty lists describe this answer only. An empty profile section or comment preview doesn’t prove that no such records exist elsewhere.

Count phrases stay in their text fields. A bound such as `500+` or “Over 200 applicants” doesn’t become an exact count.

## Handle errors

Branch on the error `code`. The body contains `status`, `code` and `message`; [Errors](https://monsterapi.co/docs/errors) describes gateway rejections too.

- `400` `bad_request`: correct values on a matched route, or request organization details for a new feed cursor.
- `404` `not_found`: LinkedIn states absence, or a product or provider listing has reached its recognized final page. An unmatched API path also returns this code.
- `405` `method_not_allowed`: use GET. These operations don’t accept HEAD.
- `500` `upstream_shape`: no usable result is available. Don’t treat it as absence or the end of a listing.
- `501` `requires_auth`: access to the requested information is restricted. This API has no LinkedIn login operation. This error doesn’t establish whether a resource exists.
- `503`: access is temporarily unavailable. For `rate_limited`, wait `Retry-After`, in seconds: LinkedIn’s delay, or 60 when none was supplied. For `upstream_error`, the delay is five seconds. `no_proxies`, `overloaded` and `upstream_stale` carry no `Retry-After`; retry later.

See [Pricing](https://monsterapi.co/docs/pricing) for the platform’s billing rules.

## Public examples

Use the [API reference](https://monsterapi.co/docs/api) for ready-made public inputs and response examples.
Read [Examples](https://monsterapi.co/docs/examples) for provenance, preparation costs, task recipes, and pagination stop rules.
