Docs menu

Facebook public group

Beta GET /v1/facebook/group

GET /v1/facebook/group

What a public group's About page shows: description, privacy, member and activity counts, categories, admins and moderators where shown, history and rules.

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
urlURLone ofPublic group URL (facebook.com/groups/...). Sub-pages such as /about work too. Accepted hosts: facebook.com, fb.com, fb.watch.
idstringone ofNumeric group id; use it instead of url if you have it. Also accepted as group_id.

Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

curl
curl -G "https://api.socialscrape.io/v1/facebook/group" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "url=https://www.facebook.com/groups/366190054572553"
Python
import os
import requests

params = {
    "url": "https://www.facebook.com/groups/366190054572553",
}
res = requests.get(
    "https://api.socialscrape.io/v1/facebook/group",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/facebook/group");
url.search = new URLSearchParams({
  "url": "https://www.facebook.com/groups/366190054572553"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape Facebook public group",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/facebook/group",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.facebook.com/groups/366190054572553"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_d05ae521cb97f1a25d8a6524",
  "data": {
    "object": "community",
    "platform": "facebook",
    "id": "366190054572553",
    "url": "https://www.facebook.com/groups/366190054572553/",
    "kind": "group",
    "name": "Python Programming",
    "title": "Python Programming",
    "description": "Let's share our knowledge on Python Programming",
    "avatar_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t1.6435-9/121615771_3201454343306997_2348901429098757975_n.jpg?stp=dst-jpg_tt6&cstp=mx640x400&ctp=s640x400&_nc_cat=106&ccb=1-7&_nc_sid=0b1479&_nc_ohc=9R2J2mQK5_IQ7kNvwExFf3R&_nc_oc=AdpL45oYudx3vIAv4FGP...",
    "banner_url": null,
    "member_count": 759600,
    "online_count": null,
    "is_nsfw": null,
    "is_private": false,
    "verified": null,
    "created_at": "2020-10-14T11:05:03Z",
    "extra": {
      "activity": {
        "new_members_text": "No new members in the last week",
        "posts_last_day": 28,
        "posts_last_month": 1542
      },
      "administrator_count": 3,
      "administrators": [
        {
          "id": "pfbid029gmqPLAMDT2z4drrFEsicJ4ivhnAGkEPBNUPTujKbSYf6bMCjTzRKrNNPmePAotrl",
          "name": "Nusrat Jahan",
          "profile_picture_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-1/297738489_149183324449711_6655284279259187616_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx720x730&ctp=s32x32&_nc_cat=106&ccb=1-7&_nc_sid=e99d92&_nc_ohc=StSE7y8rWMoQ7kNvwEoD8he&_nc_oc=AdpS-Chxb4rdvjLGu...",
          "url": null
        },
        {
          "id": "100079525026696",
          "name": "Thesoftwarelion",
          "profile_picture_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-1/242977119_109642788145497_5023972278328162431_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx1200x1200&ctp=s32x32&_nc_cat=110&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=WU3iox6us6AQ7kNvwESFVMs&_nc_oc=AdoiGWO0_3CoovY...",
          "url": null
        },
        {
          "id": "pfbid0pzs33rRB9YA54hRjvjaPeA62UVZTg73Aqbnn8jSjS9Mo1DUAZNyzV6wFUgYgnDwhl",
          "name": "Jamil Ahmed",
          "profile_picture_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-1/795255518_27959759933716428_4332290339331851799_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx1568x1556&ctp=s32x32&_nc_cat=110&ccb=1-7&_nc_sid=e99d92&_nc_ohc=Ww9uIb4rQ_4Q7kNvwGs27eR&_nc_oc=AdqeeaGUdr957...",
          "url": null
        }
      ],
      "categories": [
        {
          "id": "242504017103922",
          "name": "Software & tech"
        },
        {
          "id": "202183377053878",
          "name": "Engineering"
        }
      ],
      "history_summary": "Group created on October 14, 2020. Name last changed on October 16, 2020.",
      "member_count_text": "759.6K members",
      "moderator_count": 0,
      "privacy": {
        "description": "Anyone can see who's in the group and what they post.",
        "label": "Public"
      },
      "rules": [
        {
          "description": "We're all in this together to create a welcoming environment. Let's treat everyone with respect. Healthy debates are natural, but kindness is required.",
          "id": "366191957905696",
          "title": "Be Kind and Courteous"
        },
        {
          "description": "Make sure everyone feels safe. Bullying of any kind isn't allowed, and degrading comments about things like race, religion, culture, sexual orientation, gender or identity will not be tolerated.",
          "id": "366191961239029",
          "title": "No Hate Speech or Bullying"
        },
        {
          "description": "Give more than you take to this group. Self-promotion, spam and irrelevant links aren't allowed.",
          "id": "366191964572362",
          "title": "No Promotions or Spam"
        }
      ],
      "source": "logged_out_public_view",
      "visibility": {
        "description": "Anyone can find this group.",
        "label": "Visible"
      }
    }
  },
  "cursor": null,
  "has_more": null
}

Response#

A Community object in data.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.

Example error:

{
  "ok": false,
  "error": {
    "code": "not_found",
    "message": "The platform says this profile, post or item does not exist.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_2b5cb3db205b553513cb6f03"
}