{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper & New Post Monitor",
    "description": "No login or cookies. Get the posts of Facebook business Pages, the newest, a date range or the full history, or any post by its link: text, exact reactions by type, comments, shares, video views, photos and videos. Monitor Pages for new posts with Slack, Discord or Telegram alerts.",
    "version": "0.2",
    "x-build-id": "ewmzPkZ8pp29qXoIG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydedata~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydedata-facebook-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/hydedata~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hydedata-facebook-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/hydedata~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hydedata-facebook-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": {
          "urls": {
            "title": "Facebook Pages and posts",
            "type": "array",
            "description": "One per line, mixed as you like. A Page (https://www.facebook.com/katzsdeli, its username katzsdeli or its numeric ID) returns its newest posts: 9 unless a limit or a start date below says otherwise. A link to a post, reel or video returns that one post with exact counts: /posts/..., permalink.php, /reel/..., /videos/..., /watch/?v=... and links from the Share button all work. A business website (katzsdelicatessen.com) is read for its Facebook Page first. Page names can't be looked up, so paste a link.",
            "items": {
              "type": "string"
            }
          },
          "urlsFileUrl": {
            "title": "Or upload a list",
            "type": "string",
            "description": "A text or CSV file with Page links, post links, usernames, IDs or websites. Every Facebook link in the file is used; with none, the first column of each line is. Upload a file or paste a link to one."
          },
          "maxPostsPerPage": {
            "title": "Max posts per Page",
            "minimum": 1,
            "type": "integer",
            "description": "How many of each Page's posts to read, newest first. Any number works: 500 reads a Page's last 500 posts. Leave empty for the 9 newest, or for every post since \"Posts newer than\" when that's set. The other filters pick among the posts read. Monitor mode reads up to 9."
          },
          "maxPostsTotal": {
            "title": "Max posts in total",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of posts delivered by the whole run, across every Page and post link. Leave empty for no limit. Posts past it are never read, delivered or charged."
          },
          "newerThan": {
            "title": "Posts newer than",
            "type": "string",
            "description": "Only posts published after this. A date (2026-11-01, the start of that day in UTC) or a period counted back from the run: 7 days, 2 weeks, 3 months. With no limit above, every post since then is read."
          },
          "olderThan": {
            "title": "Posts older than",
            "type": "string",
            "description": "Only posts published before this, in the same formats. With \"Posts newer than\" it makes a date range, and only that range is read. On its own it gives the 9 newest posts from before that date, or as many as \"Max posts per Page\" says."
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Only posts of these types. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "video",
                "reel",
                "link",
                "shared",
                "other"
              ],
              "enumTitles": [
                "Text only",
                "Photo or album",
                "Video",
                "Reel",
                "Link",
                "Shared post",
                "Other (events and the like)"
              ]
            }
          },
          "minReactions": {
            "title": "Min reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many reactions."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many comments."
          },
          "minShares": {
            "title": "Min shares",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many shares."
          },
          "includeKeywords": {
            "title": "Only posts containing",
            "type": "array",
            "description": "Keep a post when its text, or the title of the link it shares, contains at least one of these words or phrases. Upper and lower case don't matter.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Skip posts containing",
            "type": "array",
            "description": "Drop a post when its text, or the title of the link it shares, contains any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Only posts with these hashtags",
            "type": "array",
            "description": "Keep a post when it carries at least one of these hashtags, with or without the #.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "compact",
              "media"
            ],
            "type": "string",
            "description": "Full has every field. Compact keeps what's needed to read a post and judge how it did, and leaves empty fields out: made for AI agents and MCP clients, where every field costs tokens. Media keeps a post's pictures and videos and delivers only posts that have any. Same price in every format.",
            "default": "full"
          },
          "includePageSummary": {
            "title": "Add a summary row per Page",
            "type": "boolean",
            "description": "One extra row per Page over the posts read: posts per week, average and median engagement, engagement rate, share of video and the best post. Not charged.",
            "default": false
          },
          "includeTranscript": {
            "title": "Add video transcripts",
            "type": "boolean",
            "description": "For posts with a video that has captions, add the captions as plain text in a transcript field. They're Facebook's own captions, often auto-generated. A video without captions gets none. Not charged.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (new posts only)",
            "type": "boolean",
            "description": "Remembers the posts of each Page from run to run and only outputs posts it hasn't seen. Use with a Schedule. The first run returns the posts a Page has now as the baseline, unless you turn that off below. A Page with nothing new outputs nothing and costs a small check fee instead of a Page read. Post links are always looked up, monitor mode or not.",
            "default": false
          },
          "skipBaseline": {
            "title": "First run: remember only",
            "type": "boolean",
            "description": "On the first run for a Page, remember its current posts without outputting them, so alerts start with the next new post. The Page read is still charged, the posts aren't.",
            "default": false
          },
          "trackEngagement": {
            "title": "Also track engagement of known posts",
            "type": "boolean",
            "description": "In monitor mode, read every post again each run and output a post again when its reactions, comments, shares or video views changed, with the old and new numbers. A post that was held back by a minimum above is delivered once it passes it. Every run reads each Page in full, so it costs a Page read per run, plus an add-on fee per post with new counts.",
            "default": false
          },
          "minEngagementChangePercent": {
            "title": "Min engagement change (%)",
            "minimum": 0,
            "type": "number",
            "description": "With engagement tracking on, report a count once it moved by at least this percent since it was last reported.",
            "default": 10
          },
          "notifyWebhookUrl": {
            "title": "Send results to a webhook (optional)",
            "type": "string",
            "description": "Paste a Discord or Slack incoming webhook URL to get each run's posts as a message: the Page, the post's text, link and counts, and for a post with new counts what changed (e.g. Reactions 1,200 → 1,560 (+30%)). Any other URL gets the rows as JSON. Only sent when the run delivers something, so quiet monitor runs stay silent."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Also send alerts to Telegram. Create a bot with @BotFather and paste its token here."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "The chat, group or channel ID the bot posts to."
          },
          "stateStoreName": {
            "title": "Monitor state store name",
            "type": "string",
            "description": "Named key-value store that keeps monitor memory between runs. Use different names to run independent monitors.",
            "default": "facebook-posts-monitor-state"
          },
          "stateRetentionDays": {
            "title": "Forget Pages after (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Pages not checked for this many days are dropped from monitor memory.",
            "default": 90
          },
          "maxConcurrency": {
            "title": "Sessions at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Proxy sessions reading at the same time. Small runs use fewer on their own. Lower it if inputs come back as failed.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Keep this on RESIDENTIAL. Facebook sends datacenter IPs to its login page.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}