{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Group Posts Scraper",
    "description": "Scrape public Facebook group posts without login or cookies. Extract text, author, date, reactions, comment counts, and the group name. Filter by keyword or date, or keep only new posts. From $1.20 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "QSB07SYFvbbu6a8Ul"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~facebook-groups-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-lab-facebook-groups-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/valev-lab~facebook-groups-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-lab-facebook-groups-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/valev-lab~facebook-groups-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-lab-facebook-groups-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": {
          "startUrls": {
            "title": "Group URLs",
            "type": "array",
            "description": "Public group URLs. Slugs, numeric ids, m. and web. hosts, a post permalink (the whole group is read), and a group search URL (/groups/<id>/search/?q=...) are accepted. Share links (facebook.com/share/g/...) are followed. Leave Group URLs and Group ids both empty to read 5 posts from a demo group.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Public Facebook group URL."
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "groupIds": {
            "title": "Group ids or slugs",
            "type": "array",
            "description": "Numeric group ids or slugs, used when you do not have a full URL. Duplicates of startUrls are read once.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Max posts per group",
            "minimum": 0,
            "type": "integer",
            "description": "Posts saved per group. 0 means no cap. The form default 100 is the health-check sentinel: an untouched run saves 5 posts. Set 20, 50, 200, or any value other than 100 for that exact cap.",
            "default": 100
          },
          "maxItemsTotal": {
            "title": "Max posts in the run",
            "minimum": 0,
            "type": "integer",
            "description": "Cap across every group. 0 means no run-level cap. Each saved post still has to fit maxItems for its group.",
            "default": 0
          },
          "viewOption": {
            "title": "Feed order",
            "enum": [
              "CHRONOLOGICAL",
              "RECENT_ACTIVITY",
              "TOP_POSTS",
              "CHRONOLOGICAL_LISTINGS"
            ],
            "type": "string",
            "description": "Order requested from the group feed.",
            "default": "CHRONOLOGICAL"
          },
          "postsPerRequest": {
            "title": "Posts per request",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Asked from Facebook on each feed page. Facebook still returns a handful of posts; raising this does not make the run faster.",
            "default": 3
          },
          "onlyPostsNewerThan": {
            "title": "Newer than",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?|\\d+ ?(hour|hours|day|days|week|weeks|month|months|year|years)( ago)?)?\\s*$",
            "type": "string",
            "description": "Keep posts at or after this time. YYYY-MM-DD, an ISO timestamp, or a phrase such as 12 hours, 30 days, 2 weeks, 3 months, or 1 year. The lower bound is inclusive. Pagination stops after 3 posts in a row that are older."
          },
          "onlyPostsNewerThanHours": {
            "title": "Newer than (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "How many hours back to keep. When set, this overrides Newer than."
          },
          "onlyPostsOlderThan": {
            "title": "Older than",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?|\\d+ ?(hour|hours|day|days|week|weeks|month|months|year|years)( ago)?)?\\s*$",
            "type": "string",
            "description": "Upper bound, exclusive. Same formats as Newer than. Posts newer than this are skipped for free while the run seeks backward, up to Max seek pages."
          },
          "maxSeekPages": {
            "title": "Max seek pages",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How many feed pages may be skipped while seeking back to Older than. The run stops with seek-too-deep instead of reading the whole history.",
            "default": 300
          },
          "search": {
            "title": "Search",
            "type": "string",
            "description": "All words must appear, in any order. A quoted phrase must appear as written. Posts that do not match are billed as filter-check, not as a saved post."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop a post when any of these words appear in its text. Matching is case and accent insensitive.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "transliterateSearch": {
            "title": "Match Latin and Cyrillic",
            "type": "boolean",
            "description": "Also match Bulgarian transliteration, so apartament matches апартамент and kvartira matches квартира.",
            "default": true
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer reactions. 0 keeps every post. A missing count does not pass a minimum above 0.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer comments. 0 keeps every post.",
            "default": 0
          },
          "monitoringMode": {
            "title": "Only new posts",
            "type": "boolean",
            "description": "Save posts this state key has not delivered before. Already-seen posts are billed as seen-check. In newest-first order the group stops after 3 seen posts in a row, so pinned posts do not end the run.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "maxLength": 80,
            "type": "string",
            "description": "Memory key for monitoring, up to 80 characters. Leave empty to derive one from the group list."
          },
          "resetState": {
            "title": "Reset monitoring memory",
            "type": "boolean",
            "description": "Forget posts already delivered under this state key, then start again.",
            "default": false
          },
          "refreshWindowDays": {
            "title": "Refresh window (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "In monitoring mode, deliver an already-seen post again when it is younger than this many days, so engagement can update. Billed as a normal post. 0 turns it off.",
            "default": 0
          },
          "knownPostIds": {
            "title": "Stop at these post ids",
            "type": "array",
            "description": "Stop the group when one of these ids appears. That post is not billed. Use this when you keep your own memory outside the Actor.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "resumeFromLastRun": {
            "title": "Resume from last cursor",
            "type": "boolean",
            "description": "Continue each group from the cursor saved by the previous run. The cursor is saved on every run, even when this is off.",
            "default": false
          },
          "resumeCursor": {
            "title": "Resume cursor",
            "type": "string",
            "description": "Advanced. A single cursor, used only when the run has one group. Overrides the saved cursor."
          },
          "proxyCountry": {
            "title": "Proxy country",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Two-letter country for the proxy, used only after a direct request is blocked. Examples: US, BG, RO, GR, RS."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Requests go out directly first. After a login wall, your proxy URLs are used when present (including the CUSTOM_PROXY_URLS secret). Otherwise Apify Residential is used. Turn useApifyProxy off to stay direct and stop at the wall.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log how many posts each feed page returned. Request bodies are not logged.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}