{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Comments Scraper",
    "description": "Get public comments from Facebook posts, reels, videos, Pages, and groups. Each row has the comment text, author, time, reactions, and replies, plus the parent post for context. No Facebook login is needed.",
    "version": "0.0",
    "x-build-id": "IoXPePanwVBx5vjEa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~facebook-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-facebook-post-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/maximedupre~facebook-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-facebook-post-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/maximedupre~facebook-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-facebook-post-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": [
          "discoveryMethod"
        ],
        "properties": {
          "maxComments": {
            "title": "Maximum comments per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many comment rows across all posts. Replies are saved inside their comment row and do not count here. Leave empty or use 0 to collect all available comments within the other selected limits."
          },
          "discoveryMethod": {
            "title": "Find posts by",
            "enum": [
              "postUrls",
              "postIds",
              "pageUrls",
              "groupUrls"
            ],
            "type": "string",
            "description": "Choose Post URLs for posts, reels, or videos. Choose Post IDs for Facebook post IDs. Page URLs and Group URLs find posts and collect their comments."
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Add one or more full public Facebook post, reel, or video URLs. Required when Find posts by is Post URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "postIds": {
            "title": "Post IDs",
            "type": "array",
            "description": "Add one or more exact Facebook post IDs, one per entry. Required when Find posts by is Post IDs.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Add full public Facebook Page URLs. You can submit 100 or more Pages. Required when Find posts by is Page URLs. Later runs collect newly found posts and skip posts already delivered by this Actor.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pagePostsUntil": {
            "title": "Posts published on or before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "For Page URLs, select posts published on or before this date. Leave empty for no end date. Dates use UTC."
          },
          "groupUrls": {
            "title": "Group URLs",
            "type": "array",
            "description": "Add one or more full public Facebook group URLs. Required when Find posts by is Group URLs. Later runs continue to older posts and skip posts already delivered by this Actor.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "groupPostKeyword": {
            "title": "Post text keyword",
            "type": "string",
            "description": "For Group URLs, select posts whose text contains this keyword. Leave empty to apply no keyword filter."
          },
          "groupPostOrder": {
            "title": "Group post order",
            "enum": [
              "newPosts",
              "recentActivity",
              "topPosts"
            ],
            "type": "string",
            "description": "For Group URLs, choose Facebook's post order. New posts orders by post time. Recent activity uses the latest activity. Top posts uses Facebook's ranking.",
            "default": "newPosts"
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Limit comment rows from each post. Replies inside a comment row do not count here. Leave empty or use 0 for all available comments from each post. Maximum comments per run still applies."
          },
          "commentOrder": {
            "title": "Comment selection",
            "enum": [
              "allComments",
              "newestFirst",
              "topComments"
            ],
            "type": "string",
            "description": "Choose Facebook's comment selection for all discovery methods. All comments selects available public comments. Newest first selects the newest comments first. Top comments uses Facebook's ranking. Hidden, deleted, and private comments are not available.",
            "default": "allComments"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Save public replies inside each comment row. Each saved reply is charged. When this is off, no replies are collected.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Maximum replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "When Include replies is on, save up to this many replies in each comment row, where available. Use 0 for all available replies.",
            "default": 10
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per Page or group",
            "minimum": 0,
            "type": "integer",
            "description": "For Page URLs and Group URLs, select up to this many posts from each Page or group. Leave empty or use 0 for all available posts that match the filters."
          },
          "maxPosts": {
            "title": "Maximum posts per run",
            "minimum": 0,
            "type": "integer",
            "description": "For Page URLs and Group URLs, select up to this many posts across the run. Leave empty or use 0 for all available posts that match the filters. The comment limits still apply."
          },
          "postsSince": {
            "title": "Posts published on or after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "For Page URLs and Group URLs, select posts published on or after this date. Leave empty for no start date. Dates use UTC."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}