# LinkedIn Posts API

Get LinkedIn posts — from any profile, company, post, or feed URL, or by searching with author / mention / content-type filters. Returns the same clean post record either way.

**Pricing:** $2 / 1k posts

**Endpoint:** `POST /v1/data/linkedin/posts/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | string | No | LinkedIn URL to scrape posts from — profile, company, post, or feed links. |
| `queries` | string | No | Keyword to search LinkedIn posts for. |
| `maxResults` | integer | No | Posts to return. Use 0 for all. |
| `postedLimit` | string | No | Only posts within this time window. |
| `includeQuotePosts` | boolean | No | Quote posts (shared with commentary). |
| `includeReposts` | boolean | No | Reposts (shared without commentary). |
| `sortBy` | string | No | Sort order for results. |
| `authors` | array | No | Filter posts to specific authors. Accepts profile URLs or company names ('Google'). |
| `mentioning` | array | No | Filter posts that mention specific people or companies. Accepts profile URLs or names. |
| `contentType` | string | No | Filter to a specific media type. |

## Example

```bash
curl -X POST https://api.mindcase.co/v1/data/linkedin/posts/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/v1/data/linkedin/posts/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `postUrl` | Post URL | url |
| `postText` | Post Text | text |
| `authorName` | Author Name | text |
| `authorUrl` | Author URL | url |
| `authorAvatar` | Author Avatar | image |
| `authorType` | Author Type | text |
| `authorHeadline` | Author Headline | text |
| `authorFollowers` | Author Followers | number |
| `reactions` | Reactions | number |
| `comments` | Comments | number |
| `shares` | Shares | number |
| `postedDate` | Posted Date | text |
| `repostNote` | Repost Note | text |
| `articleUrl` | Article URL | url |
| `postMediaUrl` | Post Media URL | url |
| `postMediaType` | Post Media Type | text |
| `mentions` | Mentions | object_array |
