---
title: "Search LinkedIn Posts"
method: POST
path: "/search/linkedin/posts"
tags: ["search"]
---

# Search LinkedIn Posts

`POST /search/linkedin/posts`

# Search LinkedIn Posts

Search LinkedIn's content index for posts matching your keywords and filters. Returns structured post data including full text, engagement metrics, author info, and URLs.

## Required parameters
- **keywords** (string, required): The search terms to match against post content. Examples: `"AI automation"`, `"remote work trends"`, `"SaaS growth strategies"`.

## Keyword syntax (Boolean operators)
Keywords support LinkedIn Boolean search syntax:
- **Exact phrase**: `"outreach automation"` — matches only that exact phrase
- **AND**: `AI AND marketing` — both terms required (spaces default to AND)
- **OR**: `"growth hacking" OR "growth marketing"` — either term
- **NOT**: `outreach NOT webinar` — exclude unwanted terms
- **Parentheses**: `(AI OR ML) AND "case study"` — group logic

Operators must be **UPPERCASE**. Precedence: Quotes > Parentheses > NOT > AND > OR.

## Available filters
| Filter | Type | Description |
|--------|------|-------------|
| `sortBy` | `"relevance"` \| `"date"` | Sort by relevance (default) or most recent first |
| `datePosted` | `"past-24h"` \| `"past-week"` \| `"past-month"` | Filter posts by recency window — works; pair with `sortBy:"date"` for newest-first |
| `contentType` | `"images"` \| `"videos"` \| `"documents"` | Filter by media type |
| `authorIndustry` | string[] | Author's industry IDs (resolve via `/search/linkedin/parameters` with type=`INDUSTRY`) |
| `authorCompany` | string[] | Author's company IDs (resolve via `/search/linkedin/parameters` with type=`COMPANY`) |

## Response fields (per item)
| Field | Type | Description |
|-------|------|-------------|
| `postUrl` | string | Direct URL to the LinkedIn post |
| `text` | string | Full post text content |
| `date` | number | Publication timestamp (ms since epoch) |
| `likesCount` | number | Total reactions |
| `commentsCount` | number | Total comments |
| `sharesCount` | number | Total shares/reposts |
| `author.name` | string | Author's display name |
| `author.profileUrl` | string | Author's LinkedIn profile URL |
| `author.headline` | string | Author's headline |
| `author.isCompany` | boolean | Whether the author is a company page |
| `isRepost` | boolean | Whether this is a repost of another post |

## Pagination
- Default page size: 10, max: 50
- Use `start` + `count` to paginate: `start=0, count=10` → page 1, `start=10, count=10` → page 2
- Check `hasMore` in the response to know if more pages exist
- `paging.total` gives the estimated total number of results

## Example workflows
1. **Content research**: Search for trending topics → analyze top posts → extract engagement patterns
2. **Lead generation**: Search for posts about problems your product solves → extract author profiles
3. **Competitive intelligence**: Search for competitor mentions → track sentiment and engagement

## Credits

## Request body

- object
  - `keywords` string, required — Search keywords (required). Searches across post text content. Supports LinkedIn Boolean syntax: use double quotes for exact phrases (e.g. "AI automation"), AND to require both terms, OR for alternatives (e.g. "growth hacking" OR "growth marketing"), NOT to exclude (e.g. outreach NOT webinar), and parentheses to group (e.g. (AI OR ML) AND "case study"). Operators must be UPPERCASE. Without quotes, multi-word queries are treated as AND by default which may return broad results.
  - `url` string — Optional LinkedIn search URL. If provided, keywords and filters are extracted from the URL. Explicit params override URL-derived values.
  - `sortBy` string — Sort order. 'relevance' (default) or 'date' (most recent first). Natural forms ('newest','recent') are normalized server-side.
  - `datePosted` string — Filter posts by recency window: 'past-24h' < 'past-week' < 'past-month' (counts shrink cleanly). Natural forms ('last week','this month','24 hours') are normalized server-side. Pair with sortBy:'date' for newest-first.
  - `contentType` string — Filter by media type: 'images' (photos), 'videos', 'documents' (carousel/PDF). Natural forms ('video','photo','pdf') are normalized server-side.
  - `authorIndustry` string[] — Filter by the post author's industry. Pass human labels (e.g. ['Software Development']) — server resolves to LinkedIn industry IDs via typeahead. Numeric IDs pass through if you already have them.
  - `authorCompany` string[] — Filter by the post author's company. Pass company names (e.g. ['Google','Stripe']) — server resolves to LinkedIn company IDs via typeahead. Numeric IDs pass through if you already have them.
  - `start` integer — Pagination offset (default 0). Use multiples of `count` to page through results. Example: start=0 for page 1, start=10 for page 2 (with count=10).
  - `count` integer — Results per page (default 10, max 50). Controls how many posts are returned per request.

## Response `200`

List of LinkedIn posts matching the search criteria

- object
  - `success` true, required
  - `category` 'posts', required
  - `items` object[], required
    - `postUrl` string, required — Public URL of the post.
    - `text` string, required — Post text content.
    - `date` integer, required — Post creation timestamp (Unix milliseconds).
    - `likesCount` integer, required — Total reactions on this post.
    - `commentsCount` integer, required — Total top-level comments on this post.
    - `sharesCount` integer, required — Total shares/reposts of this post.
    - `postUrn` string, required — LinkedIn internal URN for this post. Use with engagement tools (like, comment, collect_likes/comments).
    - `postId` string, required — Numeric post identifier parsed from the URN.
    - `media` object — Media attached to the post (image, video, document, or article). Absent when the post is text-only.
      - `type` 'image' | 'video' | 'document' | 'article', required — Type of media attached to the post.
      - `urls` string[], required — Media URLs (image URLs for carousels, video streaming URL, article link, etc.).
      - `title` string — Title of the article or document, when available.
      - `thumbnailUrl` string — Thumbnail URL for videos, articles, or document covers.
    - `type` 'POST', required
    - `author` object, required
      - `name` string, required
      - `profileUrl` string, nullable, required
      - `headline` string, nullable, required
      - `profilePicture` string, nullable, required
      - `isCompany` boolean, required
      - `publicIdentifier` string, nullable, required — Vanity slug when not URN-based
      - `profileUrn` string, nullable, required — LinkedIn profile URN when available
    - `isRepost` boolean, required
  - `paging` object, required
    - `start` integer, required
    - `count` integer, required
    - `total` integer, required
  - `hasMore` boolean, required
  - `creditsUsed` integer, required — Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
  - `retryAfter` integer, required — Seconds to wait before making another call of the same type. 0 means no wait needed.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error.
- `401` — Although HTTP specifies "unauthorized", this response means "unauthenticated". Authenticate to continue. NOTE: 401 is also returned with code "linkedin_not_connected" when the caller IS authenticated but has no connected LinkedIn account — connect LinkedIn (not re-authenticate) to continue.
- `403` — The client does not have access rights to the content.
- `404` — The server cannot find the requested resource.
- `409` — The request conflicts with the current state of the server.
- `410` — The requested content has been permanently deleted from the server.
- `422` — The request was well-formed but was unable to be followed due to semantic errors.
- `429` — Rate limit exceeded. Read error.retryAfter for the wait time in seconds.
- `500` — The server encountered a situation it does not know how to handle.
- `502` — LinkedIn returned a server error or the proxy connection failed. Retry after a few seconds.
- `503` — Proxy capacity temporarily exceeded. Retry after a few seconds.

---

[API](https://skmtc.net/berea/apis/bereach-api.md) · [All operations](https://skmtc.net/berea/apis/bereach-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/berea/bereach-api/versions/3caf12036b26/schema)
