Facebook group API: public group info and group posts as JSON

Read public Facebook groups with two REST calls. The group info endpoint returns what the About page shows: description, privacy and visibility, member and activity counts, categories, administrators and moderators when Facebook exposes them, group history and rules. The group posts endpoint returns posts with id, text, url, reactionCount, commentCount, publishTime, videoDetails and topComments. Provide either url or group_id to both calls.

Buy credits

Use cases

Endpoints and cost

EndpointWhat it returnsCredits/callUSD/call (Freelance plan)
/v1/facebook/groupFacebook Group Info1$0.0017
/v1/facebook/group_postsFacebook Group Posts1$0.0017

Endpoint details

/v1/facebook/group

Facebook Group Info 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
urlstringnoThe Facebook group URL. Group sub-page URLs such as /about work too.
group_idstringnoThe numeric Facebook group ID. Provide this instead of url if you already have it.

Sample response (trimmed):

{
 "id": "366190054572553",
 "url": "https://www.facebook.com/groups/366190054572553",
 "name": "Python Programming",
 "description": "Let's share our knowledge on Python Programming",
 "privacy": {
  "label": "Public",
  "description": "Anyone can see who's in the group and what they post."
 },
 "visibility": {
  "label": "Visible",
  "description": "Anyone can find this group."
 },
 "categories": [
  {
   "id": "242504017103922",
   "name": "Software & tech"
  }
 ],
 "created_at": "2020-10-14T15:45:03.000Z",
 "history_summary": "Group created on October 14, 2020. Name last changed on October 16, 2020.",
 "member_count": 710386,
 "member_count_text": "710,386 total members",
 "administrator_count": 3,
 "moderator_count": 0,
 "administrators": [
  {
   "id": "pfbid029b9bjf9rZfL4v9EHdxt1uxng857G4UqwpZjbCHySg88UYWu2XL5ivSixWhXBnZMnl",
   "name": "Nusrat Jahan",
   "url": "https://www.facebook.com/people/Nusrat-Jahan/pfbid029b9bjf9rZfL4v9EHdxt1uxng857G4UqwpZjbCHySg88UYWu2XL5ivSixWhXBnZMnl/",
   "profile_picture_url": "https://scontent.xx.fbcdn.net/example.jpg"
  }
 ],
 "moderators": [],
 "activity": {
  "posts_last_day": 16,
  "posts_last_month": 512,
  "new_members_text": "No new members in the last week"
 },
 "rules": [
  {
   "id": "366191957905696",
   "title": "Be Kind and Courteous",
   "description": "We're all in this together to create a welcoming environment. Let's treat

/v1/facebook/group_posts

Facebook Group Posts 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
urlstringnoThe URL of the group
group_idstringnoThe ID of the group
sort_bystringnoHow to sort the posts. Defaults to CHRONOLOGICAL.
next_cursorstringnoThe cursor to paginate to the next page

Example: curl

curl -H "X-Scapi-Key: $SCAPI_KEY" "https://api.scrapall.bipsport.com/scapi/v1/facebook/group"

Example: Python

import os, requests
r = requests.get("https://api.scrapall.bipsport.com/scapi/v1/facebook/group",
    headers={"X-Scapi-Key": os.environ["SCAPI_KEY"]})
print(r.json())

FAQ

How do I get information about a Facebook group?

Call the group info endpoint with url or group_id. It returns the public About page data: description, privacy and visibility, member and activity counts, categories, administrators and moderators when Facebook exposes them, group history and rules.

How do I get posts from a Facebook group?

Call the group posts endpoint with url or group_id. Each post includes id, text, url, reactionCount, commentCount, publishTime, videoDetails and topComments. Pages are limited to 3 posts each, so pass next_cursor from the previous response to keep reading.

Can I sort group posts?

Yes. Results are chronological by default. Set sort_by to TOP_POSTS, RECENT_ACTIVITY, CHRONOLOGICAL or CHRONOLOGICAL_LISTINGS, and keep using the returned cursor for pagination within the same sort order.

How do I detect sponsored posts in a group?

Each post has is_paid_partnership. It is true when Facebook supplies a paid-partnership label or an explicit paid branded-content relationship, and null when unknown. It never returns false, so a missing label does not prove a post is not sponsored.

Does it work for private groups?

No. The endpoints read public Facebook groups only, and only the information Facebook shows publicly. Administrator and moderator lists, for example, are returned only when Facebook exposes them on the group page.

How do I pay and get my API key?

Open the Buy page, pick the Freelance plan and pay in USDT on TRC20 or ERC20. The key is shown once, right after the payment is confirmed on-chain.

How many credits does one call use?

The cost table on this page lists credits per call for each endpoint. The Freelance plan is $45 for 27,000 credits per 30 days.

Get an API key and credits

Full reference: all facebook endpoints.