GET /v1/facebook/group_posts
Facebook group posts API: a public group and its posts by URL
Returns one public Facebook group and the posts its logged-out discussion page shows, usually only the newest one, as FacebookGroupPosts. Send the group URL as group. Facebook gives a logged-out reader no further page.
- Price
- $0.0005 per call
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl
curl 'https://api.virev.ai/v1/facebook/group_posts?group=https%3A%2F%2Fwww.facebook.com%2Fgroups%2FNASA.SCIENCE' \
-H "Authorization: Bearer $VIREV_API_KEY"python
import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/facebook/group_posts",
params={
"group": "https://www.facebook.com/groups/NASA.SCIENCE",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
group required | query | string | A public group’s numeric id or https://www.facebook.com/groups/<group> URL. |
cached | query | auto | cache_only | live | auto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Facebook (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. |
get_raw | query | boolean | Not available on this operation: the upstream document is an HTML page, and true answers 400. The default false returns the normalized type. |
Example response
The example response of the API reference.
json
{
"data": {
"group": {
"id": "349554945138653",
"slug": "NASA.SCIENCE",
"url": "https://www.facebook.com/groups/NASA.SCIENCE/",
"name": "NASA - National Aeronautics and Space Administration",
"description": null,
"privacy": "Public group",
"members": null,
"avatar_url": null,
"extra": {
"activity": null
}
},
"posts": [
{
"id": "26479473648386759",
"shortcode": null,
"taken_at": "2026-04-08T15:36:34Z",
"kind": "image",
"product_type": "post",
"caption": "How do you say moon in your Language?",
"hashtags": [],
"mentions": [],
"accessibility_caption": null,
"likes": 14548,
"comments": 1711,
"views": null,
"counts_hidden": null,
"comments_disabled": null,
"is_pinned": null,
"is_paid_partnership": null,
"owner": {
"id": "61559408325583",
"username": null,
"full_name": null,
"is_verified": null,
"is_private": null,
"avatar_url": null,
"latest_story_at": null,
"extra": {}
},
"coauthors": [],
"sponsors": [],
"tagged": [],
"location": null,
"audio": null,
"thumbnail_url": null,
"video_duration": null,
"media": [],
"media_urls": [],
"extra": {
"group_id": "349554945138653",
"feedback_id": "ZmVlZGJhY2s6MjY0Nzk0NzM2NDgzODY3NTk=",
"canonical_url": null,
"title": null,
"shares": null,
"plays_raw": null
}
},
{
"id": "28959366860397413",
"shortcode": null,
"taken_at": "2026-10-26T18:57:57Z",
"kind": "image",
"product_type": "post",
"caption": "Voyager 1 just sent back coordinates to an unknown object 🛰️🌌",
"hashtags": [],
"mentions": [],
"accessibility_caption": null,
"likes": 148,
"comments": null,
"views": null,
"counts_hidden": null,
"comments_disabled": null,
"is_pinned": null,
"is_paid_partnership": null,
"owner": {
"id": "61591150441205",
"username": null,
"full_name": null,
"is_verified": null,
"is_private": null,
"avatar_url": null,
"latest_story_at": null,
"extra": {}
},
"coauthors": [],
"sponsors": [],
"tagged": [],
"location": null,
"audio": null,
"thumbnail_url": null,
"video_duration": null,
"media": [],
"media_urls": [],
"extra": {
"group_id": "349554945138653",
"feedback_id": "ZmVlZGJhY2s6Mjg5NTkzNjY4NjAzOTc0MTM=",
"canonical_url": "https://www.facebook.com/groups/NASA.SCIENCE/posts/28959366860397413/",
"title": null,
"shares": null,
"plays_raw": null
}
}
]
},
"meta": {
"source": "live",
"fetched_at": "2026-10-27T20:35:41.929673+00:00",
"cost": "$0.0005",
"balance": "$9.9995",
"request_id": "req_9dcefb7faa047be938edf38d50a6863b"
}
}How it works
A public group and the posts its logged-out discussion page shows, usually only the newest one. Facebook gives a logged-out reader no further page. Returns FacebookGroupPosts under data; the upstream document is an HTML page, so get_raw is not available.
A field Facebook does not carry is null, a list it does not carry is [], and Facebook-only facts sit under extra. Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the Facebook account or item does not exist (not_found). You are not charged. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |