# Facebook Comments Scraper (`coregent/facebook-comments-scraper`) Actor

Scrape public Facebook comments and replies from posts, Reels, videos and photos. Extract comment text, authors, timestamps, likes and reply threads in clean JSON or CSV.

- **URL**: https://apify.com/coregent/facebook-comments-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.75 / 1,000 comment results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 — Comments, Replies, Authors & Engagement

![Facebook Comments Scraper](https://raw.githubusercontent.com/coregentdevspace/facebook-comments-scraper-assets/main/thumbnail-facebook-comments-scraper.png)

Scrape **public Facebook comments and replies** from posts, Reels, videos and photos. Paste one or many Facebook content URLs and get every public comment as **one clean row** — comment text, author, timestamp, likes and reactions, and the reply-thread relationships — ready for JSON, CSV, Excel, SQL or an AI pipeline.

**No Facebook login, no cookies, no access token.** The Actor reads only what Facebook shows a logged-out visitor.

### ✨ What it does

- 💬 **Top-level comments and replies** — every reply is its own row, with `rootCommentId`, `parentCommentId` and `threadingDepth`, so conversations can be rebuilt in a spreadsheet.
- 🔗 **Many URL types** — posts (numeric or `pfbid…` links), Reels, videos, Watch, photos, `permalink.php`, share links (`/share/p/…`, `fb.watch/…`) and public-profile posts.
- 🎯 **Exact per-URL limits** — `resultsLimit` is applied to each URL separately, replies included.
- 🗓️ **Date filter** — keep only comments newer than a date or a period such as `7 days`.
- ↕️ **Sort** — Facebook's default order, newest first, or most relevant.
- 🧹 **Deduplicated** — no comment is ever saved (or charged) twice, even if the same post is given as two different URLs.
- 🩺 **Honest status per URL** — private, deleted, unsupported or blocked content is reported clearly instead of returning a silent empty dataset.
- 📊 **Flat, typed output** — counts are numbers, missing values are `null`.

### 🔗 Supported Facebook URLs

| Content | Example |
|---|---|
| Page or profile post | `https://www.facebook.com/{page}/posts/{id}` or `/posts/pfbid…` |
| Video | `https://www.facebook.com/{page}/videos/{id}` |
| Watch | `https://www.facebook.com/watch/?v={id}` · `https://fb.watch/{code}` |
| Reel | `https://www.facebook.com/reel/{id}` |
| Photo | `https://www.facebook.com/photo/?fbid={id}` · `/{page}/photos/…/{id}` |
| Permalink | `https://www.facebook.com/permalink.php?story_fbid={id}&id={owner}` |
| Share link | `https://www.facebook.com/share/p/{code}/` (also `/share/v/`, `/share/r/`) |
| Public group post | `https://www.facebook.com/groups/{group}/posts/{id}` — only if Facebook shows it logged out |

`m.facebook.com`, `web.facebook.com` and tracking parameters are normalized automatically.

**Not supported:** Page/profile home URLs, search, hashtags and private content. These are rejected with a clear message. Need a page's posts first? Run **[Facebook Posts Scraper](https://apify.com/coregent/facebook-posts-scraper)** and pass the post URLs it returns into this Actor.

### 🚀 Quick start

#### Minimal input

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl" }
  ],
  "resultsLimit": 100
}
```

#### Full input — several URLs, replies, newest first, last 30 days

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl" },
    { "url": "https://www.facebook.com/reel/1450137903652075" },
    { "url": "https://www.facebook.com/photo/?fbid=1663743535123070" }
  ],
  "resultsLimit": 1000,
  "includeReplies": true,
  "maxReplyDepth": 2,
  "sort": "NEWEST",
  "commentsNewerThan": "30 days"
}
```

### ⚙️ Input

| Field | Default | What it does |
|---|---|---|
| `startUrls` | — (required) | Facebook content URLs. Plain strings or `{ "url": … }` objects. |
| `resultsLimit` | `100` | Max comment + reply rows **per URL**. `0` = no limit. |
| `includeReplies` | `true` | Save replies as their own rows. |
| `maxReplyDepth` | `2` | `1` = replies to comments only; `2` = also replies to replies (the deepest level Facebook has). |
| `sort` | `ALL` | `ALL` (Facebook's default order), `NEWEST`, or `MOST_RELEVANT`. |
| `commentsNewerThan` | empty | A date (`2026-09-01`) or a period (`24 hours`, `7 days`, `1 month`). |
| `maxConcurrency` | `5` | How many URLs run in parallel (1–10). Each URL's pages are read one after another. |
| `proxyConfiguration` | Apify Proxy | See **Proxy policy** below. |
| `debug` | `false` | Verbose log for troubleshooting. |

#### What does `resultsLimit` mean exactly?

It caps the number of rows saved for **each input URL**, and replies count toward it. With `resultsLimit: 100` and 3 URLs you get up to 300 rows. Within a URL, the Actor reads one page of comments, saves those comments, then their replies, then moves to the next page — so a single very long reply thread cannot use up the whole limit on its own.

### 📤 Output

One dataset row per comment or reply. In the Apify Console the results open in the **Comments** table:

![Comments table view](https://raw.githubusercontent.com/coregentdevspace/facebook-comments-scraper-assets/main/facebook-comments-scraper-output-comments-table-view.png)

A full record — here a reply to a reply, from a real run on an ESPN post:

```json
{
  "type": "comment",
  "commentId": "2959030571103151",
  "commentUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl?comment_id=1079476544966010&reply_comment_id=2959030571103151",
  "text": "Andrew Blackk we can literally beat every team over the next 4 games",
  "date": "2026-10-05T05:08:17.000Z",
  "likesCount": 1,
  "reactionsCount": 2,
  "reactions": { "like": 1, "love": 1 },
  "repliesCount": 0,
  "threadingDepth": 2,
  "isReply": true,
  "rootCommentId": "1079476544966010",
  "parentCommentId": "1076504418343827",
  "replyToCommentId": "1076504418343827",
  "replyToAuthorName": "Andrew Blackk",
  "authorId": "pfbid02f22znxxGVMkLJ8HoRVmknptWYGH3wPJPnyuRNwEBskVyZwmvNuhBrH8eJ7NcHjqql",
  "authorName": "D-rock Zamora",
  "authorUrl": "https://www.facebook.com/drock.zamora",
  "authorProfilePicture": "https://scontent-lga3-3.xx.fbcdn.net/v/t1.6435-1/60880123_50…",
  "authorType": "User",
  "attachment": null,
  "postId": "4942228743939357",
  "postUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl",
  "postType": "post",
  "postText": "THE TETAIROA MCMILLAN GAME IN PRIMETIME 🔥\n\nA bounce-back win for the Carolina Panthers has them atop the NFC South 👀",
  "pageId": "100044568393679",
  "pageName": "ESPN",
  "inputUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl",
  "scrapedAt": "2026-10-05T11:48:57.333Z"
}
```

| Field | Notes |
|---|---|
| `commentId` | Stable Facebook comment ID; the dedupe key. |
| `likesCount` / `reactionsCount` | Numbers. `reactions` breaks the total down by type (`like`, `love`, `care`, `haha`, `wow`, `sad`, `angry`). |
| `repliesCount` | The reply count Facebook displays for the comment. |
| `threadingDepth` | `0` = top-level comment, `1` = reply, `2` = reply to a reply. |
| `rootCommentId` / `parentCommentId` | The thread's top comment and the comment this one directly answers. |
| `authorId` | A numeric ID, or an opaque `pfbid…` token when Facebook hides the numeric ID from logged-out visitors. |
| `authorUrl` | `null` when Facebook does not link the profile for logged-out visitors. |
| `attachment` | `{ type, url, mediaUrl }` when the comment has a photo, GIF, sticker, video or link — `type` is `photo`, `gif`, `sticker`, `video`, `link` or `other`; `url` is the real target (Facebook's click-tracking wrapper is removed). Otherwise `null`. |
| `postText`, `pageId`, `pageName` | Context of the post the comment belongs to; `null` when Facebook doesn't show it. |

#### Output tabs — one sample record each

The dataset has four views. Each sample below is a real record from a platform run, showing the fields that tab displays.

**Comments** — what was said, by whom, and how people reacted:

```json
{
  "date": "2026-10-05T04:00:33.000Z",
  "authorName": "Gabriel Panther",
  "text": "Do that Dab again, Copy Our Uniforms again 💯💯",
  "likesCount": 112,
  "reactionsCount": 116,
  "repliesCount": 13,
  "isReply": false,
  "threadingDepth": 0,
  "commentUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl?comment_id=1079476544966010",
  "authorUrl": null,
  "postUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl",
  "inputUrl": "https://www.facebook.com/ESPN/posts/pfbid0gwea45YzsqACibJ7PRn5MdWkgRLtEtvmSLLtvzUBqz9sQn6ag3CH2ZAxAKBrUVFrl"
}
```

**Threads** — the IDs that rebuild a conversation. This reply-to-a-reply answers comment `1076504418343827`, inside the thread started by the comment above:

```json
{
  "commentId": "2959030571103151",
  "rootCommentId": "1079476544966010",
  "parentCommentId": "1076504418343827",
  "replyToCommentId": "1076504418343827",
  "replyToAuthorName": "Andrew Blackk",
  "threadingDepth": 2,
  "isReply": true,
  "authorName": "D-rock Zamora",
  "text": "Andrew Blackk we can literally beat every team over the next 4 games",
  "date": "2026-10-05T05:08:17.000Z",
  "postId": "4942228743939357"
}
```

**Authors** — who commented, as Facebook shows them to a logged-out visitor (here on a National Geographic photo):

```json
{
  "authorName": "Maryellen Kmiec",
  "authorId": "pfbid02fy5Rj7LgPXpSyEiF3Vmw16ZPgsR5FRt9ZaHw7KS4dWff6kMzRSAVRp31cmcQiAFGl",
  "authorUrl": "https://www.facebook.com/maryellen.kmiec",
  "authorType": "User",
  "authorProfilePicture": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.30808-1/433653100…",
  "text": "This was just phenomenal!!! The cinematography was beyond belief and what a great story.\n\nIt brought back wonderful memories of our trip to South Africa. We can't wait to return.",
  "date": "2026-09-17T18:25:24.000Z",
  "commentUrl": "https://www.facebook.com/photo/?fbid=1663743535123070&set=a.528642308633204&comment_id=1863952161652407"
}
```

**Post context** — the post each comment belongs to:

```json
{
  "postId": "1724921635664471",
  "postUrl": "https://www.facebook.com/nba/posts/pfbid02CK7D3HudauhFPKH1NNuBjq8kzCHCCqYFdcX2MPKJ7zhHGAGUzTExLVZWLX6S3BUXl",
  "postType": "post",
  "pageName": "NBA",
  "pageId": "100044399530411",
  "postText": "Keaton Wagler comes up clutch in crunch time in his NBA Preseason debut as the L.A. Clippers hold off a late rally for the victory!\n\nRui Hachimura: 21 PTS, 5 REB\nDarius Garland: 15 PTS, 3 REB, 6 AST",
  "commentId": "1492802385994777",
  "text": "Thought it was the WNBA post for a sec",
  "inputUrl": "https://www.facebook.com/nba/posts/pfbid02CK7D3HudauhFPKH1NNuBjq8kzCHCCqYFdcX2MPKJ7zhHGAGUzTExLVZWLX6S3BUXl",
  "scrapedAt": "2026-10-05T11:49:04.701Z"
}
```

A `RUN_SUMMARY` record in the run's key-value store lists every input URL with its status and number of comments saved.

### 🩺 Per-URL status

One URL failing never stops the others. Each URL ends with one of:

| Status | Meaning |
|---|---|
| `SUCCESS` | Comments saved (or the thread was fully read). |
| `NO_COMMENTS` | The post is public but has no visible comments. |
| `COMMENTS_DISABLED` | Commenting is turned off and there are no comments. |
| `PARTIAL_RESULT` | Some comments were saved, then Facebook stopped answering for that URL. |
| `UNSUPPORTED_URL` | Not a Facebook content URL (page, profile, search…). |
| `PRIVATE_OR_LOGIN_REQUIRED` | Private content, or a group Facebook only shows to members. |
| `POST_NOT_FOUND` | Deleted or never existed. |
| `RATE_LIMITED` / `BLOCKED` | Facebook refused the requests. Try again later or use a different proxy. |
| `TEMPORARY_FACEBOOK_ERROR` | Facebook returned an error; retrying later usually works. |

Failed URLs produce **no dataset rows and no charge** — they appear in the log and in `RUN_SUMMARY`.

### 💰 Pricing

Pay per result: you are charged **once per comment or reply saved** to your dataset (a reply counts as one comment). See the **Pricing** tab for the current rate.

You are **not** charged for: input URLs, pagination requests, retries, URLs that fail, comments removed by your date filter, duplicates, or the run summary. A run that saves nothing costs nothing in results.

Examples: 3 posts × `resultsLimit: 100` = at most 300 charged results; 1 post with `resultsLimit: 1000` and `commentsNewerThan: "7 days"` = only the comments from the last 7 days, up to 1,000.

*This README deliberately doesn't quote prices — the Pricing tab always shows the live rate.*

### ❓ FAQ

**Do I need a Facebook account, login or cookies?**
No. The Actor never logs in and never asks for cookies or tokens. It reads what Facebook shows any logged-out visitor.

**Why might I get fewer comments than Facebook displays?**
Facebook's counter includes comments a logged-out visitor cannot see — hidden or filtered as low quality, from restricted accounts, or deleted after the count was taken. A comment showing "2 replies" may deliver fewer for the same reason. `MOST_RELEVANT` order also hides comments Facebook considers low quality; use `ALL` for the most complete set.

**Are replies included?**
Yes, by default — each one as its own row. Set `includeReplies: false` for top-level comments only.

**How does the date filter work with sorting?**
With `sort: "NEWEST"` the run stops reading as soon as a whole page of comments is older than your date, which is the cheapest way to collect recent comments. Replies newer than the date that sit under comments older than it are not chased in that mode. With other orders, the whole thread is read and older comments are dropped before saving.

**What about private posts and groups?**
Private posts, friends-only content and private groups are not accessible and are reported as `PRIVATE_OR_LOGIN_REQUIRED`. Public group posts work only where Facebook shows them to logged-out visitors.

**Can I scrape many URLs at once?** Yes — add as many as you like; they run in parallel (`maxConcurrency`).

**Does it work through the Apify API, schedules and webhooks?** Yes, like any Apify Actor. Call it via the API, run it on a schedule to archive comments, or chain it after Facebook Posts Scraper with a webhook or an integration.

**Why does Facebook show the number of comments but the run returns none for one URL?** Check that URL's status in the log or `RUN_SUMMARY`. `RATE_LIMITED` or `BLOCKED` means Facebook refused the requests at that moment; re-running later usually succeeds.

#### 🚦 Proxy policy

Use **Apify Datacenter** proxy (the default) or **no proxy** for normal runs.

**Apify Residential proxy is not supported.** The Actor fails at startup if `apifyProxyGroups` includes `RESIDENTIAL`. Reason: in pay-per-event Actors, residential bandwidth is billed to the developer rather than to your run, so a single bandwidth-heavy run could cost more than all of its results.

If you genuinely need residential routing, supply your own residential provider in the proxy editor's **Custom proxy URLs** field — that traffic goes through your provider, not Apify, and is unaffected:

```
http://user:pass@proxy.iproyal.com:12321
http://user:pass@proxy.brightdata.com:22225
http://user:pass@proxy.oxylabs.io:7777
```

### 🔗 Works well with

- **[Facebook Posts Scraper](https://apify.com/coregent/facebook-posts-scraper)** — get a page's post URLs, then pass them here.
- **[Facebook Pages Leads Scraper](https://apify.com/coregent/facebook-pages-leads-scraper)** — contact details of Facebook Pages.
- **[Facebook Ads Library Scraper](https://apify.com/coregent/facebook-ads-library-scraper)** — ads a page is running.

### ⚖️ Limitations, privacy and compliance

- This Actor is **unofficial** and not affiliated with, endorsed by or sponsored by Meta or Facebook.
- It only processes information Facebook shows publicly to a logged-out visitor. It does not and cannot access private posts, friends-only content, private groups or messages.
- Public comments can still contain **personal data**. You are responsible for having a legal basis (for example under GDPR) to collect, store and process it, and for complying with applicable laws and Facebook's terms.
- Collect only what you need. The Actor returns the lightweight public author fields Facebook shows next to a comment — never full profiles.
- Facebook changes its website frequently; results can change with it. The run summary reports each URL's status so changes are visible rather than silent.

# Actor input Schema

## `startUrls` (type: `array`):

Public Facebook post, Reel, video, Watch, photo or other supported content URLs — one or many. Supported forms: /{page}/posts/{id or pfbid…}, /{page}/videos/{id}, /watch/?v={id}, fb.watch/…, /reel/{id}, /photo/?fbid={id}, /{page}/photos/…, /permalink.php?story_fbid=…, /share/p/…, /groups/{group}/posts/{id}. Page, profile, home and search URLs are not content and are rejected with a clear message — to get a page's post URLs first, use Facebook Posts Scraper.

## `resultsLimit` (type: `integer`):

Maximum number of comment and reply rows to save PER INPUT URL. Replies count toward the limit. Use 0 for no limit (every comment Facebook shows a logged-out visitor). Suggested: 100, 500, 1000, 5000.

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

Include replies to comments. Each reply is saved as its own row with parentCommentId, rootCommentId and threadingDepth, so threads can be rebuilt in a spreadsheet or SQL.

## `maxReplyDepth` (type: `integer`):

How deep to follow reply threads when replies are included. 1 = replies to comments only. 2 = also replies to replies, which is the deepest level Facebook shows.

## `sort` (type: `string`):

The order Facebook serves comments in. ALL = Facebook's default order for a post (all comments). NEWEST = newest first (most efficient with a date filter, because the run can stop at the date boundary). MOST_RELEVANT = Facebook's relevance ranking, which may hide some comments Facebook considers low quality.

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

Save only comments posted after this point. A date (2026-09-01 or 2026-09-01T00:00:00Z) or a relative period (24 hours, 7 days, 2 weeks, 1 month). Older comments are not saved and not charged. Combine with Comment order = Newest first so the run stops paging at the boundary instead of reading the whole thread.

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

How many URLs are processed at the same time. Each URL's own comment pages are always read one after another.

## `proxyConfiguration` (type: `object`):

Apify Datacenter proxy is used by default. Apify Residential proxy is not supported and the run fails at start if it is selected — supply your own residential provider under Custom proxy URLs instead if you need one.

## `debug` (type: `boolean`):

Verbose logging, for troubleshooting only.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl"
    }
  ],
  "resultsLimit": 100,
  "includeReplies": true,
  "maxReplyDepth": 2,
  "sort": "ALL",
  "commentsNewerThan": "",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `threads` (type: `string`):

No description

## `authors` (type: `string`):

No description

## `posts` (type: `string`):

No description

## `runSummary` (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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl"
        }
    ],
    "resultsLimit": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/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 = {
    "startUrls": [{ "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl" }],
    "resultsLimit": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/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 '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/zuck/posts/pfbid02tn9Ctpv9BCh3WRqFMZWBpAdqL4qCc2jsZ9qTZyy9w4WYY55JWsDW3GZ279ZVwbisl"
    }
  ],
  "resultsLimit": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call coregent/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coregent/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/05Wh2gwWluhoHw87w/builds/put4LaaWgshCTVibh/openapi.json
