# Facebook Post Detail Scraper (`axery/facebook-post-detail-scraper`) Actor

Scrape full public Facebook post text, author, timestamp, reactions, comments, and shares by post URL. Fast HTTP-only, no login or API key required.

- **URL**: https://apify.com/axery/facebook-post-detail-scraper.md
- **Developed by:** [Axery](https://apify.com/axery) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 facebook post details scrapeds

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 Post Detail Scraper

Extract **full details for any public Facebook post by URL** — author profile, unclipped text, publishing timestamp, reaction count, comment count, and share count.

Fast, lightweight HTTP-only extraction — **no Facebook login, cookies, or Graph API tokens required**.

***

### ✨ Features

- 📄 **Full Post Text**: Unclipped text body, links, and line breaks.
- 👤 **Author & Page Metadata**: Page or profile name, avatar image URL, and canonical profile URL.
- 🕒 **Accurate Timestamps**: UTC ISO-8601 string and Unix epoch seconds.
- 📊 **Complete Engagement Metrics**: Total reactions, formatted reaction label (e.g. `"7.1K"`), total comments, and total shares.
- 🔗 **Versatile URL Support**: Accepts standard Facebook post URLs (`facebook.com/<page>/posts/<id>`), permalinks, mobile URLs, and short share links.
- 🛡️ **Graceful Error Handling**: Non-existent, deleted, or private posts return a structured `_error` record instead of crashing the run.

***

### 📥 Input Parameters

| Field | Type | Required | Description |
|---|---|:---:|---|
| `posts` | `array` | **Yes** | List of public Facebook post URLs to scrape. |
| `proxyConfiguration` | `object` | No | Optional Apify proxy settings. Datacenter or Residential proxy recommended for high volume. |

#### Example Input

```json
{
  "posts": [
    "https://www.facebook.com/NASA/posts/1524998752328829"
  ]
}
```

***

### 📤 Output Structure

```json
{
  "_input": "https://www.facebook.com/NASA/posts/1524998752328829",
  "_source": "S1-primary",
  "_scrapedAt": "2026-10-21T01:20:31Z",
  "postId": "1524998752328829",
  "id": "fb:1524998752328829",
  "ownerName": "NASA - National Aeronautics and Space Administration",
  "ownerProfileUrl": "https://www.facebook.com/NASA",
  "ownerImageUrl": "https://scontent.fcgk22-1.fna.fbcdn.net/v/...",
  "createdAt": "2026-05-13T17:25:44Z",
  "createdAtEpoch": 1778693144,
  "text": "Planning is underway for our Artemis III mission, which will test the capabilities of NASA's Orion spacecraft...",
  "permalink": "https://www.facebook.com/NASA/posts/1524998752328829/",
  "reactionCount": 7112,
  "reactionCountText": "7.1K",
  "commentCount": 641,
  "shareCount": 678
}
```

***

### 💻 Integration Examples

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "posts": [
        "https://www.facebook.com/NASA/posts/1524998752328829"
    ]
}

run = client.actor("axery/facebook-post-detail-scraper").call(run_input=run_input)

for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"@{post['ownerName']}: {post['reactionCountText']} reactions, {post['commentCount']} comments")
```

# Actor input Schema

## `posts` (type: `array`):

List of public Facebook post URLs to scrape.

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

Optional proxy configuration. Apify Datacenter or Residential proxy recommended for high volume.

## Actor input object example

```json
{
  "posts": [
    "https://www.facebook.com/NASA/posts/1524998752328829"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Extracted public Facebook posts: text, author, reactions, comments, shares, timestamp, and permalink.

# 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 = {
    "posts": [
        "https://www.facebook.com/NASA/posts/1524998752328829"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("axery/facebook-post-detail-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 = { "posts": ["https://www.facebook.com/NASA/posts/1524998752328829"] }

# Run the Actor and wait for it to finish
run = client.actor("axery/facebook-post-detail-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 '{
  "posts": [
    "https://www.facebook.com/NASA/posts/1524998752328829"
  ]
}' |
apify call axery/facebook-post-detail-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axery/facebook-post-detail-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/772Tk2gr8mZm9Bevb/builds/aHlVX1kkq1nsVueI2/openapi.json
