{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook 帖子与评论抓取器｜小组与主页",
    "description": "无需登录或 Cookie，抓取 Facebook 小组、主页和个人主页的公开帖子、评论与回复。获取作者、时间、互动、媒体、固定链接与覆盖率诊断，支持 API、MCP、定时任务、JSON、CSV、Excel 与 AI 工作流。",
    "version": "0.1",
    "x-build-id": "ApAO8ofRHZuFmiL0A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spbotdel~facebook-group-posts-comments-cn/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spbotdel-facebook-group-posts-comments-cn",
        "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/spbotdel~facebook-group-posts-comments-cn/runs": {
      "post": {
        "operationId": "runs-sync-spbotdel-facebook-group-posts-comments-cn",
        "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/spbotdel~facebook-group-posts-comments-cn/run-sync": {
      "post": {
        "operationId": "run-sync-spbotdel-facebook-group-posts-comments-cn",
        "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 URLs",
            "type": "array",
            "description": "Public Facebook group, page, or personal profile URLs. Group URLs and /people/ profile URLs are auto-detected; set userData.surfaceType for ambiguous handles. Large URL lists are processed in batches without silent truncation.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Facebook URL",
                  "description": "Public Facebook group, page, or personal profile URL.",
                  "type": "string"
                },
                "userData": {
                  "title": "Surface metadata",
                  "description": "Optional metadata used to force a specific Facebook surface type.",
                  "type": "object",
                  "properties": {
                    "surfaceType": {
                      "title": "Surface type",
                      "description": "Use group, page, or profile when auto-detection is ambiguous.",
                      "type": "string",
                      "enum": [
                        "group",
                        "page",
                        "profile"
                      ]
                    }
                  }
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "maxPostsPerGroup": {
            "title": "Max posts per surface",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to collect from each group, page, or profile before comment enrichment. A run charge limit can reduce this value to keep collection within maxTotalChargeUsd.",
            "default": 30
          },
          "sortMode": {
            "title": "Feed sorting",
            "enum": [
              "CHRONOLOGICAL",
              "RECENT_ACTIVITY",
              "TOP_POSTS",
              "CHRONOLOGICAL_LISTINGS"
            ],
            "type": "string",
            "description": "Facebook group feed order. Pages and personal profiles use newest-first feeds; CHRONOLOGICAL is recommended for group monitoring.",
            "default": "CHRONOLOGICAL"
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Inclusive lower date boundary. Supports ISO dates and relative values such as 30 days or 2 weeks."
          },
          "onlyPostsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Exclusive upper date boundary: posts exactly at the boundary are excluded. Combine with onlyPostsNewerThan for a closed date range."
          },
          "knownPostIds": {
            "title": "Known post IDs",
            "type": "array",
            "description": "Post IDs already stored by your pipeline. In chronological mode the feed can stop at a known post.",
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Post text filter",
            "type": "string",
            "description": "Case-insensitive post text filter applied before comment enrichment. Use searchMode=HISTORY_SCAN to scan history up to searchMaxPostsPerSurface instead of only filtering the latest feed snapshot."
          },
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "LOCAL",
              "HISTORY_SCAN"
            ],
            "type": "string",
            "description": "LOCAL filters the normal latest-post snapshot. HISTORY_SCAN walks backward through the public feed up to searchMaxPostsPerSurface and returns up to maxSearchResults matching posts. Facebook's signed-out search page requires login, so this is the no-cookie historical-search equivalent.",
            "default": "LOCAL"
          },
          "searchMaxPostsPerSurface": {
            "title": "History scan depth",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum public posts walked per group, page, or profile when searchMode=HISTORY_SCAN.",
            "default": 300
          },
          "maxSearchResults": {
            "title": "Max matching posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum matching posts returned when searchMode=HISTORY_SCAN.",
            "default": 100
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts whose feed metadata reports at least this many comments. Posts with unknown engagement are kept.",
            "default": 0
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts whose feed metadata reports at least this many reactions. Posts with unknown engagement are kept.",
            "default": 0
          },
          "filterAuthor": {
            "title": "Filter by post author",
            "type": "string",
            "description": "Case-insensitive substring match against the public post author name or profile URL."
          },
          "startCursor": {
            "title": "Start cursor",
            "type": "string",
            "description": "Cursor from a previous run's SUMMARY for an older-history backfill. Supported when startUrls contains exactly one group, page, or profile."
          },
          "commentsMode": {
            "title": "Comments mode",
            "enum": [
              "none",
              "inline",
              "full"
            ],
            "type": "string",
            "description": "none: posts only. inline: up to 3 comments per post. full: collect full public comment threads with the configured limits.",
            "default": "full"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum comment and reply rows collected for each post in full mode. Inline mode is capped at 3.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Expand public reply threads during full comment collection.",
            "default": true
          },
          "maxReplyThreadsPerPost": {
            "title": "Reply threads per post",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum reply-bearing top-level comments to expand per post.",
            "default": 20
          },
          "maxRepliesPerPost": {
            "title": "Max replies per post",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum reply rows collected per post in full mode.",
            "default": 100
          },
          "commentsConcurrency": {
            "title": "Comments concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many posts the comment engine processes in parallel.",
            "default": 5
          },
          "commentsSortOrder": {
            "title": "Comment sorting",
            "enum": [
              "MOST_RELEVANT",
              "NEWEST",
              "ALL_COMMENTS"
            ],
            "type": "string",
            "description": "Facebook comment order used by the comment engine.",
            "default": "MOST_RELEVANT"
          },
          "unionSorts": {
            "title": "Union comment sort windows",
            "type": "boolean",
            "description": "Walk both relevant and newest comment windows to improve public coverage.",
            "default": true
          },
          "onlyCommentsNewerThan": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Keep comments newer than an absolute date or relative value such as 30 days, 12 hours, or 2 weeks."
          },
          "commentTextSearch": {
            "title": "Comment text filter",
            "type": "string",
            "description": "Case-insensitive local filter over returned comment and reply text. It filters publicly collected comments and does not bypass signed-out Facebook limits."
          },
          "minCommentReactions": {
            "title": "Minimum comment reactions",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep comments and replies with at least this many reactions.",
            "default": 0
          },
          "includePostTextInCommentRows": {
            "title": "Post text in comment rows",
            "type": "boolean",
            "description": "Include post_text in each returned comment row, including separate output mode.",
            "default": false
          },
          "commentsOutput": {
            "title": "Comments output",
            "enum": [
              "nested",
              "separate"
            ],
            "type": "string",
            "description": "nested stores comments inside each post row. separate emits post rows and comment rows separately.",
            "default": "nested"
          },
          "proxyTier": {
            "title": "Proxy tier",
            "enum": [
              "auto",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "Proxy behavior forwarded to the underlying group and comment engines.",
            "default": "auto"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country code forwarded to page/profile engines.",
            "default": "US"
          },
          "dedupeStoreName": {
            "title": "Comment dedupe store",
            "type": "string",
            "description": "Stable logical Key-Value Store name used to return only new comments across scheduled runs. It is namespaced per Apify user internally, and the effective internal name is reported in SUMMARY."
          },
          "failOnEmpty": {
            "title": "Fail on empty",
            "type": "boolean",
            "description": "Mark the run failed when no posts are selected, or when no final output rows are produced. An existing post with zero public comments is still a valid output row.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}