{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Comments Scraper",
    "description": "Scrape public Facebook post comments and deep reply threads without cookies or login. Extract comment text, authors, timestamps, reactions, stable URLs, post text, and thread relationships from up to 100 posts per run. Export structured data through the Apify API, MCP, schedules, and webhooks.",
    "version": "0.0",
    "x-build-id": "AbpzC4HDSf0ZzvQ8I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spbotdel~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spbotdel-facebook-comments-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/spbotdel~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spbotdel-facebook-comments-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/spbotdel~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spbotdel-facebook-comments-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": [
          "postUrls"
        ],
        "properties": {
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Public Facebook URLs. Supported without login: page posts, group permalinks, story.php, and video pages. Reels, photo pages, and /watch/ are accepted for detection but Facebook does not serve their comment lists to signed-out visitors.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on rows (top-level + replies) per post. Public posts paginate 10 per request, so 300 costs about 30 requests.",
            "default": 300
          },
          "maxPostsPerRun": {
            "title": "Max posts per run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum post URLs processed per run. Results multiply per post. Runs are processed in parallel, see maxConcurrency.",
            "default": 5
          },
          "maxConcurrency": {
            "title": "Parallel posts",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many posts to walk at the same time. Each post keeps its own cursor and pacing, so 5 parallel posts finish roughly 5x faster than sequential ones.",
            "default": 5
          },
          "queryMode": {
            "title": "Query mode",
            "enum": [
              "FRESH_LIST",
              "FRESH_LIST_WITH_REPLIES",
              "LEGACY_TOPLEVEL"
            ],
            "type": "string",
            "description": "FRESH_LIST walks the live CommentsListComponentsPaginationQuery (10 per page, no ceiling on public content). LEGACY_TOPLEVEL is the old dusty pager that keeps returning the same 10 comments.",
            "default": "FRESH_LIST"
          },
          "unionSorts": {
            "title": "Union sort orders",
            "type": "boolean",
            "description": "Walk both the default order and NEWEST, then merge. Measured on a public post: the two windows had zero overlap, so this roughly doubles distinct comments per request.",
            "default": true
          },
          "commentsSortOrder": {
            "title": "Comment sort order",
            "enum": [
              "MOST_RELEVANT",
              "NEWEST",
              "ALL_COMMENTS"
            ],
            "type": "string",
            "description": "Facebook comment ordering. MOST_RELEVANT keeps the default window, NEWEST switches to reverse chronological, ALL_COMMENTS asks for the unfiltered chronological list.",
            "default": "MOST_RELEVANT"
          },
          "knownCommentIds": {
            "title": "Known comment IDs",
            "type": "array",
            "description": "Comment IDs you already have. They are skipped, so monitoring runs only return new comments.",
            "items": {
              "type": "string"
            }
          },
          "knownDatasetId": {
            "title": "Dataset with known comments",
            "type": "string",
            "description": "ID of a previous run dataset. Requires the actor to have permission to read that dataset; if the run logs an insufficient-permissions warning, use dedupeStoreName or knownCommentIds instead."
          },
          "dedupeStoreName": {
            "title": "Dedupe store name",
            "type": "string",
            "description": "Name of a key-value store that remembers delivered comment IDs between runs. Set any stable name (e.g. my-group-monitor) and repeated runs will only return new comments."
          },
          "failOnEmpty": {
            "title": "Fail on empty result",
            "type": "boolean",
            "description": "Mark the run as failed when zero comments were collected. Useful for scheduled monitoring so an empty run is visible instead of silent.",
            "default": false
          },
          "includePostText": {
            "title": "Include post text",
            "type": "boolean",
            "description": "Copy the post caption into every comment row as post_text. Parsed from the permalink HTML the run already fetches, so it costs no extra requests.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Expand reply threads of top-level comments. Replies paginate 10 per page to the end on public content.",
            "default": true
          },
          "maxReplyThreadsPerPost": {
            "title": "Reply threads per post",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many reply-bearing parent comments to expand, fattest threads first. 0 = replies off.",
            "default": 20
          },
          "maxRepliesPerPost": {
            "title": "Max replies per post",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on reply rows per post. Replies count toward maxCommentsPerPost as well.",
            "default": 200
          },
          "pageDelayMs": {
            "title": "Delay between pages (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between GraphQL pages. Default 1000 ms is the safest starting point; 200-400 ms has been tested for faster runs.",
            "default": 1000
          },
          "maxPagesPerPost": {
            "title": "Max pages per post",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety stop for the cursor walk. At 10 comments per page, 60 pages covers about 600 comments.",
            "default": 60
          },
          "introDelayMs": {
            "title": "Delay after page load (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Short settle after fetching the permalink HTML before the first GraphQL call. 0 disables it.",
            "default": 1500
          },
          "onlyCommentsNewerThan": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Keep only comments newer than this. Accepts an absolute date (2026-04-20) or a relative value like 30 days, 12 hours or 2 weeks. Empty = no filter."
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country code for the residential proxy. US is what the verified runs used.",
            "default": "US"
          },
          "proxyTier": {
            "title": "Proxy tier",
            "enum": [
              "auto",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "auto: start on the cheap datacenter pool and switch to residential automatically if Facebook blocks it. datacenter: cheapest. residential: the original behaviour, most conservative.",
            "default": "auto"
          },
          "proxyGroups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Apify proxy groups. RESIDENTIAL is the verified default; DATACENTER is cheaper but more likely to be blocked.",
            "items": {
              "type": "string"
            },
            "default": [
              "RESIDENTIAL"
            ]
          },
          "minCommentsPerPost": {
            "title": "Min comments per post",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Density guard: stop early when the thread is known to be thinner than this. 0 = off.",
            "default": 0
          },
          "startCursorByPost": {
            "title": "Continuation cursors by post",
            "type": "object",
            "description": "Resume paging from a previous OUTPUT summary. Map post ID to {endCursor}. Never mix cursors across posts.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}