# Facebook 群组帖子 API (facebook.group_posts)

- Canonical page: https://everyinfra.com/facebook-api/group_posts
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "facebook", "action": "group_posts", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 200 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=facebook&action=group_posts

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 按接口传目标：profile/user_posts 传公开主页，post/comments 传帖子，group_posts 传群组主页或群组标识，reviews 传商家主页（会补 /reviews）。不是任意 Facebook 链接均可用于所有接口。 |
| sort | not declared | no | not declared | group_posts 用 top 表示热门帖子、recent 表示最近有活动的帖子；不传时按时间顺序。recent 不只看发帖时间；其他取值按时间顺序处理，不报错。 |
| limit | integer (1–200) | no | 20 | 这次调用最多返回的条数，整数，1–200；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| author_id | 评论作者的数字用户 ID（稳定标识，可用于跨请求去重）。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 评论作者的主页链接。 |
| group_url | 小组链接。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "facebook",
  "action": "group_posts",
  "params": {
    "url": "https://www.facebook.com/groups/874728723021553"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "facebook",
        "action": "group_posts",
        "params": {
            "url": "https://www.facebook.com/groups/874728723021553",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "facebook",
  "action": "group_posts",
  "results": [
    {
      "id": "UzpfSTEwMDA2NDM5NjI4NTkyMTpWSzoyNjIwNDE3NTU4NDUyNjUy",
      "url": "https://www.facebook.com/groups/874728723021553/permalink/2620417558452652/",
      "text": "Let's welcome our new members!\nAkira Zy Marcelo,\nAnatu Anaaf Anaaf,\nพิมพ์ชนก ทองจำปา,\nSimple Gel,\nCharlotte Badilla,\nSidra Kanwal,\nAlthea Zhana Lambot,\nLeslie Vinluan,\nAbdulraffy Jang Woo,\nValdez July,\nJomary Agacer,\nRon Jacob Buenaobra,\nDeane Milne,\nIyasuu Baatii Bati,\nLagnason …",
      "posted_at": "2026-09-26T08:32:01+00:00",
      "like_count": 0,
      "comment_count": 0,
      "share_count": 0,
      "author_id": "•••",
      "author_name": "•••",
      "group_url": "https://www.facebook.com/groups/874728723021553",
      "platform": "facebook"
    },
    {
      "id": "UzpfSTEwMDA2NDM5NjI4NTkyMTpWSzoyNjE5OTU5NjMxODMxNzc4",
      "url": "https://www.facebook.com/groups/874728723021553/permalink/2619959631831778/",
      "text": "Let's welcome our new members!\nSylvain Zeh,\nMesayAbebe Mesay,\nNeii Esther Rere Brechtefeld,\nMälãk Chöùràbï,\nYusuf Nyundo,\nGabriela Santos,\nOnyx Orchid,\nMar Biya,\nRouane Kako,\nEyosiyas Silesh Eyos,\nMoez Benboubaker,\nKabeer S Ahmad,\nDadou Dadou Grigrios,\nPrasetha S-k,\nGatwech Tharj…",
      "posted_at": "2026-09-25T20:31:59+00:00",
      "like_count": 2,
      "comment_count": 1,
      "share_count": 0,
      "author_id": "•••",
      "author_name": "•••",
      "group_url": "https://www.facebook.com/groups/874728723021553",
      "platform": "facebook"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=facebook
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
