Facebook

How to read public Facebook group posts with an API

Read publicly accessible Facebook group posts, choose a feed order and paginate with a credit budget. Understand empty results and privacy limits.

Social FetchUpdated

Read a public Facebook group's posts with GET /v1/facebook/groups/posts. Each response contains the posts returned for that request, a pagination cursor and the credits charged. You can use those posts for a topic digest or to follow discussions in groups you have chosen.

This guide uses the public Python Programming group. The screenshots show real lookups; authors and post text that could identify ordinary people are blurred. Results can change between requests.

Public group metadata does not guarantee access to its posts. This API does not use your Facebook login, group membership or admin permissions. Private groups and content that needs special access are outside this guide. An empty result does not prove that a group has no posts.

Choose a public group

Start with a group you already know. The group posts endpoint takes a group URL; it does not discover groups or search all Facebook groups.

  1. Copy the full group URL, such as https://www.facebook.com/groups/366190054572553.
  2. Open the Playground, expand Facebook, choose Group (GET /v1/facebook/groups) and put the URL in url.
  3. Click Send. Check data.lookupStatus and, when a group is returned, data.group.privacy.label. Our example returned found and Public.
Social Fetch Playground showing the Public privacy label from a real Python Programming group lookup, with any visible member details blurred.
Check the group's privacy metadata, then test its feed. Public metadata alone is not proof that posts will be returned.

Use the group's own rules and publicly available information to decide whether your collection is appropriate. If access depends on signing into Facebook or joining the group, stop there. Do not send Facebook passwords, cookies or tokens to this endpoint.

Try the feed in the Playground

  1. In the Playground, expand Facebook and choose Group posts (GET /v1/facebook/groups/posts).
  2. Put the same group URL in url.
  3. Choose chronological in sortBy. Leave cursor empty for the first page.
  4. Click Send and read data.lookupStatus before processing data.posts.
Social Fetch Playground showing a real chronological group feed request and returned publication time and counts, with post text and author details blurred.
Read the returned dates and counts. A field can be null when it is unavailable; null does not mean zero.

found means the group resolved for this request. It can still have an empty posts array. not_found means the lookup did not resolve the group; it does not tell you whether the cause was a deleted URL, privacy or another access restriction.

Each post has an id and url. Text, publication time, reaction count, comment count and author details can be unavailable. The video object can contain null fields, so its presence alone does not prove that a post contains a usable video.

Choose a sort order

sortByWhat it requests
topFacebook's default relevance ranking, not a guaranteed engagement leaderboard
recentActivityOrder by recent comment or reaction activity
chronologicalRegular posts in Facebook's New posts order; approval can affect the order
chronologicalListingsThe separate feed of listing-style posts, such as items for sale

Choose chronological for regular posts and chronologicalListings when you specifically want listings. Listings are a different feed, so they can have much older dates than regular posts from the same group.

In the saved example, the first chronological page contained October 2026 posts, while the listing feed returned April 2025 posts. Those are observations from that lookup, not a freshness promise. Sort the returned rows by publishedAt yourself if your report needs date order, and handle null dates.

Request posts from your code

Create an API key, save it as SOCIALFETCH_API_KEY in your environment and keep it on your server. Never put it in browser code or a shared screenshot.

This curl request makes the same feed lookup as the Playground:

Request
bash

For TypeScript, install the SDK:

Request
bash

The example below fetches a bounded number of pages, removes duplicate IDs and filters the returned text. It prints only matching post links, rather than names or full post bodies.

Request
typescript

There is no server-side keyword or date filter on this route. This example matches simple substrings in the posts it received. It cannot find a keyword in posts it did not fetch, and it does not search comments.

Fetch another page

  1. Find data.page at the end of the response.
  2. If hasMore is true and nextCursor is non-null, copy the whole nextCursor value into cursor.
  3. Keep url and sortBy the same, then click Send again.
Social Fetch Playground showing the returned nextCursor and the cursor input used for the next request, with any visible member details blurred.
Pass the cursor unchanged to continue the same feed. Each completed page is a separate billed request.

Treat the cursor as an opaque string. Do not edit it or reuse it for a different group or sort order. Stop when hasMore is false, the cursor is null, or your page budget is reached. There is no fixed number of posts per page or promise of a complete historical export.

For later polls, start from the first page and deduplicate by post.id. Keep a bounded page budget and allow overlap between runs. Stopping at the first known post can miss other posts because feed order can change. Two separately published cross-posts can have different IDs, even if their text matches.

Read comments separately

A feed's commentCount is a count, not the comment text. To request top-level comments, pass a returned post.url to Facebook post comments. Replace FACEBOOK_POST_URL with that actual permalink:

Request
bash

Check lookupStatus, then paginate with this response's own page.nextCursor. A resolved feed does not guarantee that every post's comments are accessible. Replies are separate from top-level comments; use the comment replies reference when needed. Do not assume a returned comments page contains the whole discussion.

Costs and privacy

A completed group metadata lookup, group feed page or comment page costs one credit. An empty response or completed not_found lookup still costs one credit. Validation errors, lookup_failed and 503 temporarily_unavailable are not charged. Check meta.creditsCharged on success and the request log when investigating a request.

For example, one metadata lookup plus two completed feed pages costs three credits. Each additional completed comment page adds one credit. Testing in the Playground also spends credits. Set a page budget before scheduling repeated lookups. See Credits.

Public posts can still contain personal information. Store only the fields your task needs, limit who can see them and decide when to delete them. Keep capturedAt, the post URL and the response's meta.requestId for context and support. Blur names and faces when sharing screenshots. A public feed is not permission to build member contact lists or publish personal details; follow group rules and the Terms.

Troubleshooting

The url must be a Facebook group URL, not a profile or page URL.

This is a 400 bad_request validation error and costs no credits. Use a full facebook.com/groups/... URL, rather than a person's profile or a brand page. A malformed target can also produce "The url parameter must be a full Facebook group URL."

found with an empty posts array

The group resolved, but no posts were returned for this request. Check that you chose a public group and the intended feed. Try another sort order or another public group. Do not treat an empty array as proof of inactivity, and do not keep paying for repeated requests to a private group.

not_found even though I can open the group

Your logged-in browser may have access that the API does not. Check the full group URL and public visibility. Neither membership nor an admin role transfers access to Social Fetch.

Dates are out of order or posts repeat

Facebook's feed order is not a strict timestamp sort. Sort available dates in your own results and deduplicate IDs across pages and polls. Switching to chronologicalListings changes the feed rather than repairing regular-post ordering.

temporarily_unavailable or lookup_failed

Keep the error's error.requestId. Retry with backoff, respecting Retry-After if present. These failures are not charged. If the problem persists, contact support with that request ID. An error response does not have the success response's meta object.

Share this article