{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Group Posts and Details Scraper with Comments",
    "description": "Facebook Group Posts and Details Scraper with Comments extracts posts, comments, reactions, author details, timestamps, media, and engagement data from public Facebook groups. Export structured data to JSON, CSV, Excel, or integrate with your workflows.",
    "version": "0.1",
    "x-build-id": "c6dQoTP77l0Aaximh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraperforge~facebook-group-posts-and-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraperforge-facebook-group-posts-and-details-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/scraperforge~facebook-group-posts-and-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraperforge-facebook-group-posts-and-details-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/scraperforge~facebook-group-posts-and-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraperforge-facebook-group-posts-and-details-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 Group URLs or Identifiers",
            "type": "array",
            "description": "📋 Enter one or more Facebook group URLs or group identifiers.\n\n💡 Examples:\n• Full URL: https://www.facebook.com/groups/germtheory.vs.terraintheory\n• Group ID: germtheory.vs.terraintheory\n\n✨ You can add multiple groups to scrape them all in one run!",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "📊 Maximum Posts (total across all groups)",
            "minimum": 10,
            "type": "integer",
            "description": "🎯 **Global cap** across the whole run.\n\nWith **multiple** `startUrls`, the cap is split across groups and results are merged, then capped at this value.\n\n📌 Minimum: **10**.\n💡 Example: `maxPosts: 50` with 2 groups → ~25 posts per group, **≤50** total in the dataset.",
            "default": 10
          },
          "monitoringMode": {
            "title": "👁️ Monitoring Mode (only new posts)",
            "type": "boolean",
            "description": "🔔 **Track only fresh content**.\n\nWhen enabled, the Actor remembers which post IDs it has already seen and **skips duplicates in future runs**.\nComment threads are only fetched for the **new** posts that survive this filter — never for the full monitoring look-back batch.\n\n🗂️ Uses Apify Key-Value Store under the hood to persist seen post IDs.",
            "default": false
          },
          "includeComments": {
            "title": "💬 Include Comment Threads",
            "type": "boolean",
            "description": "🧵 When ON, every post row also gets a `comments` list (author, text, date, likes, reply count) plus a `commentCount`.\n\nWhen OFF, the run is identical to the base actor's output — no comment fields, no extra requests.\n\n✅ Default: **ON**.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max Comments Per Post",
            "minimum": 1,
            "type": "integer",
            "description": "🎯 Cap on top-level comments collected **per post** (replies are separate — see below).\n\n💡 Example: `maxCommentsPerPost: 5` → up to 5 top-level comments per post, each with its own reply thread.\n\n📌 Minimum: **1**. Default: **20**. Only used when **Include Comment Threads** is ON.",
            "default": 20
          },
          "includeCommentReplies": {
            "title": "↩️ Include Nested Replies",
            "type": "boolean",
            "description": "🧵 When ON, replies underneath each fetched comment are collected too (via Facebook's separate reply-thread query) and nested under `comments[].replies`, each tagged with `replyToCommentId` and `threadingDepth`.\n\nWhen OFF, only top-level comments are returned (faster, fewer requests).\n\n✅ Default: **ON**.",
            "default": true
          },
          "commentsSortOrder": {
            "title": "🔀 Comment Sort Order",
            "enum": [
              "most_relevant",
              "newest",
              "all"
            ],
            "type": "string",
            "description": "📊 Ordering Facebook applies to the comment thread — pick what fits your analysis.",
            "default": "all"
          },
          "sortOrder": {
            "title": "🔄 Post Sort Order",
            "enum": [
              "RECENT_POSTS",
              "TOP_POSTS",
              "RECENT_ACTIVITY",
              "CHRONOLOGICAL"
            ],
            "type": "string",
            "description": "Sorting strategy for the group feed (`sortingSetting` in GraphQL variables).",
            "default": "RECENT_ACTIVITY"
          },
          "startDate": {
            "title": "📅 Filter Posts by Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "🗓️ Only scrape posts newer than the selected date.\n\n📝 Format: YYYY-MM-DD (e.g., 2025-02-20)\n\n💡 Leave empty to scrape all available posts regardless of date\n✨ Useful for getting only recent content or posts from a specific time period"
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Proxy settings (optional). This actor always uses residential proxy regardless of your choice. Configure Apify Proxy credentials if needed."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}