{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper — Posts & Reels",
    "description": "Scrape public comments from Facebook post and reel URLs into clean records with author, text, timestamps, reactions and reply counts. No login or cookies needed.",
    "version": "1.1",
    "x-build-id": "PjEbtQ6bNBBKVr3lg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": {
          "postUrls": {
            "title": "Facebook post or reel URLs",
            "type": "array",
            "description": "One or more public Facebook post or reel URLs to read comments from (e.g. 'https://www.facebook.com/reel/753347914167361' or a permalink/story.php/posts URL). Accepts plain URL strings or {\"url\": \"...\"} objects. NOT a page, profile, or group feed URL — give the URL of a single post. Private, deleted, or login-only posts return no comments.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Total comments limit",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comment records to emit across all posts. This is your primary cost cap; each emitted comment charges the comment-scraped event. Defaults to 100. Set lower to control spend on busy posts.",
            "default": 100
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comments to collect from each individual post before moving to the next URL. Defaults to 100. Use this to balance coverage across many posts within the total comments limit. NOT the global cap — see Total comments limit.",
            "default": 100
          },
          "includeReactionBreakdown": {
            "title": "Include reaction breakdown",
            "type": "boolean",
            "description": "When enabled, adds a reactions object with per-type counts (like, love, haha, wow, care, sad, angry) to each comment when the provider returns it. Leave off for a leaner dataset; the total reactionCount is always included.",
            "default": false
          },
          "url": {
            "title": "Single post URL (alias)",
            "type": "string",
            "description": "Shortcut for one public Facebook post or reel URL. Same as putting one URL in 'Facebook post or reel URLs'. Handy for AI agents and API calls."
          },
          "commentView": {
            "title": "Which comments to read",
            "enum": [
              "mostRelevant",
              "all"
            ],
            "type": "string",
            "description": "'mostRelevant' (default) is Facebook's normal view and can hide some comments. 'all' asks for the unfiltered view, which can return more comments (so more rows are billed). Needs the primary data source; the fallback source always uses its normal view. Turned on automatically when 'Include replies' is on.",
            "default": "mostRelevant"
          },
          "commentsNewerThan": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Skip older comments (they are not billed). Use a date such as 2026-11-01, a date and time such as 2026-11-01T12:00:00Z, or a window such as '7 days', '12 hours' or '2 weeks'. Note: the data source returns comments in its own order, so older comments are still read to find newer ones; at most 50 pages (about 500 comments) are scanned per post when this filter is on."
          },
          "onlyNewComments": {
            "title": "Only comments not seen in earlier runs",
            "type": "boolean",
            "description": "Remembers the comment IDs it has already returned for each post (in your account's 'facebook-comments-seen' storage) and returns only new ones next time. Good for daily monitoring. At most 50 pages (about 500 comments) are scanned per post when this is on.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also return the replies to each comment (one row per reply, 'isReply' = true and 'parentCommentId' set). Replies are a separate paid event, 'comment-reply'; this option opens when that price takes effect (see the Pricing tab). Needs the primary data source. Counts toward 'Total comments limit'.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Used only when 'Include replies' is on. Maximum replies to return under each comment. Defaults to 20.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}