# Facebook Posts

Extract posts from public Facebook pages — text, author, engagement (reactions, comments, shares, video views), the full reaction-type breakdown, media, links, hashtags, mentions, and collaborators

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

**Endpoint:** `POST /api/v1/agents/facebook/posts/run`

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

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | array | Yes | Public Facebook page URLs (e.g. facebook.com/nike), one per line. |
| `maxResults` | integer | No | How many posts to pull from each page. Use 0 for all available. |
| `onlyPostsNewerThan` | date | No | Only get posts published on or after this date (YYYY-MM-DD). |
| `onlyPostsOlderThan` | date | No | Only get posts published on or before this date (YYYY-MM-DD). |

## Example

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

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/facebook/posts/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "urls": [
        "..."
    ]
}},
)
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/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/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 | text |
| `permalink` | Permalink | text |
| `postId` | Post ID | text |
| `postText` | Post Text | text |
| `postedDate` | Posted Date | text |
| `authorName` | Author Name | text |
| `authorUrl` | Author URL | text |
| `authorPicture` | Author Picture | text |
| `reactions` | Reactions | number |
| `comments` | Comments | number |
| `shares` | Shares | number |
| `views` | Views | number |
| `likeCount` | Like Count | number |
| `loveCount` | Love Count | number |
| `careCount` | Care Count | number |
| `hahaCount` | Haha Count | number |
| `wowCount` | Wow Count | number |
| `sadCount` | Sad Count | number |
| `angryCount` | Angry Count | number |
| `mediaType` | Media Type | text |
| `mediaUrl` | Media URL | text |
| `imageOcr` | Image OCR | text |
| `linkUrl` | Link URL | text |
| `linkTitle` | Link Title | text |
| `linkSource` | Link Source | text |
| `hashtags` | Hashtags | array |
| `mentions` | Mentions | object_array |
| `collaborators` | Collaborators | object_array |
| `sharedPost` | Shared Post | object |
| `feedbackId` | Feedback ID | text |
