# Keyword post search

**`POST https://myagentmail.com/linkedin/search/content`**

Group: LinkedIn — Outreach
Operation ID: `linkedinSearchContent`

Search LinkedIn posts for a keyword and return posts with their
author's name, profile URL, post URL, time-ago, and a short excerpt.
Useful for keyword monitoring + just-in-time outreach.


## Request body

Content-Type: `application/json`

```json
{
  "sessionId": "string",
  "keyword": "string",
  "datePosted": "past-24h",
  "count": 10
}
```

## Responses

### 200 — Posts matching the keyword.

```json
{
  "ok": false,
  "posts": [
    {
      "activityUrn": "string",
      "postUrl": "string",
      "authorName": "string",
      "authorProfileUrl": "string",
      "authorProfileSlug": "string",
      "timeAgo": "23h",
      "excerpt": "string"
    }
  ]
}
```

### 404 — Session not found.

### 429 — Daily quota exceeded for this session.

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// POST /linkedin/search/content
const result = await client.request("post", "/linkedin/search/content", { body: {
  "sessionId": "string",
  "keyword": "string",
  "datePosted": "past-24h",
  "count": 10
} });
```

### curl

```bash
curl -X POST 'https://myagentmail.com/linkedin/search/content' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "sessionId": "string",
  "keyword": "string",
  "datePosted": "past-24h",
  "count": 10
}'
```

### Python

```python
import os, requests

r = requests.post(
    "https://myagentmail.com/linkedin/search/content",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
    json={
        "sessionId": "string",
        "keyword": "string",
        "datePosted": "past-24h",
        "count": 10
    },
)
r.raise_for_status()
print(r.json())
```
