{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper - Pages & Groups, No Login",
    "description": "Scrape posts from Facebook pages, profiles AND groups without cookies or a Facebook account. Text, timestamps, reactions, comment and share counts, media. Filter by date range at no extra cost, and get a per-target report of whether the range was actually covered.",
    "version": "0.0",
    "x-build-id": "mzitXNAuQudLmtEoF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/a.actors~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-a.actors-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/a.actors~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-a.actors-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/a.actors~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-a.actors-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Facebook pages, profiles or groups",
            "type": "array",
            "description": "Public page, profile or group URLs. profile.php?id=... links work, and so do /groups/<id> and /groups/<vanity-name>. A private group cannot be read without an account and is reported as an error row rather than silently skipped - you are not charged for it. ⚠️ This property deliberately has a prefill (the example shown in the console form) but NO default: Apify injects schema defaults into API runs, and because startUrls is also `required`, a default SATISFIES the requirement instead of failing the run - so an API call that forgot its targets silently scraped the example page and billed for it. Without the default the same call fails loudly. Found 2026-09-29 on the TikTok actor, where it silently added a second account to every run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resultsLimit": {
            "title": "Max posts per target",
            "minimum": 1,
            "type": "integer",
            "description": "How many posts to collect per page or group before stopping. Groups return roughly 29 posts in the first request and page back more slowly after that, so deep group pulls take longer than page pulls of the same size.",
            "default": 30
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "ISO date, YYYY-MM-DD. Posts older than this are dropped and pagination stops early once the feed passes the date. No extra charge for filtering. Posts that carry no timestamp are excluded whenever a date bound is set, because they cannot be shown to be in range.",
            "default": ""
          },
          "onlyPostsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "ISO date, YYYY-MM-DD. Upper bound, for pulling a closed date range.",
            "default": ""
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Only return posts whose text matches one of these terms. Facebook's page-timeline accepts no search term, so this is a filter over the feed rather than a server-side search: the feed is still paged to the scan depth below, and only the output shrinks. Because of that, keyword runs are billed per post SCANNED as well as per post returned - see Pricing in the README.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "'any' keeps a post matching at least one term; 'all' requires every term.",
            "default": "any"
          },
          "keywordWholeWord": {
            "title": "Whole-word keyword matching",
            "type": "boolean",
            "description": "On by default: a term will not match inside a longer word. Written for languages that glue prefixes onto the stem, so an Arabic term still matches when prefixed with ال/و/ب/ل but not when it is merely a substring of a different word. Turn off for plain substring matching.",
            "default": true
          },
          "scanLimit": {
            "title": "Scan depth (keyword search only)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many posts per target to read before stopping when keywords are set. 'Max posts per target' then caps how many MATCHES come back. This is the number that drives the cost of a keyword run. Ignored when no keywords are given.",
            "default": 300
          },
          "windowedFeed": {
            "title": "Deep historical pull",
            "type": "boolean",
            "description": "Ask Facebook for the date range directly instead of paging back from the newest post. Reaches much further into the past on pages with a long history. Falls back to normal paging automatically if the page does not support it. Turn this on when you want an old date range rather than recent posts.",
            "default": false
          },
          "countryCode": {
            "title": "Country to browse from",
            "type": "string",
            "description": "ISO country code for the exit location, e.g. US, GB, DE. Worth matching to the page's own audience for geo-restricted content.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}