{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Page Posts Scraper",
    "description": "Extract posts from any public Facebook page, including captions, media links, engagement metrics, and posting dates. Perfect for marketers, analysts, and researchers.",
    "version": "0.1",
    "x-build-id": "Wss3bISSMVe5abNUV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~facebook-page-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-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/scrapio~facebook-page-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-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/scrapio~facebook-page-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Pages to scrape",
            "type": "array",
            "description": "📋 Paste **one or more** Facebook page links (full URL) **or** just the **page name**. Example: `https://www.facebook.com/RealMadrid/` or simply `RealMadrid`.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerProfile": {
            "title": "🔢 How many posts per page?",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "🎚️ Cap how many **posts** to collect **for each** page (between **1** and **5000**). This counts **posts only** — comments are additional and controlled separately. Lower = faster; higher = deeper history.",
            "default": 20
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "🗨️ When ON, the actor also fetches the **comments on each post** and writes them as separate rows (`type = comment`, `isChild = true`, `parentId = <post id>`). Comments do **not** count toward the post cap. Default is **off**.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max comments per post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "🎚️ Cap how many **top-level comments** to collect **per post** (a separate counter from the post cap). Example: `maxPostsPerProfile=10` + `maxCommentsPerPost=20` → up to 10 posts and up to 200 comments. Set **0** for unlimited. Default is **20**. Only used when *Include comments* is ON.",
            "default": 20
          },
          "includeReplies": {
            "title": "↩️ Include replies to comments",
            "type": "boolean",
            "description": "🧵 When ON, each comment's **replies** are also collected as their own rows (`type = reply`, `parentId = <comment id>`). Only used when *Include comments* is ON. Default is **off**.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "🔢 Max replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "🎚️ Cap how many **replies** to collect **per comment**. Example: `maxCommentsPerPost=20` + `maxRepliesPerComment=3` → up to 20 comments and up to 60 replies per post. Set **0** for unlimited. Default is **5**. Only used when *Include replies* is ON.",
            "default": 5
          },
          "searchKeywords": {
            "title": "🔍 Must contain (any of)",
            "type": "array",
            "description": "✅ Keep only posts whose text contains **at least one** of these words/phrases (case-insensitive). Leave empty to keep all. Example: `[\"transfer\", \"signing\"]`.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Must NOT contain (any of)",
            "type": "array",
            "description": "❌ Drop posts whose text contains **any** of these words/phrases (case-insensitive). Example: `[\"giveaway\", \"ad\"]`.",
            "items": {
              "type": "string"
            }
          },
          "minReactions": {
            "title": "👍 Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "📈 Keep only posts with **at least** this many total reactions. `0` = no minimum. Default is **0**.",
            "default": 0
          },
          "minComments": {
            "title": "💭 Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "📈 Keep only posts with **at least** this many comments. `0` = no minimum. Default is **0**.",
            "default": 0
          },
          "minShares": {
            "title": "🔁 Minimum shares",
            "minimum": 0,
            "type": "integer",
            "description": "📈 Keep only posts with **at least** this many shares/reshares. `0` = no minimum. Default is **0**.",
            "default": 0
          },
          "startDate": {
            "title": "📆 From date (optional)",
            "type": "string",
            "description": "⏪ Only include posts **on or after** this moment — pick a **calendar date** or something like **“7 days”** / **“2 weeks”**. Leave empty to **start from the beginning** of what we can fetch."
          },
          "endDate": {
            "title": "📆 Until date (optional)",
            "type": "string",
            "description": "⏩ Only include posts **on or before** this moment — **calendar date** or relative (e.g. **“0 days”** = through **end of today**). Leave empty for **no upper limit**."
          },
          "proxyConfiguration": {
            "title": "🌐 Apify Proxy (residential)",
            "type": "object",
            "description": "🏠 **Apify Proxy (default):** Turn **Use Apify Proxy** on — traffic uses **residential** IPs (UI group/type ignored; country still applies when set). **Your own proxies:** Turn it off and add **proxy URLs** — the run tries **your** proxies first, then **falls back** to Apify residential."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}