All API Integration Kits Category: Social Media Data Updated: 2026-11-26

Facebook Posts Scraper API

What is the Facebook Posts Scraper API on RapidAPI? Facebook Posts Scraper API returns structured JSON posts from public Facebook pages and profiles without a Facebook account, session cookies, or browser setup. Send a single POST request with one or more page URLs, handles, or numeric IDs and receive up to 20 posts per request, including post text, publication timestamp, total reactions and breakdown by type (like, love, care, haha, wow, sad, angry), comment count, share count, video views, image URLs, video URLs, and shared post metadata. Plans start with a free Basic tier (4 requests/month, hard-capped) and scale to Pro ($25/mo, 449 requests), Ultra ($75/mo, 1,348 requests), and Mega ($150/mo, 2,696 requests).

Unlike multi-endpoint Facebook suites such as Facebook Pages Scraper ($49/mo Pro) or Facebook Scraper API that split posts, reactions, and media across separate calls, this endpoint returns full post text, reaction breakdowns, video views, and media URLs in one POST call with built-in postedAfter and postedBefore date filters at no extra charge.

Copy docs for LLM (Claude, Cursor, ChatGPT)

Paste this single block into Cursor, Claude, or ChatGPT to generate a working client without guessing headers or schema fields.

# Facebook Posts Scraper API — LLM Integration Reference

- **RapidAPI Listing**: https://rapidapi.com/benthepythondev0/api/facebook-posts-scraper2
- **Base URL**: `https://facebook-posts-scraper2.p.rapidapi.com`
- **Primary Endpoint**: `POST /`
- **Auth Headers**: `x-rapidapi-host: facebook-posts-scraper2.p.rapidapi.com` and `x-rapidapi-key: <RAPIDAPI_KEY>`
- **Plans**: BASIC $0/mo (4 reqs), PRO $25/mo (449 reqs), ULTRA $75/mo (1,348 reqs), MEGA $150/mo (2,696 reqs)
- **Updated**: 2026-11-26

## Summary
Facebook Posts Scraper API returns structured JSON posts from public Facebook pages and profiles without a Facebook account, session cookies, or browser setup. Send a single POST request with one or more page URLs, handles, or numeric IDs and receive up to 20 posts per request, including post text, publication timestamp, total reactions and breakdown by type (like, love, care, haha, wow, sad, angry), comment count, share count, video views, image URLs, video URLs, and shared post metadata. Plans start with a free Basic tier (4 requests/month, hard-capped) and scale to Pro ($25/mo, 449 requests), Ultra ($75/mo, 1,348 requests), and Mega ($150/mo, 2,696 requests).

## Request Body Fields (`POST /`)
- `pages` (array): Links of public pages or profiles (https://www.facebook.com/NASA), their names (NASA) or numeric ids. Several pages are read side by side. A page that Facebook shows only to logged-in users (age or country limits) is reported and costs nothing.
- `maxResults` (integer): Posts to save for each page, newest first. A request returns 20 rows at most.
- `postedAfter` (string): Lower date limit: a day (YYYY-MM-DD) or a period back from now such as 3 days, 2 weeks or 6 months.
- `postedBefore` (string): Upper date limit: a day (YYYY-MM-DD, included) or a period back from now. The read starts at that day instead of paging down to it, so a month from two years ago costs only that month.

## Example Request (cURL)
```bash
curl --request POST \
  --url 'https://facebook-posts-scraper2.p.rapidapi.com/' \
  --header 'Content-Type: application/json' \
  --header 'x-rapidapi-host: facebook-posts-scraper2.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --data '{"pages": ["https://www.facebook.com/NASA"]}'
```

## Example Response Item (Real Output)
```json
{
  "postId": "1685704526258250",
  "url": "https://www.facebook.com/NASA/posts/pfbid02w3sbVBJsxz81chAKkJ1PpQGmzd5VcKJv8qT7s8A4x12pHgsPtFRYN18MQHQ4pUNyl",
  "pageId": "100044561550831",
  "pageName": "NASA - National Aeronautics and Space Administration",
  "pageUrl": "https://www.facebook.com/NASA",
  "type": "photo",
  "text": "Tethys and Dione showed up for the group photo!\n \nIn addition to the two moons shown here, Saturn has a whole entourage of natural satellites—more than any o...",
  "title": null,
  "createdAt": "2026-11-12T20:16:47+00:00",
  "authorName": "NASA - National Aeronautics and Space Administration",
  "authorId": "100044561550831",
  "authorUrl": "https://www.facebook.com/NASA",
  "reactions": 3787,
  "reactionCounts": {
    "like": 2739,
    "love": 906,
    "care": 67,
    "wow": 53,
    "haha": 15,
    "sad": 4,
    "angry": 3
  },
  "comments": 145,
  "shares": 366,
  "videoViews": null,
  "imageUrls": [
    "https://scontent-bos5-1.xx.fbcdn.net/v/t39.99422-6/903234689_961209693445682_3475448322653156004_n.png?stp=dst-jpg_tt6&cstp=mx971x855&ctp=s590x590&_nc_cat=10..."
  ],
  "videoUrl": null,
  "videoSeconds": null,
  "thumbnailUrl": null,
  "linkUrl": null,
  "isShare": false,
  "sharedPost": null,
  "position": 1,
  "scrapedAt": "2026-11-16T00:31:20.801421+00:00"
}
```

Quickstart: cURL, Python & Node.js

Endpoint: POST https://facebook-posts-scraper2.p.rapidapi.com/

cURL
curl --request POST \
  --url 'https://facebook-posts-scraper2.p.rapidapi.com/' \
  --header 'Content-Type: application/json' \
  --header 'x-rapidapi-host: facebook-posts-scraper2.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --data '{"pages": ["https://www.facebook.com/NASA"]}'
Python (requests)
import os
import requests

url = "https://facebook-posts-scraper2.p.rapidapi.com/"
payload = {
  "pages": [
    "https://www.facebook.com/NASA"
  ]
}
headers = {
    "Content-Type": "application/json",
    "x-rapidapi-host": "facebook-posts-scraper2.p.rapidapi.com",
    "x-rapidapi-key": os.environ["RAPIDAPI_KEY"],
}
response = requests.post(url, json=payload, headers=headers, timeout=120)
response.raise_for_status()
rows = response.json()
print(f'Returned {len(rows)} rows', rows[0] if rows else None)
Node.js (fetch)
const url = "https://facebook-posts-scraper2.p.rapidapi.com/";
const response = await fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-rapidapi-host": "facebook-posts-scraper2.p.rapidapi.com",
    "x-rapidapi-key": process.env.RAPIDAPI_KEY,
  },
  body: JSON.stringify({"pages": ["https://www.facebook.com/NASA"]}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const rows = await response.json();
console.log(rows.length, rows[0]);

1-Click n8n HTTP Request Template

Copy this workflow JSON and paste it directly into an n8n canvas, or download n8n-workflow.json.

n8n Workflow JSON
{
  "name": "Facebook Posts Scraper API (RapidAPI)",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger-1",
      "name": "When clicking Execute workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://facebook-posts-scraper2.p.rapidapi.com/",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-rapidapi-host",
              "value": "facebook-posts-scraper2.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "={{ $env.RAPIDAPI_KEY || 'YOUR_RAPIDAPI_KEY' }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"pages\": [\n    \"https://www.facebook.com/NASA\"\n  ]\n}",
        "options": {
          "timeout": 120000
        }
      },
      "id": "rapidapi-http-1",
      "name": "Call Facebook Posts Scraper API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        300
      ]
    }
  ],
  "connections": {
    "When clicking Execute workflow": {
      "main": [
        [
          {
            "node": "Call Facebook Posts Scraper API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "rapidapiListing": "https://rapidapi.com/benthepythondev0/api/facebook-posts-scraper2"
  }
}

MCP Tool Definition for Claude & Cursor

Register this tool schema in your custom MCP server or connect via the hosted Apify MCP URL (download mcp-tool.json).

MCP Tool & Server Config
{
  "tool": {
    "name": "scrape_facebook_posts",
    "description": "Facebook posts scraper for public pages and profiles: text, date, reactions by type, comments, shares, video views, pictures, video and link of every post, newest first. Up to 20 results per request, as JSON.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "pages": {
          "title": "Facebook pages",
          "maxItems": 20,
          "type": "array",
          "description": "Links of public pages or profiles (https://www.facebook.com/NASA), their names (NASA) or numeric ids. Several pages are read side by side. A page that Facebook shows only to logged-in users (age or country limits) is reported and costs nothing.",
          "default": [
            "https://www.facebook.com/NASA"
          ],
          "items": {
            "type": "string"
          }
        },
        "maxResults": {
          "title": "Maximum posts per page",
          "minimum": 1,
          "maximum": 20,
          "type": "integer",
          "description": "Posts to save for each page, newest first. A request returns 20 rows at most.",
          "default": 15
        },
        "postedAfter": {
          "title": "Only posts since",
          "type": "string",
          "description": "Lower date limit: a day (YYYY-MM-DD) or a period back from now such as 3 days, 2 weeks or 6 months.",
          "default": ""
        },
        "postedBefore": {
          "title": "Only posts until",
          "type": "string",
          "description": "Upper date limit: a day (YYYY-MM-DD, included) or a period back from now. The read starts at that day instead of paging down to it, so a month from two years ago costs only that month.",
          "default": ""
        }
      }
    },
    "x-rapidapi": {
      "method": "POST",
      "url": "https://facebook-posts-scraper2.p.rapidapi.com/",
      "headers": {
        "Content-Type": "application/json",
        "x-rapidapi-host": "facebook-posts-scraper2.p.rapidapi.com",
        "x-rapidapi-key": "${RAPIDAPI_KEY}"
      },
      "exampleInput": {
        "pages": [
          "https://www.facebook.com/NASA"
        ]
      }
    }
  },
  "claudeDesktopAndCursorHostedMcp": {
    "mcpServers": {
      "facebook-posts-scraper": {
        "url": "https://mcp.apify.com/?tools=benthepythondev/facebook-posts-scraper",
        "headers": {
          "Authorization": "Bearer YOUR_APIFY_TOKEN"
        }
      }
    }
  }
}

Request Parameters & Real JSON Response

Full machine-readable specification: openapi-3.1.json (OpenAPI 3.1.0).

FieldTypeDescription
pagesarrayLinks of public pages or profiles (https://www.facebook.com/NASA), their names (NASA) or numeric ids. Several pages are read side by side. A page that Facebook shows only to logged-in users (age or country limits) is reported and costs nothing.
maxResultsintegerPosts to save for each page, newest first. A request returns 20 rows at most.
postedAfterstringLower date limit: a day (YYYY-MM-DD) or a period back from now such as 3 days, 2 weeks or 6 months.
postedBeforestringUpper date limit: a day (YYYY-MM-DD, included) or a period back from now. The read starts at that day instead of paging down to it, so a month from two years ago costs only that month.

Real JSON Response Sample

201 Created (1 item of array)
{
  "postId": "1685704526258250",
  "url": "https://www.facebook.com/NASA/posts/pfbid02w3sbVBJsxz81chAKkJ1PpQGmzd5VcKJv8qT7s8A4x12pHgsPtFRYN18MQHQ4pUNyl",
  "pageId": "100044561550831",
  "pageName": "NASA - National Aeronautics and Space Administration",
  "pageUrl": "https://www.facebook.com/NASA",
  "type": "photo",
  "text": "Tethys and Dione showed up for the group photo!\n \nIn addition to the two moons shown here, Saturn has a whole entourage of natural satellites—more than any o...",
  "title": null,
  "createdAt": "2026-11-12T20:16:47+00:00",
  "authorName": "NASA - National Aeronautics and Space Administration",
  "authorId": "100044561550831",
  "authorUrl": "https://www.facebook.com/NASA",
  "reactions": 3787,
  "reactionCounts": {
    "like": 2739,
    "love": 906,
    "care": 67,
    "wow": 53,
    "haha": 15,
    "sad": 4,
    "angry": 3
  },
  "comments": 145,
  "shares": 366,
  "videoViews": null,
  "imageUrls": [
    "https://scontent-bos5-1.xx.fbcdn.net/v/t39.99422-6/903234689_961209693445682_3475448322653156004_n.png?stp=dst-jpg_tt6&cstp=mx971x855&ctp=s590x590&_nc_cat=10..."
  ],
  "videoUrl": null,
  "videoSeconds": null,
  "thumbnailUrl": null,
  "linkUrl": null,
  "isShare": false,
  "sharedPost": null,
  "position": 1,
  "scrapedAt": "2026-11-16T00:31:20.801421+00:00"
}

RapidAPI Pricing Plans

TierPriceRequests / MonthLimit Type
BASIC$0/mo4Hard limit
PRO$25/mo449Soft limit
ULTRA$75/mo1,348Soft limit
MEGA$150/mo2,696Soft limit

Questions & Answers

Do I need a Facebook login, cookies, or OAuth app review?

No. The API reads public Facebook pages and profiles as a logged-out visitor. You only send your RapidAPI key in the x-rapidapi-key header.

How many Facebook posts does one API request return?

Up to 20 posts per request, newest first. Use postedAfter and postedBefore (YYYY-MM-DD or relative periods like '7 days') to slice a specific date window.

Does it return reactions by type and video views?

Yes. Every post object includes total reactions, reactionCounts (like, love, care, haha, wow, sad, angry), comments, shares, videoViews, imageUrls, and videoUrl.

How do I connect Facebook Posts Scraper to n8n or Claude/Cursor?

Import the 1-click n8n HTTP Request workflow JSON below into n8n and paste your RapidAPI key, or register the MCP tool definition / Apify MCP server URL in Claude Desktop or Cursor.

What does Facebook Posts Scraper cost on RapidAPI?

Basic is $0/month (4 requests, hard limit so you never get surprise overages). Paid tiers are Pro at $25/month (449 requests), Ultra at $75/month (1,348 requests), and Mega at $150/month (2,696 requests).