{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Group Post Scraper By Keyword Search",
    "description": "Scrape posts from Facebook groups with the Facebook Group Post Scraper. Extract post text, images, videos, comments, reactions, and timestamps. Ideal for community analysis, engagement tracking, and market research. Fast, reliable, and scalable for single or multiple groups.",
    "version": "0.1",
    "x-build-id": "dFS0teUwmeE5agtsu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~facebook-group-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-facebook-group-post-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/scrapier~facebook-group-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-facebook-group-post-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/scrapier~facebook-group-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-facebook-group-post-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": [
          "groupUrl"
        ],
        "properties": {
          "groupUrl": {
            "title": "🔗 Facebook Group URL",
            "type": "string",
            "description": "Full URL (or just the slug) of a public Facebook group whose posts are visible without logging in.\n\nExample: https://www.facebook.com/groups/digitalmarketing"
          },
          "keywords": {
            "title": "🔑 Watch Keywords (include)",
            "type": "array",
            "description": "Keep only the posts whose text, attachment titles, shared links or returned top comments contain these terms. Case-insensitive substring match.\n\nLeave empty to keep every scanned post.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Mute Keywords (exclude)",
            "type": "array",
            "description": "Drop any post containing one of these terms, even when it matched a watch keyword. Case-insensitive substring match.",
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "🎯 Match Mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "How the watch keywords are combined.\n\n• Any keyword - keep a post that contains at least one watch keyword.\n• All keywords - keep a post only when it contains every watch keyword.",
            "default": "any"
          },
          "count": {
            "title": "📊 Number of Posts to Scan",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many posts to pull from the group feed and evaluate against your keyword rules. The number of rows you get back is the subset that matched.\n\nLeave empty to scan the whole feed. Range: 1-10,000.",
            "default": 20
          },
          "sortType": {
            "title": "🔀 Order Results By",
            "enum": [
              "new_posts",
              "most_relevant"
            ],
            "type": "string",
            "description": "How the matched posts are ordered in the dataset.\n\n🆕 Newest first - most recent post first.\n⭐ Most engagement first - highest reactions + comments + shares first.\n\nFacebook disables its own feed-sort switcher for logged-out visitors, so the Actor applies this ordering itself over the engagement values it actually scraped.",
            "default": "new_posts"
          },
          "scrapeUntil": {
            "title": "📅 Only Keep Posts Newer Than",
            "type": "string",
            "description": "Skip posts created before this date. Leave empty for no date filter.\n\nFormats: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS (UTC)."
          },
          "maxComments": {
            "title": "💭 Top Comments Per Post",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of top comments to keep on each post. Set to 0 to skip comments entirely.\n\nNote: Facebook usually returns an empty top-comment list to logged-out requests, so this often has nothing to trim.",
            "default": 10
          },
          "minDelay": {
            "title": "⏱️ Minimum Delay Between Requests (s)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Lower bound of the random pause between consecutive feed requests.",
            "default": 1
          },
          "maxDelay": {
            "title": "⏱️ Maximum Delay Between Requests (s)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Upper bound of the random pause between consecutive feed requests. Raise both delays if Facebook starts throttling the run.",
            "default": 3
          },
          "proxy": {
            "title": "🔒 Proxy Settings",
            "type": "object",
            "description": "Facebook serves its logged-out group feed to residential IPs and answers datacenter IPs with a login wall, so RESIDENTIAL is selected by default and is tried first no matter what you pick here. Turning Apify Proxy off falls back to a direct connection, which Facebook usually blocks.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}