# Facebook Comments API

The Facebook Comments API returns the comments under a public Facebook post: text, likes, reply count and time, in the same response format as every other SocialToAI call. One call costs 2 credits ($0.004 to $0.0067 depending on the pack); failed calls are free. Call it over HTTP or from your AI client over MCP. Last tested 2026-10-17.

- Page: https://socialtoai.com/facebook-comments-api/
- Last updated: 2026-10-17
- Last tested: 2026-10-17

| Request | Price key | Credits |
| --- | --- | --- |
| `POST /v1/comments` | `facebook.comments` | 2 |

## Request

```bash
curl https://api.socialtoai.com/v1/comments \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "facebook",
    "id": "1650176549811048"
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/comments",
    headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"},
    json={
        "platform": "facebook",
        "id": "1650176549811048",
    },
)
print(response.json())
```

## Parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `platform` | string | Required | — | Always "facebook" on this page. |
| `id` | string | Required | — | Post ID, a string of digits: the id returned by the page's post list and by the post itself |
| `cursor` | string | Optional | — | Pass page.cursor from the last response to get the next page. |

## Where the values come from

- `id`: Post ID, a string of digits: the id returned by the page's post list and by the post itself (e.g. `1650176549811048`)
  No other interface of the platform returns it.

## Response fields

| Field | Type | Meaning | Given |
| --- | --- | --- | --- |
| `items[].url` | string | A link to the comment, where the platform has one. | always null: Facebook does not give it |
| `items[].text` | string | The comment itself. | yes |
| `items[].published_at` | string | When it was posted, ISO 8601 in UTC. | yes |
| `items[].author.label` | string | An anonymous label, stable within one response. Whoever wrote it is never named. | yes |
| `items[].metrics.likes` | integer | Likes. | yes |
| `items[].reply_count` | integer | How many replies it has. | yes |
| `items[].content_id` | string | The item the comment is under. | yes |
| `items[].parent_id` | string | The comment it replies to directly; null for a top-level comment. | always null: Facebook does not give it |
| `items[].root_id` | string | The top-level comment its thread hangs under. | always null: Facebook does not give it |

Every item also has platform, id, ref, approx and type; the response around the items is the same on every call. [Response format](https://socialtoai.com/docs/api/response.md)

## Sample response

Sample data: names, links and text are replaced by placeholders; the numbers are as recorded.

```json
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-10-12T19:17:10.000Z",
  "action": "comments",
  "platform": "facebook",
  "status": "ok",
  "items": [
    {
      "platform": "facebook",
      "id": "…",
      "ref": "…",
      "approx": [],
      "type": "comment",
      "url": null,
      "text": "…",
      "published_at": "2026-10-08T14:48:35.000Z",
      "author": {
        "label": "anonymous_1"
      },
      "metrics": {
        "likes": 10
      },
      "reply_count": 2,
      "content_id": "…",
      "parent_id": null,
      "root_id": null
    }
  ],
  "unavailable": ["url", "parent_id", "root_id"],
  "page": {
    "has_more": true,
    "cursor": "cur_…",
    "cursor_expires_at": "2026-10-12T19:47:10.000Z"
  },
  "warnings": [],
  "applied_params": {
    "id": "1650176549811048"
  },
  "cost_credits": 2,
  "billing": {
    "cost_credits": 2,
    "balance_credits": 98,
    "today_spend_credits": 2,
    "daily_limit_credits": null,
    "daily_remaining_credits": null,
    "display": "This call: 2 credits. Balance: 98 credits."
  },
  "replayed": false
}
```

## Paging and failures

- One call returns a page of up to 10 items. When page.has_more is true, send page.cursor back as cursor for the next page; each page costs 2 credits and a cursor works for 30 minutes.
- A call that runs and finds nothing is a successful call: status is "empty", items is empty, and it costs 2 credits.
- 1 call per second per key, 5 after a purchase; going over is not charged. [Rate limits](https://socialtoai.com/docs/credits-and-billing.md#rate-limits)
- A failed call costs 0 credits and is never retried on its own. [Error codes](https://socialtoai.com/docs/api/errors.md)

## Ask your AI

- Read the comments under this Facebook post: 1650176549811048 → `comments {"platform":"facebook","id":"1650176549811048"}`, 2 credits

## Tools that use it

- [Comment analysis](https://socialtoai.com/tools/comment-insights.md): The topics in their comments and how big each is, plus questions, buying intent and complaints
- [Account watch](https://socialtoai.com/tools/account-watch.md): What each one posted lately, and which posts beat its usual numbers
- [Creator profile](https://socialtoai.com/tools/creator-card.md): Their accounts on other platforms, the numbers on each, and how sure the match is

## The same call on other platforms

| Platform | Price key | Credits | Page |
| --- | --- | --- | --- |
| TikTok | `tiktok.comments` | 2 | https://socialtoai.com/tiktok-comments-api.md |
| Instagram | `instagram.comments` | 2 | https://socialtoai.com/instagram-comments-api.md |
| X | `x.comments` | 2 | https://socialtoai.com/x-comments-api.md |
| Reddit | `reddit.comments` | 2 | https://socialtoai.com/reddit-comments-api.md |
| YouTube | `youtube.comments` | 2 | https://socialtoai.com/youtube-comments-api.md |
| Xiaohongshu | `xiaohongshu.comments` | 12 | https://socialtoai.com/xiaohongshu-comments-api.md |
| Douyin | `douyin.comments` | 2 | https://socialtoai.com/douyin-comments-api.md |
| Weibo | `weibo.comments` | 2 | https://socialtoai.com/weibo-comments-api.md |
| WeChat Articles | `wechat.comments` | 12 | https://socialtoai.com/wechat-comments-api.md |
| Bilibili | `bilibili.comments` | 2 | https://socialtoai.com/bilibili-comments-api.md |
| Zhihu | `zhihu.comments` | 2 | https://socialtoai.com/zhihu-comments-api.md |
| Kuaishou | `kuaishou.comments` | 2 | https://socialtoai.com/kuaishou-comments-api.md |
| WeChat Channels | `wechat_channels.comments` | 12 | https://socialtoai.com/wechat-channels-comments-api.md |

## More on Facebook

| Interface | What it does | Price key | Credits | Page |
| --- | --- | --- | --- | --- |
| `detail` | One post by link: text, author, likes, comment count, views and publish time. | `facebook.detail` | 2 | https://socialtoai.com/facebook-detail-api.md |
| `user_profile` | One account: name, bio and followers. | `facebook.user_profile` | 2 | https://socialtoai.com/facebook-user-profile-api.md |
| `user_posts` | The recent posts of one account. | `facebook.user_posts` | 2 | https://socialtoai.com/facebook-user-posts-api.md |

## FAQ

**Do I need a Facebook account or Facebook's own API access?**

No. You only need a SocialToAI key. The call returns content and account information publicly visible on Facebook; you never sign in to Facebook or apply for anything there.
