How to fetch recent Facebook group posts by URL
Fetch recent posts from five public Facebook group URLs into one table with author, reactions and comment counts, then sort the rows to pick the threads that need a reply
On this page
You have five public Facebook group URLs to watch for product mentions and urgent questions, and you need the recent posts from each one in a single table, ranked by reactions and comment counts, so you can pick the threads that need a reply today. anyapi.facebook.group_posts takes one group URL per call and returns post text, author, reaction counts and comment counts
The worksheet below is the deliverable. No run has been executed for this guide, so the values in it are placeholders showing the shape, not results
The worksheet you are filling
Example URL: https://www.facebook.com/groups/homebaristas/. This one is an example, so replace it and the other four entries with the public group URLs you actually monitor
| Group URL | Author name | Post text | Published time | Reaction count | Reactions | Comment count | Post URL |
|---|---|---|---|---|---|---|---|
| (your first group) | (authorName) | (text) | (publishTime, converted to a date) | (reactionCount) | (reactions object) | (commentCount) | (url) |
Sort by reactionCount descending, then by commentCount descending. A post with many reactions and zero comments is a thread nobody has answered yet. A post with a long comment thread is a conversation already in progress, and the counts let you judge that before you open it
The input the tool takes
url is required: paste the public group URL as Facebook shows it. cursor is optional and takes a nextCursor from an earlier response when you want the next page. sort is optional and accepts four values: TOP_POSTS, RECENT_ACTIVITY, CHRONOLOGICAL and CHRONOLOGICAL_LISTINGS. The contract gives TOP_POSTS as its example ordering and does not describe how the other three differ, so choose one, write it in the sheet, and keep it the same across the five groups if you plan to compare them
Paging fits in the same loop. Read data.nextCursor from each response, pass it back as cursor, and stop when it is null
The call goes to POST /v1/runs with toolId anyapi.facebook.group_posts
Only public Facebook group URLs are supported. A group you can open because you are a member, but that does not render for a logged-out visitor, cannot be fetched here. Test one URL before you queue five; a found false response costs one call and tells you that group is not available to this tool
Output fields that decide which thread gets a reply
found is the first field to read. When it is true, data.posts holds the rows and data.nextCursor holds the cursor for the next page, or null when that lane has no more. When found is false, data is null and reason carries not_found, which the contract describes as a successful call, not an error
Each entry in posts carries id, text, url, publishTime, reactionCount, commentCount, authorName, authorId, reactions and, for posts that have one, image. publishTime is typed as an integer, so convert it to a date column rather than reading it as text. reactions breaks the total into like, love, haha, wow, sad, angry and care, which is what separates a joke thread from a complaint that needs an answer
Turning rows into a shortlist
| Row signal | What it points to |
|---|---|
High reactionCount, commentCount at 0 | A thread with attention and no reply |
text contains your product name | A mention to log |
text contains a question mark and commentCount is low | A question still waiting |
reactions.angry or reactions.sad above the others | A complaint worth reading first |
authorId groups several posts from one member, so a run of complaints from the same account is visible before you answer any single one of them
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch recent posts
from public Facebook groups and return a table. Check the current inputs and
price of anyapi.facebook.group_posts before running anything. Call it once per
group URL with sort set to TOP_POSTS, and follow nextCursor for one more page
per group. Return a table with group URL, author name, post text, published
time, reaction count, reactions, comment count and post URL, sorted by
reaction count and comment count. Mark any group where found is false and
report the reason instead of inventing rows.
Example URL, replace with your own public group URLs:
https://www.facebook.com/groups/homebaristas/Estimated tool cost
Prices read from the Purrkey catalog on November 13, 2026. The listing unit is max_call, defined in the catalog as "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One group page | calls x max price | $0.00477 per call | 1 | $0.00477 |
| Five group pages | calls x max price | $0.00477 per call | 5 | $0.02385 |
| Five groups with one extra page each | calls x max price | $0.00477 per call | 10 | $0.04770 |
A first pass over five groups that stops after one page each is at most $0.02385. Following nextCursor once per group doubles the call count to ten and the ceiling to $0.04770
Start with one group
Run the group you care about most on its own before you commit to five, then compare its rows against the worksheet columns above. The tool page is at https://purrkey.app/tools/facebook?q=group_posts
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Facebook.FAQ
How do I fetch recent posts from a public Facebook group by URL?
Call anyapi.facebook.group_posts with the group url. It returns post text, author, reaction counts and comment counts, plus a nextCursor for the following page.
What inputs does anyapi.facebook.group_posts take?
It takes a required url, an optional cursor for paging, and an optional sort with four values: TOP_POSTS, RECENT_ACTIVITY, CHRONOLOGICAL and CHRONOLOGICAL_LISTINGS.
Can I fetch posts from a private Facebook group?
No. Only public Facebook group URLs are supported, so a group that does not render for a logged-out visitor cannot be fetched.
How do I get the next page of group posts?
Take data.nextCursor from a response and pass it back as cursor. A null nextCursor means that lane has no more pages.
What does a found false response mean?
It means data is null and reason carries not_found, which the contract describes as a successful call rather than an error.
How much does it cost to fetch posts from five Facebook groups?
Five calls at up to $0.00477 per call is at most $0.02385. Following nextCursor once per group makes it ten calls, at most $0.04770.
What is in the reactions field?
It is an object with like, love, haha, wow, sad, angry and care counts, returned alongside reactionCount and commentCount on each post.
Next step
Try this with Facebook
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.