{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comment Scraper - Posts & Reels [NO COOKIES] ✅",
    "description": "Pull every comment from any public Facebook post or reel: text, timestamp, reply count, author, and a full per-reaction breakdown (like, love, care, haha, wow, sad, anger and more). Fetch threaded replies on demand. No login, no cookies. Built for sentiment, NLP and social listening.",
    "version": "0.0",
    "x-build-id": "h95oRsQ33yYT6EzeX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unseenuser~fb-comments/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unseenuser-fb-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/unseenuser~fb-comments/runs": {
      "post": {
        "operationId": "runs-sync-unseenuser-fb-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/unseenuser~fb-comments/run-sync": {
      "post": {
        "operationId": "run-sync-unseenuser-fb-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",
        "required": [
          "postUrls"
        ],
        "properties": {
          "postUrls": {
            "title": "Post URLs, reel URLs, or feedback IDs",
            "type": "array",
            "description": "Paste any mix of public Facebook post URLs, reel URLs, and feedback IDs. The actor auto-detects each entry: anything starting with http:// or https:// is treated as a URL, everything else is treated as a feedback_id (e.g. from the companion Facebook Post actor). Feedback IDs are a faster path per entry.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Max comments per post (0 = all available)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to fetch per post. Set to 0 to fetch every available comment on the post (pagination runs until there are no more). Any positive number caps the run at that many comments per post. Free-plan runs still stop at the 50-item total regardless.",
            "default": 0
          },
          "fetchReplies": {
            "title": "Fetch threaded replies",
            "type": "boolean",
            "description": "COST WARNING: billed add-on. When true, for each comment with reply_count > 0 the Actor calls the replies endpoint and emits each reply as its own dataset row. Leave off unless you need threaded replies.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment (0 = all replies on each comment)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum replies fetched per parent comment when fetchReplies is true. Set to 0 to fetch every reply on each comment. Any positive number caps how many replies are pulled per parent comment. Free-plan runs still stop at the 50-item total regardless.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort comments by",
            "enum": [
              "top",
              "newest",
              "oldest",
              "most_reactive"
            ],
            "type": "string",
            "description": "Order in which comments are emitted per post. 'top' (default) keeps Facebook's default ordering as returned by the upstream API — fastest, streams as fetched. 'newest' / 'oldest' sort by created_at. 'most_reactive' sorts by total reaction_count descending. Any value other than 'top' buffers all fetched comments per post before sorting — no rows appear in the dataset until every upstream page has been fetched. On posts with thousands of comments this can take several minutes. Combining with commentsNewerThan means the date filter runs after fetch, so pagination still walks every page even when nothing passes the filter.",
            "default": "top"
          },
          "commentsNewerThan": {
            "title": "Only comments newer than (ISO date)",
            "type": "string",
            "description": "If set, drops any comment or reply whose created_at is older than this ISO 8601 date/time (e.g. 2026-08-01 or 2026-08-01T12:00:00Z). Filter runs after fetch, so pagination still walks every page upstream returns — set maxComments if you also want a hard fetch cap."
          },
          "enrichment": {
            "title": "Enrichment level",
            "enum": [
              "off",
              "sentiment",
              "intent",
              "full"
            ],
            "type": "string",
            "description": "Attach analysis fields to every emitted comment/reply row under `comment.enrichment`. 'off' (default) is unchanged behavior. 'sentiment' adds a local sentiment score + label plus detected language — runs entirely in-process, no external API, no key, no extra cost. 'intent' adds an LLM-classified intent label (complaint / question / purchase_intent / praise / spam / other) via Anthropic's API — requires enrichmentApiKey. 'full' does both. COST WARNING: 'intent' and 'full' trigger the enriched-comment billing event and consume tokens from your Anthropic account.",
            "default": "off"
          },
          "postSummary": {
            "title": "Add per-post AI summary row",
            "type": "boolean",
            "description": "When true, after fetching a post's comments the Actor emits one extra row (type: 'post_summary') with an LLM-generated summary of the conversation (top themes, dominant sentiment, notable quotes). Requires enrichmentApiKey. COST WARNING: triggers the post-summary billing event, one per post processed, and one LLM call per post to your Anthropic account.",
            "default": false
          },
          "enrichmentApiKey": {
            "title": "Anthropic API key (for enrichment)",
            "type": "string",
            "description": "Your Anthropic API key (sk-ant-…). Required only when enrichment is 'intent' or 'full', or when postSummary is true. Not needed for enrichment 'sentiment' (that runs locally, in-process). The key is stored encrypted per run, masked in the UI, and never logged."
          },
          "enrichmentModel": {
            "title": "Anthropic model for enrichment",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-5"
            ],
            "type": "string",
            "description": "Which Claude model runs enrichment. Default 'claude-haiku-4-5' (fastest, cheapest — roughly $0.05-$0.10 per 1,000 rows to Anthropic; strong on clear-cut classifications). Bump to 'claude-sonnet-5' for meaningfully better accuracy on subtle intents (purchase_intent vs question, sarcasm, non-English) — costs ~3× more but the system prompt is cached (Sonnet 5 caches at 1,024 tokens; Haiku 4.5 needs 4,096 so caching there is off). 'claude-opus-5' is the ceiling — use only when correctness matters more than cost. Only used when enrichment is 'intent'/'full' or postSummary is true.",
            "default": "claude-haiku-4-5"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}