# Facebook Post Scraper | Webhook Support (`devninja/facebook-post-scraper-webhook-support`) Actor

This actor helps you collect Facebook posts quickly.
You can set it to run automatically (every hour, day, or month) through Apify Schedule, and it will send the collected data straight to your server using a webhook—no need to check manually.

- **URL**: https://apify.com/devninja/facebook-post-scraper-webhook-support.md
- **Developed by:** [Devinja](https://apify.com/devninja) (community)
- **Categories:** Developer tools, Automation, Social media
- **Stats:** 34 total users, 0 monthly users, 0.0% runs succeeded, 6 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$10.50 / 1,000 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Facebook Post Scraper with Webhook Support

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)

This actor helps you collect Facebook posts quickly. You can set it to run automatically (every hour, day, or month) through Apify Schedule, and it will send the collected data straight to your server using a webhook—no need to check manually.


### Did you know?

**Did you know you can fully automate your data collection with Apify?**
With built-in scheduling, you can configure Facebook Post Scraper with Webhook Support
to run automatically—whether **hourly**, **daily**, or **monthly**—based on your business needs.
Even better, this actor supports **webhook integration**, allowing you to instantly send crawling results directly to your own API or system in real time. This means:
- Faster decision-making
- Streamlined workflows
- Less manual effort


### **Key Features**

- **Fast and Efficient**: Collects Facebook post data quickly without slowing down
- **Comprehensive Insights**: Gathers post content, author details, images, and engagement numbers
- **Scalable**: Designed to handle large volumes of data smoothly
- **Reliable for Business Use**: Built to run consistently with smart error handling

### Use Cases

- **Social Media Monitoring**: Stay updated on brand mentions and public sentiment
- **Market Research**: Understand trends and what people are talking about
- **Content Analysis**: See what types of posts go viral and why
- **Competitor Intelligence**: Keep an eye on your competitors' social media activity
- **Academic Research**: Gather Facebook data for studies and reports
- **Trend Analysis**: Spot rising topics, hashtags, and discussions early


### Input Parameters

| Property           | Description                                                                               |
|--------------------|-------------------------------------------------------------------------------------------|
| `query`            | The search term to look for in Facebook posts. Supports multiple comma-delimited queries. |
| `location`         | Optional: search results may potentially include the specified location.                  |
| `search_type`      | Type of content to search for (`posts` ,`videos`, `reels`).                               |
| `start_date`       | Start date for filtering posts (format: YYYY-MM-DD).                                      |
| `end_date`         | End date for filtering posts (format: YYYY-MM-DD).                                        |
| `max_posts`        | Maximum number of posts to extract (up to 1500).                                          |
| `recent_posts`     | Focus on recent posts; affects sorting of results.                                        |
| `webhook_url`      | URL where results will be sent after crawling completes.                                  |
| `webhook_token`    | Token used to authorize the webhook request (optional).                                   |
| `webhook_method`   | HTTP method to use when sending data to your webhook (`POST` or `PUT`).                   |


### Related Actors

Explore our comprehensive suite of data extraction and AI-powered tools:

#### 📄 Facebook & Social Media Scrapers

##### [Facebook Post Scraper](https://apify.com/devninja/facebook-post-scraper)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/facebook-post-scraper)

A reliable Facebook Post Scraper for extracting public posts from Facebook pages, profiles, and groups at scale. This smart scraping agent supports keyword-based filtering, date range selection, mobile-optimized scraping, and built-in anti-bot detection handling for better reliability.

##### [Facebook Comments Scraper | Webhook Support](https://apify.com/devninja/facebook-comments-scraper-webhook-support)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/facebook-comments-scraper-webhook-support)

This Apify actor is designed for businesses, teams, and individuals—supporting video URLs, post URLs, photo URLs, and reels—without the hassle of manual scraping or complex setups, making it perfect for analyzing conversations, monitoring engagement, and gathering insights from Facebook.

##### [Facebook Profiles and Pages Scraper](https://apify.com/devninja/facebook-profiles-pages-scraper)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/facebook-profiles-pages-scraper)

A powerful data extraction tool for collecting posts, comments, reactions, and media from public Facebook profiles and pages. Perfect for social media analysis, content research, and market intelligence.

##### [Facebook Groups Scraper](https://apify.com/devninja/facebook-groups-scraper)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/facebook-groups-scraper)

Extract posts, reactions, and media from public Facebook groups for social media analysis and market research.

#### 📄 AI-Powered Tools

##### [AI Facebook Post Analyzer](https://apify.com/devninja/ai-facebook-post-analyzer)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/ai-facebook-post-analyzer)

This actor transforms Facebook posts into actionable business insights. Search for posts about any topic, analyze them with AI, and get intelligent answers to your business questions. Perfect for market research, brand monitoring, trend analysis, and competitive intelligence.

##### [AI Document Assistant](https://apify.com/devninja/ai-document-assistant)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/ai-document-assistant)

This actor analyzes uploaded documents using AI to extract and process information. It helps businesses quickly get answers from their documents and automate decision-making.

##### [AI Humor and Quotes Generator](https://apify.com/devninja/ai-humor-quotes-generator)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/ai-humor-quotes-generator)

Generate original jokes, inspirational quotes, or a mix of both based on your keywords. Perfect for content creators, social media managers, greeting cards, presentations, and entertainment apps. Uses advanced prompt engineering to create family-friendly, engaging content.

#### 📄 Specialized Scrapers

##### [Streem Article Scraper](https://apify.com/devninja/streem-article-scraper)
[![Rating](https://img.shields.io/badge/Rating-5.0-green)](https://apify.com/devninja/streem-article-scraper)

Extract full-text articles and metadata from Streem article links with ease. This actor is built for reliability and scalability—simply provide a list of Streem URLs, and it will crawl each page, clean the content, and return structured results.

---

*All actors are developed by [Devinja](https://apify.com/devninja) and maintained with regular updates for optimal performance and reliability.*

# Actor input Schema

## `query` (type: `string`):

Supports multiple comma-delimited queries. Each query will be searched separately. Example: 'technology, movies'.
## `location` (type: `string`):

Optional: search results may potentially include the specified location
## `search_type` (type: `string`):

Type of content to search for
## `max_posts` (type: `integer`):

Maximum number of posts to extract Per Query i.e technology = 10, movies = 10
## `recent_posts` (type: `boolean`):

Focus on recent posts (affects search sorting)
## `webhook_url` (type: `string`):

URL where results will be sent after scraping completes (optional)
## `webhook_token` (type: `string`):

Bearer token for webhook authentication (optional but recommended)
## `webhook_method` (type: `string`):

HTTP method to use when sending data to webhook
## `start_date` (type: `string`):

Start date for filtering posts (YYYY-MM-DD format)
## `end_date` (type: `string`):

End date for filtering posts (YYYY-MM-DD format)

## Actor input object example

```json
{
  "query": "technology, movies",
  "location": "Vancouver, British Columbia",
  "search_type": "posts",
  "max_posts": 50,
  "recent_posts": false,
  "webhook_url": "https://your-api.com/webhook",
  "webhook_token": "your-secret-token",
  "webhook_method": "POST"
}
````

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("devninja/facebook-post-scraper-webhook-support").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call devninja/facebook-post-scraper-webhook-support --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=devninja/facebook-post-scraper-webhook-support",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Post Scraper | Webhook Support",
        "description": "This actor helps you collect Facebook posts quickly.\nYou can set it to run automatically (every hour, day, or month) through Apify Schedule, and it will send the collected data straight to your server using a webhook—no need to check manually.",
        "version": "1.0",
        "x-build-id": "JTEGxR74Q0qlT0hMR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/devninja~facebook-post-scraper-webhook-support/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-devninja-facebook-post-scraper-webhook-support",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/devninja~facebook-post-scraper-webhook-support/runs": {
            "post": {
                "operationId": "runs-sync-devninja-facebook-post-scraper-webhook-support",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/devninja~facebook-post-scraper-webhook-support/run-sync": {
            "post": {
                "operationId": "run-sync-devninja-facebook-post-scraper-webhook-support",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "max_posts",
                    "query",
                    "search_type"
                ],
                "properties": {
                    "query": {
                        "title": "🟢 Search Queries i.e technology, movies",
                        "maxLength": 100,
                        "type": "string",
                        "description": "Supports multiple comma-delimited queries. Each query will be searched separately. Example: 'technology, movies'.",
                        "default": "technology"
                    },
                    "location": {
                        "title": "🟢 Search Location",
                        "maxLength": 40,
                        "type": "string",
                        "description": "Optional: search results may potentially include the specified location",
                        "default": ""
                    },
                    "search_type": {
                        "title": "🟢 Search Type",
                        "enum": [
                            "posts",
                            "videos",
                            "reels"
                        ],
                        "type": "string",
                        "description": "Type of content to search for",
                        "default": "posts"
                    },
                    "max_posts": {
                        "title": "🟢 Maximum Posts Per Query",
                        "minimum": 1,
                        "maximum": 1500,
                        "type": "integer",
                        "description": "Maximum number of posts to extract Per Query i.e technology = 10, movies = 10",
                        "default": 50
                    },
                    "recent_posts": {
                        "title": "Recent Posts Only",
                        "type": "boolean",
                        "description": "Focus on recent posts (affects search sorting)",
                        "default": false
                    },
                    "webhook_url": {
                        "title": "Webhook URL",
                        "pattern": "^$|^https?://",
                        "type": "string",
                        "description": "URL where results will be sent after scraping completes (optional)"
                    },
                    "webhook_token": {
                        "title": "Webhook Token",
                        "type": "string",
                        "description": "Bearer token for webhook authentication (optional but recommended)"
                    },
                    "webhook_method": {
                        "title": "Webhook HTTP Method",
                        "enum": [
                            "POST",
                            "PUT"
                        ],
                        "type": "string",
                        "description": "HTTP method to use when sending data to webhook",
                        "default": "POST"
                    },
                    "start_date": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Start date for filtering posts (YYYY-MM-DD format)"
                    },
                    "end_date": {
                        "title": "End Date",
                        "type": "string",
                        "description": "End date for filtering posts (YYYY-MM-DD format)"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
