# Facebook Comments

Extract comments and replies from Facebook posts, reels, and photos — text, author, likes, reply count, and thread position — by post URL

**Pricing:** $2.5 / 1k comment

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

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

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `post_url` | array | Yes | Facebook post, reel, or photo permalinks — one per line. Comments are attributed back to each post. |
| `maxResults` | integer | No | How many comments to pull from each post. |
| `includeNestedComments` | boolean | No | On: also pull replies under each comment (returned as their own rows). Off: top-level comments only. |
| `viewOption` | string | No | How Facebook orders the comments it returns. |

## Example

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

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/facebook/comments/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "post_url": [
        "..."
    ]
}},
)
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, SDKs, MCP): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `postUrl` | Post URL | text |
| `commentUrl` | Comment URL | text |
| `commentText` | Comment Text | text |
| `commentDate` | Comment Date | text |
| `likes` | Likes | number |
| `replies` | Replies | number |
| `replyDepth` | Reply Depth | number |
| `isReply` | Is Reply | boolean |
| `commenter` | Commenter | text |
| `commenterUrl` | Commenter URL | text |
| `commenterId` | Commenter ID | text |
| `replyingTo` | Replying To | text |
| `threadRootAuthor` | Thread Root Author | text |
| `commentMediaType` | Comment Media Type | text |
| `commentMediaCaption` | Comment Media Caption | text |
| `commentMediaUrl` | Comment Media URL | text |
| `commenterPicture` | Commenter Picture | text |
| `postCaption` | Post Caption | text |
| `replyingToDetails` | Replying To (details) | object |
