{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper — Engagement Analytics Report",
    "description": "📘 Facebook Posts Scraper — Engagement Analytics Report extracts public posts, reactions, comments, timestamps, media & links from pages/groups at scale. ⚙️ Export JSON/CSV, API-ready. 🔎 Perfect for social listening, competitor analysis & content research—privacy-safe and TOS-compliant. 🚀",
    "version": "0.1",
    "x-build-id": "VBjy5MyaYntlhOYYl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapium~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapium-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/scrapium~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapium-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/scrapium~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapium-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": {
          "pageUrls": {
            "title": "📘 Facebook Page URLs or usernames",
            "type": "array",
            "description": "One or more Facebook **page** targets to analyze. Accepts full URLs (`https://www.facebook.com/nytimes/`) or bare usernames (`nytimes`, `Cristiano`). Each page is scored independently. (The base `startUrls` key is also accepted.)",
            "items": {
              "type": "string"
            }
          },
          "postsPerPage": {
            "title": "🔢 Posts to analyze per page",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many recent posts to pull and score per page. Larger samples give steadier averages, best-hour and cadence figures. (Accepts the base `maxPosts` key.)",
            "default": 10
          },
          "minEngagement": {
            "title": "🎯 Minimum engagement score",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts whose engagementScore ( likes + 2×comments + 3×shares ) is below this value before they are emitted or averaged. Set to 0 to keep every post; raise it to focus the analytics on posts that actually landed.",
            "default": 0
          },
          "includeSummary": {
            "title": "🧮 Emit a per-page summary row",
            "type": "boolean",
            "description": "When ON, each page gets one extra row (rowType=`summary`) with avgEngagement, avgReactions, avgComments, avgShares, bestPostingHour (UTC), postingCadenceDays and topPostUrl. Turn OFF to emit only the scored post rows.",
            "default": true
          },
          "fetchVideoTranscripts": {
            "title": "🎬 Include video transcripts",
            "type": "boolean",
            "description": "Extract closed-caption/transcript text from video & reel posts into `captionText`. Off by default for faster runs. (Accepts the base `includeVideoTranscript` key.)",
            "default": false
          },
          "postsFrom": {
            "title": "📅 Only posts newer than",
            "type": "string",
            "description": "Limit the sample to posts **after** this date. Absolute (e.g. `2024-01-01`) or relative (e.g. `7` days, `2` months). Leave empty for no lower bound. (Accepts the base `oldestPostDateUnified` key.)"
          },
          "postsUntil": {
            "title": "📆 Only posts older than",
            "type": "string",
            "description": "Limit the sample to posts **before** this date. Absolute (e.g. `2024-12-31`) or relative (e.g. `0` for today). Leave empty for no upper bound. (Accepts the base `newestPostDate` key.)"
          },
          "timeoutMode": {
            "title": "⏱️ Timeout mode",
            "enum": [
              "auto",
              "manual"
            ],
            "type": "string",
            "description": "How the per-page time budget is set. **Auto** scales it from the requested sample size; **Manual** uses your custom value below.",
            "default": "auto"
          },
          "targetTimeoutSecs": {
            "title": "⏳ Per-page timeout (seconds)",
            "minimum": 60,
            "maximum": 72000,
            "type": "integer",
            "description": "Used only when Timeout mode is **Manual**. The actor stops a page once this many seconds elapse.",
            "default": 1200
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy settings",
            "type": "object",
            "description": "The actor prefers Apify Residential proxy for higher success rates and falls back to Datacenter. You may supply custom proxy URLs here."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}