{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper: With Replies",
    "description": "Comments and replies from public Facebook posts, reels and videos, with reactions by type. $0.25 per 1,000 comments. Newest first, back to a date you choose.",
    "version": "0.1",
    "x-build-id": "GHmzZf8oKRQcK6GfX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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",
        "properties": {
          "startUrls": {
            "title": "Post links",
            "type": "array",
            "description": "Links to public Facebook posts, as in your browser's address bar: Page and group posts (https://www.facebook.com/…/posts/…, groups/…/permalink/…, permalink.php?story_fbid=…&id=…), reels, videos (watch/?v=…), photos and share links (facebook.com/share/p/…). A Page, profile or group link on its own is not a post: open the post and paste its link. Private-group and friends-only posts are not supported. Required unless you give a dataset id or rows below. Example: https://www.facebook.com/reel/1557618349384047/",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Dataset id from a scraper run",
            "type": "string",
            "description": "The id of a run's dataset from Facebook Posts Scraper (apify/facebook-posts-scraper), so you do not copy post links by hand. Every row's url is read as a post link; rows without one, or whose own comment count is 0, are skipped and counted in the status. Reads up to 10,000 rows. Our Facebook Posts Actor also works. Example: your leader run's dataset id, e.g. from its Storage tab (a username~name or a dataset link works too)."
          },
          "datasetRows": {
            "title": "Rows from a scraper run",
            "type": "array",
            "description": "Rows pasted from Facebook Posts Scraper (apify/facebook-posts-scraper) results, as a JSON list, when its dataset id is not readable by your account. Each row's url is read as a post link; rows without one, or whose comment count is 0, are skipped. Reads up to 10,000 rows. Example: [{\"url\": \"https://www.facebook.com/reel/1557618349384047/\"}]"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 10,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop reading a post after this many comments, replies included. From 10 to 50,000; 100 if left empty. You pay $0.25 per 1,000 comments and replies saved, so this caps each post's cost: 100 comments cost at most $0.025.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also save the replies to each comment, and the replies to those replies, each marked with the comment it answers. Off by default. Replies count toward Max comments per post and are charged as comments. You get the replies Facebook shows to visitors.",
            "default": false
          },
          "sortOrder": {
            "title": "Order",
            "enum": [
              "newest",
              "relevant",
              "all"
            ],
            "type": "string",
            "description": "Newest first reaches the most comments. Most relevant is Facebook's default view; All comments is Facebook's unfiltered ranking. Newest first is the default, and Only comments newer than always reads newest first. Example: relevant",
            "default": "newest"
          },
          "onlyCommentsNewerThan": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Leave empty for every comment. A date (2026-10-01, UTC), a time (2026-10-17T08:00:00Z) or a period back from now (\"3 hours\", \"2 days\", \"1 week\"; minutes, months and years work too). A date in the future is refused. Comments are then read newest first, and the post ends at its first older comment (new replies under older comments are not read). Example: 2 days"
          },
          "onlyNewItems": {
            "title": "Only new comments",
            "type": "boolean",
            "description": "Turn this on for a scheduled run, or a re-run of the same task: each run then returns only the comments it has not returned before, reading each post back to a day before the last run that read it. Skipped comments are neither saved nor charged; each new comment is charged as usual. From the second run on, comments are read newest first, whatever Order is set to, and new replies under older comments are not returned in this mode. Runs with other settings, or from another task, keep their own list. Off by 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}