{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper - Post Comments, Replies & Reels",
    "description": "Export public Facebook comments and replies from post, reel, video, photo and public group URLs. One row per comment: text, author name and profile link as shown, date, reactions, reply count, reply-to id, attachments. Sort newest, relevant or all. Free: only-new monitoring, date, keyword filters.",
    "version": "1.0",
    "x-build-id": "vBAcTScGA7edEXliJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrel~facebook-post-comments/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrel-facebook-post-comments",
        "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/kestrel~facebook-post-comments/runs": {
      "post": {
        "operationId": "runs-sync-kestrel-facebook-post-comments",
        "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/kestrel~facebook-post-comments/run-sync": {
      "post": {
        "operationId": "run-sync-kestrel-facebook-post-comments",
        "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": {
          "postUrls": {
            "title": "Facebook post, reel or video URLs",
            "type": "array",
            "description": "Public Facebook URLs, one per line: Page posts (\"https://www.facebook.com/Starbucks/posts/1620755873417308\"), reels (/reel/ID), videos (/videos/ID, /watch/?v=ID), photos (/photo/?fbid=ID), permalink.php links and PUBLIC group posts (/groups/ID/posts/ID). Not profiles, Page home pages or private groups. Every URL also gets one free type=post row: Facebook's comment total, what was read and why it stopped. startUrls [{\"url\": ...}] is accepted too.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most comment rows delivered per post, replies included. Default 100; 0 = every comment Facebook shows logged-out visitors. Filters run first, so 50 asked = up to 50 that pass them. The bill per post is at most this number of comment events. maxItems, if your tool sends it, caps the whole run and lifts this default. Facebook hides some comments from logged-out visitors, so a post can return fewer than its listed total.",
            "default": 100
          },
          "sort": {
            "title": "Comment order",
            "enum": [
              "newest",
              "relevant",
              "all"
            ],
            "type": "string",
            "description": "newest (DEFAULT) = every comment, newest first: best for \"latest comments\", monitoring and date cut-offs. relevant = Facebook's \"Most relevant\" order, which leaves some comments out. all = every comment, oldest first. onlyNew always reads newest first.",
            "default": "newest"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "false (DEFAULT) = top-level comments only. true = also deliver the replies under each comment (and replies to replies) as their own rows with depth 1-2 and parent_comment_id; each reply is billed as one comment. Adds one request per comment that has replies. Use for \"with replies\", \"full threads\", \"conversations\", \"brand responses\".",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Most replies delivered under one comment when includeReplies is true (default 20; 0 = all Facebook shows). Replies also count toward maxCommentsPerPost.",
            "default": 20
          },
          "onlyNew": {
            "title": "Only new comments (monitoring)",
            "type": "boolean",
            "description": "true = deliver and bill only comments that no earlier run with the same monitorKey delivered (plus new replies when includeReplies is on). The first run sets the baseline: up to maxCommentsPerPost newest comments. Later runs read newest first and stop where the last run left off, so a check with nothing new costs $0. Schedule the same input daily or hourly for brand monitoring.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the only-new memory, e.g. \"starbucks-daily\" (1-60 letters, digits, dots, underscores or hyphens; empty = \"default\"). Runs that share the name share one memory per post; use a new name for a fresh baseline. Stored encrypted. It is a label, not a password. Ignored when onlyNew is false."
          },
          "publishedAfter": {
            "title": "Only comments after",
            "type": "string",
            "description": "Keep only comments posted on or after this time: \"2026-11-01\", an ISO time, or a relative span like \"7 days\", \"24 hours\", \"2 weeks\". Older comments are skipped free; with newest order the walk stops at the first page that is wholly older. Empty = all dates.",
            "default": ""
          },
          "textContains": {
            "title": "Text contains any of",
            "type": "array",
            "description": "Keep only comments whose text contains any of these words or phrases, case-insensitive, e.g. [\"refund\", \"late delivery\"]. Other comments are skipped free. Empty = all comments.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep only comments with at least this many reactions (all reaction types), e.g. 5 for \"popular comments\". 0 (default) = all. Others are skipped free.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default Apify Proxy works for public posts. If Facebook refuses three requests in a row the run backs off and moves to Apify RESIDENTIAL by itself; proxy and compute are included in the comment price. Custom proxy URLs are used as given.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}