{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Group Data Scraper",
    "description": "Extract posts, comments, engagement metrics, links, and media details from public Facebook groups. Monitor public community conversations, track brand or product mentions, research topics, and export structured Facebook group data to spreadsheets, dashboards, databases, webhooks, or AI workflows.",
    "version": "0.1",
    "x-build-id": "dS4PbQtskMh4tRK6T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~facebook-group-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-facebook-group-data-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/qaseemiqbal~facebook-group-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-facebook-group-data-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/qaseemiqbal~facebook-group-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-facebook-group-data-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": "Public Facebook group URLs",
            "type": "array",
            "description": "Public Facebook group feed URLs or public group post permalink URLs. Private groups, credentials, cookies, and login-only content are not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "costMode": {
            "title": "Cost mode",
            "enum": [
              "lowest_cost",
              "balanced",
              "maximum_data"
            ],
            "type": "string",
            "description": "Choose the default cost profile. Lowest cost uses smaller limits and avoids optional enrichment unless you turn it on.",
            "default": "lowest_cost"
          },
          "maxPostsPerGroup": {
            "title": "Maximum posts per group",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit of post records to extract from each group.",
            "default": 25
          },
          "sortMode": {
            "title": "Sort mode",
            "enum": [
              "recent_activity",
              "new_posts",
              "relevance"
            ],
            "type": "string",
            "description": "Best-effort feed/search ordering. Facebook may ignore or hide some order modes in public views.",
            "default": "recent_activity"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Optional keyword search inside each public group."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional ISO 8601 lower bound for post timestamps."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional ISO 8601 upper bound for post timestamps."
          },
          "commentsMode": {
            "title": "Comments mode",
            "enum": [
              "none",
              "top",
              "expanded",
              "all_best_effort"
            ],
            "type": "string",
            "description": "Choose whether to skip comments, collect top visible comments, open post details for more comments, or collect deeper public comments on a best-effort basis.",
            "default": "none"
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of visible public comments to collect for each post.",
            "default": 0
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Best-effort expansion of public replies under visible comments.",
            "default": false
          },
          "commentSortMode": {
            "title": "Comment sort mode",
            "enum": [
              "top",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Preferred comment ordering when Facebook exposes comment sorting in the public view.",
            "default": "top"
          },
          "includeReactionBreakdown": {
            "title": "Include reaction breakdown",
            "type": "boolean",
            "description": "Collect visible reaction counts such as like, love, care, haha, wow, sad, and angry when available.",
            "default": false
          },
          "includeSharesCount": {
            "title": "Include shares count",
            "type": "boolean",
            "description": "Collect the public share count when it is visible on the post.",
            "default": true
          },
          "includeMedia": {
            "title": "Include media metadata",
            "type": "boolean",
            "description": "Collect metadata for visible images, videos, thumbnails, and link previews.",
            "default": true
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Store public media files in the default key-value store when URLs are directly downloadable.",
            "default": false
          },
          "extractImageOcr": {
            "title": "Extract image OCR",
            "type": "boolean",
            "description": "Optional OCR hook. Off by default because OCR is slower and may require provider configuration.",
            "default": false
          },
          "includeGroupMetadata": {
            "title": "Include group metadata",
            "type": "boolean",
            "description": "Collect public group title, URL, and group identifier when visible.",
            "default": true
          },
          "privacyMode": {
            "title": "Privacy mode",
            "enum": [
              "include_public_author_fields",
              "hash_author_ids",
              "omit_author_fields"
            ],
            "type": "string",
            "description": "Choose whether to include public author fields, hash author identifiers, or omit author fields from the output.",
            "default": "include_public_author_fields"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "posts_with_nested_comments",
              "separate_datasets",
              "flat_table"
            ],
            "type": "string",
            "description": "Choose whether comments stay nested inside post records or are also written to separate datasets for easier analysis.",
            "default": "posts_with_nested_comments"
          },
          "includeErrorRecords": {
            "title": "Include error records",
            "type": "boolean",
            "description": "Write structured error records for private groups, login walls, unavailable posts, and failed requests.",
            "default": true
          },
          "incrementalMode": {
            "title": "Incremental monitoring mode",
            "type": "boolean",
            "description": "Emit only new or changed posts and persist fingerprints in the key-value store.",
            "default": false
          },
          "stateStoreKey": {
            "title": "State store key",
            "type": "string",
            "description": "Key-value store record name used to save incremental monitoring state between runs.",
            "default": "PUBLIC_FACEBOOK_GROUPS_STATE"
          },
          "deduplicatePosts": {
            "title": "Deduplicate posts",
            "type": "boolean",
            "description": "Avoid emitting duplicate posts found through pinned posts, repeated cards, or cross-posted links.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of pages the crawler should process at the same time.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed page before writing an error record.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum time allowed for each page request before it is treated as failed.",
            "default": 60
          },
          "blockHeavyResources": {
            "title": "Block heavy resources",
            "type": "boolean",
            "description": "Block images, videos, fonts, and stylesheets in the browser to reduce bandwidth, memory use, and run time.",
            "default": true
          },
          "maxScrollsPerGroup": {
            "title": "Maximum scrolls per group",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum feed scroll attempts per group. Lower values are cheaper and faster but may collect fewer posts.",
            "default": 3
          },
          "pageWaitMillis": {
            "title": "Page wait milliseconds",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Short wait between scrolls or expansion clicks. Lower values reduce cost but may miss slowly loaded content.",
            "default": 250
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is recommended for reliability.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable more detailed crawl diagnostics in logs and output records.",
            "default": false
          },
          "saveFailedPages": {
            "title": "Save failed pages",
            "type": "boolean",
            "description": "Stores failed HTML/screenshot snapshots to the key-value store when enabled.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}