# Facebook Comments Scraper: Replies, No Login (`automation_craft/facebook-comments-scraper`) Actor

Scrape the comments and replies of public Facebook posts, videos, reels and photos without a login: text, author, time, reactions by type, reply counts, attachments and language, plus a free coverage row per post with Facebook's own counts. JSON, CSV, Excel, API. Pay per comment.

- **URL**: https://apify.com/automation_craft/facebook-comments-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.19 / 1,000 comments

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Facebook Comments Scraper: Replies, No Login

**Facebook comments scraper for public posts, videos, reels and photos, with no login and no cookies.** Paste post links and get every comment and reply Facebook shows a logged out visitor: text, author, time, reactions by type, reply counts, attachments and language, with the exact parent of each reply. Each post also gets a free coverage row with Facebook's own comment counts next to what was delivered, so you always know how complete a post is. Pay per comment, from $0.19 per 1,000.

#### What it is for

- **Brand and agency teams**: export the comments under your posts, a competitor's posts or their ads' organic posts for sentiment, complaints and questions.
- **Researchers**: collect the full public discussion of a post, with reply threads, into one table.
- **Monitoring**: schedule it with a memory name and get only the new comments of each run, each comment billed once.
- **Automation users**: one row per comment, ready for n8n, Make, Zapier, Google Sheets or a database.

### Quick start

1. Paste one or more post links into **Post links** (a page post, a pfbid link, a video, a reel, a photo, a share link or a public group post).
2. Set **Comments per post** (20 by default in the form) or switch on **Every comment of each post**.
3. Leave **Include replies** on to get the reply threads too (replies count against the same number).
4. Click **Start**. Download the rows as JSON, CSV or Excel, or read them through the API.

### What you get

One row per comment or reply (`type: "comment"`), the Comment event:

| Field | What it holds | Filled on the platform runs (2026-10-14) |
|---|---|---|
| `commentId`, `commentGraphId`, `feedbackId` | Facebook's ids of the comment | 100 percent |
| `postId`, `postUrl`, `inputUrl` | the post the comment belongs to and the link you gave | 100 percent |
| `depth`, `isReply`, `parentCommentId`, `threadCommentId`, `replyToAuthorName` | 0 for a top level comment, 1 for a reply, 2 for a reply to a reply, with the exact comment it answers | 100 percent |
| `text` | the comment's text (empty for a sticker or photo only comment) | 96 percent |
| `createdAt`, `createdAtUnix` | when it was written (UTC) | 100 percent |
| `authorName`, `authorId`, `authorIdKind` | the commenter as Facebook shows them logged out (a numeric id or a pfbid id) | 100 percent |
| `authorUrl` | the commenter's profile link where Facebook shows one | 58 percent |
| `authorPictureUrl` | the commenter's picture | 100 percent |
| `authorIsVerified`, `authorIsPostAuthor`, `authorBadges` | verified badge, whether the post's own page or profile wrote it, badges such as top fan | 2, 1 and 29 percent |
| `reactionCount`, `reactions` | all reactions, and like, love, care, haha, wow, sad, angry | 100 percent (a non zero breakdown on 31 percent) |
| `replyCount` | Facebook's reply count of the comment | 100 percent (non zero on 6 percent) |
| `attachments` | photo, video, gif, sticker or link, with URLs (a link adds its title, source and target) | 4 percent |
| `mentions` | people, pages and hashtags tagged in the text | 7 percent |
| `language`, `textTranslationType` | the language Facebook detected (for example `en_XX`) | 76 percent |
| `isEdited`, `writtenWhileLive`, `secondInVideo` | edited flag, and for comments on a live video, when in the video they were written | where Facebook shows them |
| `commentUrl`, `replyThreadToken` | the comment's own link, and Facebook's handle of its reply thread | 100 percent |
| `postText`, `postCreatedAt`, `postAuthorName` | the post's own facts, with the Post details add-on (below) | when the add-on is on |
| `sortOrder`, `scrapedAt` | the order the post was read in, and when the row was made | 100 percent |

The fill rates are counted over the 2,094 comments and replies the platform runs of this build delivered (9 posts of brands, news, a public figure, a space agency, groups, a reel, a video and a photo).

A **coverage row** per post link (`type: "coverage"`, free): `facebookCommentCount` (top level comments Facebook counts), `facebookTotalCount` (with replies), `commentsDelivered`, `repliesDelivered`, `knownSkipped`, `filteredOut`, `outsideWindow`, `orderUsed`, `endReason`, `complete` and a `message`. `endReason` is one of `end_of_list` (Facebook served its last page: `complete` is true), `per_post_cap`, `date_window`, `known_reached` (a monitor met the comments it delivered before), `no_match_limit`, `thread_delivered` (a comment link), `work_allowance`, `charge_limit`, `post_not_found`, `post_not_available`, `post_unresolved`, `comment_not_found`, `duplicate_post`, `lookup_failed` or `unexpected_answer`.

**Status rows** (`type: "status"`, free) say which links could not be read and why: a page or profile link, a post Facebook does not show, a link whose page names no post. The **summary row** (`type: "summary"`, free) closes every run with its counters and what was billed.

#### Facebook shows fewer comments than it counts

Facebook counts every comment, but shows a logged out visitor only the ones it serves publicly. On a NASA image post that was 177 of 217 top level comments, on a NASA video 1,545 of 1,659, and on one Nike post only 934 of 3,069, the same 934 under every order (shorter walks on residential exits met only comments among those 934). This Actor reads all of what Facebook serves, and the coverage row puts Facebook's counts next to what was delivered. Some reply threads are shortened the same way (Facebook notes that "some replies may have been filtered out").

### Links it reads

| Link | Example | Read how |
|---|---|---|
| Page or profile post | `facebook.com/NASA/posts/1636988564463180`, `facebook.com/nike/posts/pfbid0Yzg...` | the post number directly; a pfbid link through its page (once per link under a memory name) |
| Video, watch | `facebook.com/NASA/videos/1408202287429345/`, `facebook.com/watch/?v=...`, `video.php?v=...` | the video number |
| Reel | `facebook.com/reel/1023344310547434/` | through the reel's page, which names the reel's post |
| Photo, photo album | `facebook.com/photo/?fbid=...&set=a....`, `photo.php?fbid=...` | the photo number, read oldest first |
| Public group post | `facebook.com/groups/dogspotting/posts/...`, `/permalink/...`, `?multi_permalinks=...` | the post number |
| Share and short links | `facebook.com/share/p/...`, `/share/v/...`, `/share/r/...`, `fb.watch/...` | the link's redirect, then the target |
| permalink.php, story.php, mobile links | `facebook.com/permalink.php?story_fbid=...&id=...`, `m.facebook.com/story.php?...` | the post number, or the owner's post address for a pfbid story |
| A comment | any of the above with `?comment_id=...` | that comment and its reply thread; for a reply (its own `comment_id`, or `reply_comment_id`), that reply and the replies under it |
| A bare post number | `1636988564463180` | the post number |

Page, profile and group home links are not posts: they get a free status row.

### How much does it cost to scrape Facebook comments?

Pay per event: you pay for each comment or reply delivered, nothing for anything else.

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| Comment (per 1,000 comments or replies) | $0.27 | $0.24 | $0.22 | $0.19 |
| Post details add-on (per 1,000 posts, off by default) | $0.90 | $0.80 | $0.70 | $0.60 |
| Actor start (per run) | $0.008 | $0.008 | $0.008 | $0.008 |

Platinum and Diamond plans pay the Gold price. The Store pricing card shows these same prices per 1,000 events: "$0.19 / 1,000" on the Comment row means one comment costs $0.00019. The Actor start is charged once per run, by the platform, per GB of run memory (a 256 MB run pays one).

Examples at the Gold price:

- 20 comments of one post: $0.008 + 20 x $0.00019 = **$0.0118**.
- 1,000 comments: $0.008 + $0.19 = **$0.198**.
- 10,000 comments and replies from 50 posts: $0.008 + $1.90 = **$1.908**.
- A monitor run of 10 posts that finds nothing new: **$0.008**.

Free, always: comments your memory knows, repeats, comments a filter or the date window leaves out, coverage rows, status rows for links that cannot be read, posts not found, the summary, and the sample run of an empty input.

### Input

| Field | What it does |
|---|---|
| `postUrls` | the post links (up to 500). `startUrls` with `{ "url": ... }` objects is read too |
| `maxCommentsPerPost` | the most comments and replies per post (empty: 50) |
| `collectAll` | every comment Facebook shows of each post |
| `maxTotalComments` | the most comments in the whole run |
| `includeReplies` | read the reply threads (empty: on) |
| `maxRepliesPerComment` | the most replies under each comment |
| `sortOrder` | `newest` (empty), `oldest`, `all` or `relevant` |
| `commentsNewerThan`, `commentsOlderThan` | a free date window: `YYYY-MM-DD`, `YYYY-MM-DDTHH:MM` (UTC), `today`, `yesterday`, `"7 days"`, `"24 hours"` |
| `keywords`, `excludeKeywords` | only comments with, or without, these words or phrases (whole words, any case) |
| `authors`, `excludeAuthors` | only, or never, these authors (a name, an author id or a profile link) |
| `excludePostAuthor` | leave out the post owner's own comments and replies |
| `minReactions` | only comments with at least this many reactions |
| `languages` | only comments in these languages (`en`, `es`, `pt`...) |
| `includePostDetails` | the Post details add-on |
| `memoryName`, `resetMemory` | the cross run memory |
| `proxyUrls` | your own proxies (optional, secret) |
| `maxConcurrency` | how many posts and threads are read at once (empty: 4) |

Example:

```json
{
  "postUrls": ["https://www.facebook.com/NASA/posts/pfbid0338pd1679MaCKkoVtCuNNfzmHfYWTg96j2LPcd2fGswyqJsWYs6wwHoSdYEBSLkXxl"],
  "maxCommentsPerPost": 200,
  "includeReplies": true,
  "sortOrder": "newest",
  "commentsNewerThan": "7 days",
  "memoryName": "nasa-weekly"
}
```

#### Orders

`newest` and `oldest` are strict time orders: with a date window the walk ends at the window's edge, so a "last 7 days" run reads only the pages it needs. `all` is Facebook's own ranking of every comment, `relevant` is its "Most relevant" view, which lists fewer comments. A photo is always read oldest first, because Facebook's other orders list only a few comments of a photo, and when an order lists far fewer comments than Facebook counts and ends, the post is read oldest first instead (the coverage row says so in `orderUsed`).

#### Monitoring with a memory

Give a `memoryName` and schedule the run. Every comment and reply delivered under that name is remembered: later runs leave it out for free and deliver only new ones. Known comments take no slot of `maxCommentsPerPost`: with a cap, each run delivers up to that many comments it has not delivered before, so successive runs also work back through older comments. A known comment's reply thread is read again only when its reply count grew. Under the newest first order, without a date window or a filter, a later run ends a post's walk at the first page of comments it has all delivered before, once an earlier run read that post to its end. A memory also remembers which post a pfbid, reel or share link led to, so later runs load no page for it (the Post details add-on still reads each post's page once a run). When a run of a list of several links stops before the end of the list (the work allowance, a cap), the next run of the same list under the same memory starts at the first link it did not read, so a long list is covered over successive runs. A memory belongs to this Actor and holds up to 150,000 comments; two runs on one name at the same time do not share it (the second runs free and remembers nothing).

#### The work allowance

Reading pages that bill nothing (a post with no new comments, a filter that matches little, links that do not exist) is bounded per run: the allowance grows with every comment billed. A run that reads many pages without billing stops early with `endReason: "work_allowance"` on the coverage row and a free skipped row for the posts it did not reach; run it again (under a memory name it continues where it stopped) or narrow it. A long list with only a few comments asked of each post (5 or fewer) earns the least allowance, more so when its links are pfbid, reel or share links (each needs a page load): on a slow day such a run can stop after part of the list, so ask for more comments per post or use a memory name. Rows of several posts are delivered together, so a monitor of many posts with a few new comments each pays its storage writes once per batch.

### API

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~facebook-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postUrls":["https://www.facebook.com/NASA/posts/1636988564463180"],"maxCommentsPerPost":50}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation_craft/facebook-comments-scraper').call({ postUrls: ['https://www.facebook.com/NASA/posts/1636988564463180'], maxCommentsPerPost: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((x) => x.type === 'comment').length);
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation_craft/facebook-comments-scraper").call(run_input={"postUrls": ["https://www.facebook.com/NASA/posts/1636988564463180"], "maxCommentsPerPost": 50})
comments = [x for x in client.dataset(run["defaultDatasetId"]).iterate_items() if x["type"] == "comment"]
```

### What this Actor does not do

- **No login, no cookies, no private content**: comments Facebook shows only to logged in users, private groups and private profiles are not read.
- **No commenter gender or work info**: rows carry the commenter's name, id, profile link and picture as the logged out page shows them, nothing more.
- **Not every comment Facebook counts**: only the comments it serves a logged out visitor (see "Facebook shows fewer comments than it counts").
- **No page, profile or group home links**: give the links of single posts.
- **No reactor lists**: who reacted to a comment is not read, only the counts.
- **Personal data**: comment rows carry the names, ids, profile links and pictures of the people who wrote them, as Facebook shows them to any visitor. Use them under the data protection rules that apply to you.
- **Replies of older comments in a date window**: under the newest first order a date window ends the walk at its start, so a reply written inside the window under a comment older than the window is not read. Use the `all` order with the window to read every thread.

### FAQ

#### Can I scrape Facebook comments without logging in?

Yes. This Actor reads the comments Facebook serves to any visitor of a public post, with no login, no cookies and no account. Comments Facebook hides from logged out visitors are not reachable this way, and each post's coverage row shows Facebook's count next to what was delivered.

#### How do I export Facebook comments to Excel or CSV?

Run the Actor with your post links, open the run's dataset and download it as CSV, Excel or JSON. Each comment and reply is one row, with its parent comment's id on every reply.

#### Why do I get fewer comments than the number Facebook shows?

Facebook's number counts every comment and reply, but a logged out visitor is shown fewer: on the posts measured between 30 and 93 percent of the top level comments. The coverage row gives `facebookCommentCount`, `facebookTotalCount` and what was delivered.

#### Can it download the replies to comments too?

Yes. With Include replies on (the default) every reply thread is read, replies and replies to replies, each a row with `parentCommentId`, `threadCommentId` and `depth`. Replies are billed as comments and count against Comments per post.

#### Does it work on reels, videos, photos and group posts?

Yes: reels, videos, watch links, photos and photo albums, public group posts, share links, fb.watch links and comment links. A reel is read through its page, which names the reel's post.

#### Why does this Actor run with limited permissions?

It needs only its own storages: the run's dataset and key-value store, and the memory it creates for a memory name you give. Limited permissions keep it from reading or writing anything else in your account.

### Changelog

See the Changelog tab.

### More data tools by Automation Craft

- [Facebook Posts Scraper - Page Posts, No Login](https://apify.com/automation_craft/facebook-posts-scraper)
- [Facebook Page ID Finder: Names to Page IDs](https://apify.com/automation_craft/facebook-page-id-finder)
- [Facebook Marketplace Scraper with Sold Tracker](https://apify.com/automation_craft/facebook-marketplace-scraper)
- [Facebook Ads Library Scraper - Ad Library & Spy](https://apify.com/automation_craft/facebook-ads-library-scraper)
- [Meta Ads Library Scraper - Ad Library, All Filters](https://apify.com/automation_craft/meta-ads-library-scraper)
- [Instagram Posts Scraper: Profiles, Reels, No Login](https://apify.com/automation_craft/instagram-posts-scraper)
- [Threads Replies Scraper: Comments of Any Post](https://apify.com/automation_craft/threads-replies-scraper)
- [TikTok Video Scraper: Post Stats, Transcripts](https://apify.com/automation_craft/tiktok-video-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/automation_craft/facebook-comments-scraper/changelog.md

# Actor input Schema

## `postUrls` (type: `array`):

Links of public Facebook posts, videos, reels, photos or public group posts: page posts (including pfbid links), /videos/, /watch/?v=, /reel/, /photo/?fbid=, share links (/share/p/, /share/v/, /share/r/), fb.watch, permalink.php and story.php links, or bare post numbers. A link with comment_id reads that comment and its replies (a reply's link: that reply and the replies under it). Up to 500 links. Page, profile and group home links are not read (a free row says so).

## `maxCommentsPerPost` (type: `integer`):

The most comments and replies delivered per post, replies included (each counts as one). Empty: 50. Facebook shows comments in pages of 10.

## `collectAll` (type: `boolean`):

Read every comment Facebook shows of each post to the end of its list, whatever Comments per post says. The charge limit and Comments in all still apply.

## `maxTotalComments` (type: `integer`):

The most comments delivered in the whole run, all posts together. Empty: no run cap (the per post number and your charge limit bound the run).

## `includeReplies` (type: `boolean`):

Read the reply threads too (replies and replies to replies, each a row with its parent comment's id). Replies count against Comments per post and are billed as comments. Empty: on.

## `maxRepliesPerComment` (type: `integer`):

The most replies delivered under each top level comment. Empty: every reply Facebook shows (within Comments per post).

## `sortOrder` (type: `string`):

The order Facebook lists the comments in. Newest first and Oldest first are strict time orders: a date window then ends the walk early. Most relevant lists fewer comments. Photos are always read oldest first (Facebook's other orders list only a few comments of a photo). Empty: newest first.

## `commentsNewerThan` (type: `string`):

Only comments and replies posted at or after this moment, in UTC: YYYY-MM-DD, YYYY-MM-DDTHH:MM, today, yesterday, "7 days" or "24 hours" (counted back from the run's start). Free.

## `commentsOlderThan` (type: `string`):

Only comments and replies posted at or before this moment, in UTC, same forms as above (a day means its end, 23:59:59). Free.

## `keywords` (type: `array`):

Only comments whose text holds at least one of these words or phrases (whole words, any case). Words of languages written without spaces match anywhere. Comments left out are free; up to 100 words.

## `excludeKeywords` (type: `array`):

Leave out comments whose text holds any of these words or phrases (the same matching as the field above). Free.

## `authors` (type: `array`):

Only comments by these authors: a name as Facebook shows it, an author id (a number or a pfbid id) or a facebook.com profile link.

## `excludeAuthors` (type: `array`):

Leave out comments by these authors (names, ids or profile links, as above).

## `excludePostAuthor` (type: `boolean`):

Leave out comments and replies written by the post's own page or profile (a brand answering its customers, for example).

## `minReactions` (type: `integer`):

Only comments with at least this many reactions. Empty or 0: no minimum.

## `languages` (type: `array`):

Only comments Facebook marks as written in these languages: two or three letter codes such as en, es, pt, ar. Comments without a language (a sticker, an emoji only) are left out when this is set.

## `includePostDetails` (type: `boolean`):

Add one post row per post (the post's text, time, author, reaction and share counts as its page shows them logged out) and the post's text, time and author on every comment row. Billed as Post details, once per post per run; a post whose page shows no details is free. Off by default.

## `memoryName` (type: `string`):

Name a memory to bill each comment once across runs: comments delivered by earlier runs under this name are free and left out, and a known comment's replies are read again only when its reply count grew. A memory belongs to this Actor; up to 150,000 comments.

## `resetMemory` (type: `boolean`):

Forget every comment the named memory holds before this run (every comment counts as new again).

## `proxyUrls` (type: `string`):

Optional: your own proxy addresses, one per line, as http://user:password@host:port. Empty: the Apify datacenter pool this Actor uses on its own.

## `maxConcurrency` (type: `integer`):

How many posts and reply threads are read at once. Empty: 4.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/NASA/posts/pfbid0338pd1679MaCKkoVtCuNNfzmHfYWTg96j2LPcd2fGswyqJsWYs6wwHoSdYEBSLkXxl"
  ],
  "maxCommentsPerPost": 20,
  "includeReplies": true,
  "sortOrder": "newest"
}
```

# Actor output Schema

## `items` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "postUrls": [
        "https://www.facebook.com/NASA/posts/pfbid0338pd1679MaCKkoVtCuNNfzmHfYWTg96j2LPcd2fGswyqJsWYs6wwHoSdYEBSLkXxl"
    ],
    "maxCommentsPerPost": 20,
    "collectAll": false,
    "includeReplies": true,
    "sortOrder": "newest",
    "excludePostAuthor": false,
    "includePostDetails": false,
    "resetMemory": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/facebook-comments-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "postUrls": ["https://www.facebook.com/NASA/posts/pfbid0338pd1679MaCKkoVtCuNNfzmHfYWTg96j2LPcd2fGswyqJsWYs6wwHoSdYEBSLkXxl"],
    "maxCommentsPerPost": 20,
    "collectAll": False,
    "includeReplies": True,
    "sortOrder": "newest",
    "excludePostAuthor": False,
    "includePostDetails": False,
    "resetMemory": False,
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/facebook-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postUrls": [
    "https://www.facebook.com/NASA/posts/pfbid0338pd1679MaCKkoVtCuNNfzmHfYWTg96j2LPcd2fGswyqJsWYs6wwHoSdYEBSLkXxl"
  ],
  "maxCommentsPerPost": 20,
  "collectAll": false,
  "includeReplies": true,
  "sortOrder": "newest",
  "excludePostAuthor": false,
  "includePostDetails": false,
  "resetMemory": false
}' |
apify call automation_craft/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/facebook-comments-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Srjwrx66P5IkWWE3S/builds/GcgXyZ1dzxmtGcLKA/openapi.json
