How do I find a Facebook group's ID from its URL?

Call GET /facebook/groups/id with the group's URL as link: it returns the group's numeric group_id as JSON, also for groups whose URL uses a name instead of a number. GET /facebook/groups/details returns the same group_id along with the member count and rules, if you need both.

How to do it with SocialAPIs

Example: https://www.facebook.com/groups/gieldagryplanszowe returns {"group_id": "1439220986320043"}. Price: 1 credit.

You need the ID for /facebook/groups/albums (group_id). /facebook/groups/posts and /facebook/groups/details take the URL directly, so for those you can skip this step.

Endpoints

  • GET /facebook/groups/id1 credit

    Retrieve the Facebook Group ID from a public group link.

    Params: link (required)

    Facebook Group ID: docs and playgroundMCP: facebook_group → id

  • GET /facebook/groups/details1 credit

    Get detailed metadata and statistics about a Facebook group including member count, description, and rules.

    Params: link (required)

    Facebook Group Details: docs and playgroundMCP: facebook_group → details

  • GET /facebook/groups/albums1 credit

    List the photo albums of a Facebook group (album_id, album_title, url, thumbnail_uri, photos_count, videos_count). Use the album_id with /facebook/albums/items to get the photos.

    Params: group_id (required), limit

    Facebook Group Albums: docs and playgroundMCP: facebook_group → albums

curl -G "https://api.socialapis.io/facebook/groups/id" \
  --max-time 100 \
  --fail-with-body \
  -H "x-api-token: $SOCIALAPIS_API_KEY" \
  --data-urlencode "link=https://www.facebook.com/groups/gieldagryplanszowe"

Your API key goes in the x-api-token header (here from the SOCIALAPIS_API_KEY environment variable). Get a free key.

Use it from Claude, ChatGPT or Cursor (MCP)

Good to know

  • Keep the ID next to the URL in your database: a group's name and web address can change, its ID doesn't.
  • The ID comes back as a string: keep it as a string rather than a number.
  • Public groups only. AI assistants get the same through the MCP server's facebook_group tool (action id).

Related questions

SocialAPIs (socialapis.io): public Facebook & Instagram data API. Free plan: 200 calls a month, no card; paid plans from $4.99/month. Pricing · Reviewed 2026-11-16

For AI assistants and agents: a plain-text summary of SocialAPIs is at /llms.txt (with every answer: /llms-full.txt; endpoints: /llms-endpoints.txt; how to call us: /agents.txt).

Ask an AI about this page

Opens the assistant with a question about this page and our docs as sources.