# search_posts: Search posts

Search posts by words, date and who wrote or is mentioned in them, by name. This action only reads; it changes nothing. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/search_posts
Authorization: Bearer YOUR_KEY
content-type: application/json

{
  "keywords": "outbound sales"
}
```

## What you give it

- `keywords` (optional): text, up to 300 characters. Words to search for in posts, e.g. "cold email deliverability". LinkedIn search operators work ("exact phrase", AND, OR, NOT).
- `sortBy` (optional): one of: relevance, date. "relevance" (LinkedIn's default) or "date" (newest first).
- `datePosted` (optional): one of: past_day, past_week, past_month. Only posts from the past day, week or month.
- `contentType` (optional): one of: videos, images, live_videos, collaborative_articles, documents, jobs. Only posts with this kind of content.
- `authorKeywords` (optional): text, up to 100 characters. Words in the AUTHOR's headline / title, e.g. "founder" or "head of sales".
- `authorIndustries` (optional): a list (text), up to 10. Industry names the author works in, e.g. ["Software Development"].
- `authorCompanies` (optional): a list (text), up to 10. Company names — posts written by PEOPLE who work at these companies.
- `fromCompanies` (optional): a list (text), up to 10. Company names — posts published by these COMPANY PAGES themselves.
- `mentioningCompanies` (optional): a list (text), up to 10. Company names — posts that @mention these companies (e.g. a competitor).
- `postedBy` (optional): one of: me, first_connections, people_you_follow. Only posts by you ("me"), by your 1st-degree connections, or by people you follow. Runs on your own LinkedIn sender, so one must be connected.
- `limit` (optional): a number, 1 to 50. Max posts to return (1–50, default 10).
- `cursor` (optional): a cursor. nextCursor from the previous call, to get the next page. Keep every other argument the same. Where to get it: The `nextCursor` from the last answer of `search_posts`.
- `connectionId` (optional): a connection id. Which of your LinkedIn senders to search through (its id from list_linkedin_accounts). Omit to use your first live sender, or the shared account when you have none. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

- `returned`
- `hasMore`
- `nextCursor`: a cursor
- `applied`
- `posts`
- `note`

## Good to know

- Company and industry filters are NAMES here; the action looks the ids up itself and takes the top match. search_linkedin_posts takes the ids.
- When author.isCompany is true, author.profileUrl is a company link, which actions asking for a profile link do not take.
- nextCursor names the account that ran the search: it is refused by any other action, and by this one once that account is gone.

Page: https://heyreagent.com/docs/actions/search_posts