Call it
curl https://api.peume.com/v1/call/list-facebook-comments \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"startUrls": [
{
"url": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
}
],
"resultsLimit": 50,
"includeNestedComments": false,
"viewOption": "RANKED_UNFILTERED",
"onlyCommentsNewerThan": "2024-01-01"
}
}'const res = await fetch("https://api.peume.com/v1/call/list-facebook-comments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"startUrls": [
{
"url": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
}
],
"resultsLimit": 50,
"includeNestedComments": false,
"viewOption": "RANKED_UNFILTERED",
"onlyCommentsNewerThan": "2024-01-01"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/list-facebook-comments",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"startUrls": [
{
"url": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
}
],
"resultsLimit": 50,
"includeNestedComments": False,
"viewOption": "RANKED_UNFILTERED",
"onlyCommentsNewerThan": "2024-01-01"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: list-facebook-comments.
Parameters
startUrlsRequiredarrayValid facebook URL
Example: [{"url":"https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"}]
resultsLimitintegerIf this limit is not set as many results as possible are returned
Example: 50
includeNestedCommentsbooleanIf checked, the actor will return up to 3 levels of comments/replies for each post. Note that each reply/comment will be returned as a separate result.
Example: false
viewOptionstringChoose the way the comments are sorted
RANKED_THREADED · RECENT_ACTIVITY · RANKED_UNFILTERED
Example: RANKED_UNFILTERED
onlyCommentsNewerThanstringLimit how far back to the history the scraper should go. The date should be in YYYY-MM-DD or full ISO absolute format or in relative format e.g. 1 year, 2 months, 3 days, 4 hours, or 5 minutes. All time values are taken in UTC timezone. This <a href='' target='_blank' rel='noopener'>add-on feature</a> is billed separately.
Example: 2024-01-01
