How to list comments on a Facebook post by URL
List a public Facebook post's comments by URL into a table with author, text, reactions, reply count and timestamps, then follow the cursor for more pages
On this page
You have 12 public Facebook post URLs from a campaign and need a clean comment table for each post. The agent pulls the first page for each URL, then follows nextCursor while it is present, so the social team can triage product questions and high-reaction threads. No run has been executed for this guide. The worksheet below is the deliverable design, with one row per comment and the fields that drive a reply decision
The task and the worksheet design
Use one table for the campaign and keep the post URL in a column. That shape lets the team sort by reactions or replies across posts, then filter to the comments that need a reply. Values here are placeholders showing the shape
| id | text | author | reactions | replies | createdUtc | feedbackId | post_url |
|---|---|---|---|---|---|---|---|
| (comment id) | (comment text) | (display name) | 0 | 0 | (Unix seconds) | (comment feedback id) | (public post URL) |
Keep id as the unique comment key. createdUtc is a UTC epoch timestamp in seconds, so multiply by 1000 for a JS Date in milliseconds. The team uses the table to decide which comments need a reply and which themes to summarize
Input the tool takes
The tool id is anyapi.facebook.post_comments. Its Agents call it through POST /v1/runs with toolId anyapi.facebook.post_comments. The contract says it lists the comments on a Facebook post by URL with cursor pagination and returns text, author, reactions and reply count
The contract lists required input url or feedbackId. For this campaign task, pass url for each public post. The contract lists optional inputs cursor and requireFields. Omit requireFields unless a named field such as feedbackId or hasNextPage must be returned. Naming fields can raise the price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named combination that no single source returns together is refused as invalid input, with no charge
Example URL with an invented page name: https://www.facebook.com/example.page/posts/1029384756102938. Use the public post URL you need to inspect
Read the response fields that drive a reply decision
The response has found and data. When found is true, data.comments holds the comments and data.nextCursor and data.hasNextPage hold the pagination state. When found is false, data is null and reason is not_found. The contract says a found: false answer is a successful call, not an error
Each comment has id, text, author, reactions, replies and createdUtc. It can also carry authorId, authorImage, feedbackId and expansionToken. The comments array is populated whenever the provider has data for the entity. Use text to flag product questions, reactions and replies to rank threads, and createdUtc to sort by time. feedbackId is the comment's feedback id, used to fetch its replies. For reply threads, see the companion guide at List Facebook comment replies
Page through comments
Call the tool once per post for the first page. Then pass nextCursor from a previous response back as cursor. The limit sits at this cursor step: nextCursor is null when the lane has no more comments. Stop when it is null. hasNextPage tells you whether more comments are available after the current page, and nextCursor is the value to send back
If a post has many comments, the planned quantity for the cost table rises by one call per page
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to list comments on the 12 public Facebook post URLs in the campaign list. Check the current inputs and price of anyapi.facebook.post_comments before running. For each URL, call the tool with url, then pass nextCursor back as cursor while nextCursor is present. Omit requireFields unless a named field such as feedbackId or hasNextPage must be returned. Return one table with id, text, author, reactions, replies, createdUtc, feedbackId and post_url. If found is false, leave the comment fields empty for that post and record the URL. Do not invent comments. Do not send replies. Example URL: https://www.facebook.com/example.page/posts/1029384756102938.Estimated tool cost
Prices from the Purrkey catalog, read November 13, 2026. The tool is listed as max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One post, first comments page | calls x max price | $0.00477 per call | 1 | $0.00477 |
| Twelve posts, first page each | calls x max price | $0.00477 per call | 12 | $0.05724 |
| Twelve posts, three pages each | calls x max price | $0.00477 per call | 36 | $0.17172 |
The first scenario uses 1 call, the second uses 12 calls, and the third uses 36 calls. A page after the first adds one call for that post
Next action
Run the first page on one post before the campaign list. Open the Facebook post comments tool and pass the public post URL
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 list comments on a Facebook post by URL?
Call anyapi.facebook.post_comments with url for the post. The response returns data.comments plus nextCursor and hasNextPage for pagination.
What inputs does anyapi.facebook.post_comments take?
The contract lists url or feedbackId as required input, and cursor and requireFields as optional. Omit requireFields unless a named field such as feedbackId or hasNextPage must be returned.
How do I paginate through Facebook post comments?
Pass the previous response's nextCursor back as cursor. nextCursor is null when the lane has no more comments, so stop when it is null.
What fields are in each Facebook post comment?
Each comment has id, text, author, reactions, replies and createdUtc, and can also carry authorId, authorImage, feedbackId and expansionToken.
What does found false mean for anyapi.facebook.post_comments?
It means the lookup returned nothing. The contract says a found: false answer is a successful call, not an error, and reason is not_found.
How much does it cost to list comments for 12 Facebook posts?
At the listed maximum, 12 first pages cost $0.05724. Three pages for each of 12 posts costs $0.17172.
Can I request specific output fields from anyapi.facebook.post_comments?
Use optional requireFields to name output fields such as feedbackId or hasNextPage that the request must be able to return. When the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named combination that no single source returns together is refused as invalid input, with no charge.
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.