Apify actor · whoareyouanas/facebook-single-post-scraper

Facebook Post Scraper by ID: Text, Comments and Reactions

Retrieve known Facebook posts by numeric ID with text, authors, engagement, media links, and optional loaded comments. Use per-post statuses to separate complete results from partial or inaccessible content.

Documentation checked 2026-10-29 · deployed build 0.1.11 · run through your Apify account

01 / Overview

Match the actor to the job.

Batch known post IDs

Submit numeric identifiers as quoted strings to preserve precision.

HTTP with optional fallback

Try the documented HTTP workflow and use browser fallback when enabled and needed.

Inspect each result

Keep extraction method, missing fields, status, and errors alongside the post.

02 / Input

Start with a clear, bounded input.

postIds is required and accepts numeric strings of 5–40 digits. Full URLs and opaque pfbid identifiers are not accepted. Enable comments and browserFallback only when needed, and review their cost implications.

input.json · example based on the deployed schema
{
  "postIds": [
    "4376904415959558"
  ],
  "includeMedia": true,
  "includeComments": false
}

Replace example targets and credential placeholders before running. These are documentation examples, not a promise of currently available source results.

Deployed actor input fields, types, defaults, and descriptions
FieldType / requiredDefaultPurpose
postIdsarrayRequiredNot specifiedRequired: numeric Facebook post IDs as quoted strings, for example ["4376904415959558"]. For a /groups/GROUP_ID/permalink/POST_ID/ URL, use POST_ID. URLs, group IDs, and pfbid identifiers are not accepted. Duplicates produce one row.
includeMediabooleantrueReturn image and video URLs without downloading the files.
includeCommentsbooleanfalseReturn comments present in the post response, up to maxComments. Does not paginate or promise all comments.
maxCommentsinteger10Limit per post, applied after deduplication.

Minimum: 0 · Maximum: 100

All other input controls (9)
Deployed actor input fields, types, defaults, and descriptions
FieldType / requiredDefaultPurpose
maxConcurrencyinteger5Maximum posts in flight. Lower this when Facebook throttles requests.

Minimum: 1 · Maximum: 30

browserConcurrencyinteger2Maximum fallback tabs in the shared browser.

Minimum: 1 · Maximum: 10

httpTimeoutSecsinteger12Maximum time per HTTP attempt.

Minimum: 1 · Maximum: 120

browserTimeoutSecsinteger30Maximum time per fallback page after browser startup and queue wait.

Minimum: 1 · Maximum: 120

maxRetriesinteger1Retries for transient network errors, throttling, and server errors.

Minimum: 0 · Maximum: 3

browserFallbackbooleantrueUse a browser when HTTP does not expose complete data. Successful browser results cost $0.04 instead of $0.005 for HTTP results. Disable for HTTP-only pricing.
proxyUrlstringYour credentialOptional HTTP(S) proxy URL used for both HTTP and browser requests. Use sticky session credentials where supported.
cookiesarrayYour credentialOptional cookies supplied by you for posts accessible to your account. Browser-extension cookie format is supported.
proxyConfigurationobject{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"],"apifyProxyCountry":"IN"}Residential Apify Proxy is enabled by default for cloud runs, using runtime credentials. Built-in proxy usage is included in Actor event pricing. Datacenter IPs may receive Facebook login restrictions. Disable explicitly for direct requests. The tested default country is India (IN); you can select another region.

03 / Output

Know what each returned row represents.

Illustrative output shape · not a live run
{
  "inputPostId": "4376904415959558",
  "status": "success",
  "post": {
    "postId": "4376904415959558",
    "postUrl": "https://www.facebook.com/groups/2447813518868667/posts/4376904415959558/",
    "authorName": "MKR Senior Living Advisors",
    "authorId": "100063722123704",
    "text": "Let's welcome our new members! [sample shortened]",
    "timestamp": "2026-05-24T07:00:57.000Z",
    "groupName": "Senior Placement Network",
    "groupPrivacy": "public",
    "source": "facebook_group",
    "postType": "photo",
    "totalReactions": 7,
    "commentsCount": 1,
    "sharesCount": 0,
    "textTruncated": false
  },
  "extractionMethod": "http",
  "missingFields": [],
  "error": null
}

Example values illustrate the published contract. Available fields and populated values depend on the source, mode, and result status.

Fields in the documented output view

inputPostId

Requested ID

status

Status

post.postUrl

Post

post.authorName

Author

post.text

Text

post.timestamp

Published

post.totalReactions

Reactions

post.commentsCount

Comments

post.sharesCount

Shares

extractionMethod

Method

durationMs

Duration (ms)

error

Error

Output views select columns. They do not necessarily filter record types or exhaust the full JSON payload. Use structured JSON when you need nested arrays or objects.

Dataset links and run artifacts (2)
Facebook post details
JSON dataset containing inputPostId, status, post details, extraction method, attempts, duration, missing fields and error. Rows are in completion order.
Run summary
Total processed posts, elapsed milliseconds, and counts by result status.

04 / Pricing

Understand the billable unit.

These are the active public event prices checked on 2026-10-29, in USD. They describe each event, not a universal flat price for a run. Confirm your current Apify plan and run budget before starting.

Actor event prices and billing units
Billable eventRate (USD)When it applies

HTTP post result

post-extracted

$0.005 / event

One complete post extracted over HTTP. No result charge for failed or partial rows.

$5.00 per 1,000 of this event. Other events and separate services are additional.

Browser post result

browser-post-extracted

$0.04 / event

One complete post extracted using browser fallback. Replaces the HTTP result charge.

$40.00 per 1,000 of this event. Other events and separate services are additional.

Actor Start

apify-actor-start

$0.00005 / event

Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event).

Start units depend on allocated memory: one event per GB, with at least one event.

  • A complete HTTP result and a complete browser result have different event prices. The browser result charge replaces the HTTP charge; they are not added for the same successful post.
  • Partial, restricted, unavailable, unresolved, and error rows have no result charge. Startup still applies; external proxy charges are separate.

A result limit and a spending cap are different controls. Account charges, applicable taxes, and separately billed providers or proxies must be considered where relevant. A cap setting is not a minimum invoice charge.

05 / API & automation

Use the same input from your workflow.

Test a small run in Apify Console, inspect its records and charges, then save a task or call the actor from your own application. Keep your Apify token in an environment variable. Source-specific credentials, if required, are separate from the Apify API token.

cURL · start an asynchronous actor run
# Save the input example as input.json and set APIFY_TOKEN.
# This request starts an asynchronous, potentially billable run.
curl --request POST \
  'https://api.apify.com/v2/acts/whoareyouanas~facebook-single-post-scraper/runs' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data @input.json

The response identifies the run. Wait for it to finish, inspect its status, and use its default dataset and key-value store to retrieve results. A successful run can still contain partial or failed records; check the output contract above before continuing downstream.

Coverage & interpretation

Check the result before relying on it.

Questions

Before you build an integration.

What do I need to provide?

postIds is required and accepts numeric strings of 5–40 digits. Full URLs and opaque pfbid identifiers are not accepted. Enable comments and browserFallback only when needed, and review their cost implications.

What should I check in the output?
  • Rows wrap the post inside a result with inputPostId, status, extractionMethod, missingFields, and error.
  • Null means unknown; zero means an explicitly supplied zero. An empty comment array does not prove there are no comments.
How do I budget the run?
  • A complete HTTP result and a complete browser result have different event prices. The browser result charge replaces the HTTP charge; they are not added for the same successful post.
  • Partial, restricted, unavailable, unresolved, and error rows have no result charge. Startup still applies; external proxy charges are separate.

Keep exploring

Practical guides for the next step.