{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Page Posts Scraper - Reactions, Comments & Dates",
    "description": "Scrape the public posts of any Facebook Page, newest first: text, links, date, reactions by type, comments, shares, video views, photos and videos, a top comment and the Page's followers. Date window, filters and monitor mode for new posts. Many Pages per run. No login or cookies.",
    "version": "0.1",
    "x-build-id": "20YVImB0mgwKXUGXY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~facebook-page-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-facebook-page-posts-scraper",
        "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/topapi~facebook-page-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-facebook-page-posts-scraper",
        "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/topapi~facebook-page-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-facebook-page-posts-scraper",
        "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",
        "properties": {
          "startUrls": {
            "title": "📄 Facebook Pages",
            "type": "array",
            "description": "One per line: a Page URL, a username or a numeric id, e.g. \"https://www.facebook.com/NASA\", \"starbucks\", \"100044561550831\". profile.php?id= and /people/<name>/<id> links work too. Groups are not Pages.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "Absolute date (2026-09-01) or relative to now (24 hours, 7 days, 3 weeks, 2 months, 1 year). Facebook starts the timeline at this date; every post is re-checked before delivery. Empty = no lower bound."
          },
          "endDate": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "Absolute date (2026-06-30, the whole day included) or relative (e.g. 30 days). Combine with 'Posted after' for a window, e.g. 2026-01-01 to 2026-06-30. Empty = up to now."
          },
          "postType": {
            "title": "🎞️ Post type",
            "enum": [
              "all",
              "photo",
              "video",
              "link",
              "text",
              "event",
              "share"
            ],
            "type": "string",
            "description": "Keep only one kind of post. On a 150-post test run (Starbucks, The New York Times, Red Bull) 48% were videos, 20% link posts, 15% photos or albums, 15% text only.",
            "default": "all"
          },
          "minReactions": {
            "title": "👍 Minimum reactions",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only posts with at least this many reactions, e.g. 1000 for a Page's hits only. 0 = no minimum.",
            "default": 0
          },
          "minComments": {
            "title": "💬 Minimum comments",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Keep only posts with at least this many comments, e.g. 50 to find the posts people talk about. 0 = no minimum.",
            "default": 0
          },
          "keywordFilter": {
            "title": "🔤 Keyword filter",
            "type": "string",
            "description": "Keep only posts whose text, link title or event name contains this word or phrase, case-insensitive, e.g. \"launch\" or \"sale, discount, promo\" (comma = any of them). Empty = no filter.",
            "default": ""
          },
          "includePostDetails": {
            "title": "💬 Include post details (top comments, video files)",
            "type": "boolean",
            "description": "Opens each post's public page and adds the top comments Facebook shows signed-out (up to about 10: text, author, date, reactions), the video SD/HD file URLs and the view count. Charged as the post-details event only for posts that received details. Every row already carries one top comment for free.",
            "default": false
          },
          "monitorMode": {
            "title": "🔁 Only new posts since the last run",
            "type": "boolean",
            "description": "Remembers, per Page, the newest post already read (in the named key-value store below) and asks Facebook only for newer ones. A scheduled check with nothing new reads a few hundred bytes per Page and delivers nothing.",
            "default": false
          },
          "monitorStoreName": {
            "title": "🗄️ Monitor memory name",
            "pattern": "^[a-zA-Z0-9-]{1,63}$",
            "type": "string",
            "description": "Name of the key-value store that keeps the per-Page memory for monitor mode. Give each separate feed (a client, a Slack channel) its own name. Letters, digits and hyphens.",
            "default": "facebook-page-posts-monitor"
          },
          "maxPostsPerPage": {
            "title": "💯 Max posts per Page",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap per Page after filters (your main cost control; you pay per delivered post). Facebook serves the timeline 3 posts per request after a first page of about 12. 0 = the whole public timeline, up to 2,000 per Page.",
            "default": 20
          },
          "maxItems": {
            "title": "🔢 Max posts in total",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap for the whole run across all Pages. 0 = no total cap (each Page is still capped above).",
            "default": 0
          },
          "compact": {
            "title": "🤖 Compact output",
            "type": "boolean",
            "description": "Core fields only (post_id, type, url, message, published_at, Page name/URL/followers, reactions, comments, shares, views, engagement rate, image, video, external_url, hashtags): sized for AI agents and MCP clients.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌍 Proxy",
            "type": "object",
            "description": "Residential US by default: Facebook rate-limits the timeline on Apify's datacenter IPs, and hides news Pages from some countries. The actor rotates to a fresh session when Facebook refuses one.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "maxConcurrency": {
            "title": "⚡ Pages in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many Pages are read at once, each on its own session. 3 is a safe default; raise to 6-8 for long Page lists.",
            "default": 3
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}