{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper",
    "description": "Scrape comments from one or MANY Facebook post URLs in a single run. Returns comment text, author, likes, reply counts and timestamps, with each comment attributed back to the post URL it came from.",
    "version": "0.0",
    "x-build-id": "7ta1XdglTi3zmRsIO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/outspoken_strategy~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-outspoken_strategy-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/outspoken_strategy~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-outspoken_strategy-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/outspoken_strategy~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-outspoken_strategy-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 URLs",
            "type": "array",
            "description": "Facebook post URLs to scrape comments from (post permalinks — e.g. https://www.facebook.com/PAGE/posts/..., permalink.php?story_fbid=..., /videos/..., /reel/... or group permalinks). Accepts many posts per run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "postUrls": {
            "title": "Post URLs (plain list)",
            "type": "array",
            "description": "Alternative to startUrls: a plain list of post URL strings. Both fields can be used together; URLs are merged and de-duplicated.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of comments to collect for EACH post URL (not a total across posts). Higher values make runs longer.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include replies (nested comments)",
            "type": "boolean",
            "description": "Also expand and collect replies to comments. Replies have isReply=true, a threadingDepth > 0 and count toward the per-post limit. Slower when enabled.",
            "default": false
          },
          "sortComments": {
            "title": "Comment ordering",
            "enum": [
              "all",
              "relevant",
              "newest"
            ],
            "type": "string",
            "description": "Which Facebook comment ordering to request before collecting. \"All comments\" surfaces the most comments and is the best choice for scraping; \"Most relevant\" keeps Facebook's default filter; \"Newest first\" is not available on every post. Switching is best-effort — if the menu is not found, the post's default ordering is used.",
            "default": "all"
          },
          "cookies": {
            "title": "Facebook session cookies",
            "type": "array",
            "description": "Cookies of a logged-in Facebook session as a JSON array. How to get them: 1) create/use a THROWAWAY Facebook account (never your personal one), 2) log into it in your browser, 3) export cookies with an extension such as Cookie-Editor (Export -> JSON), 4) paste the JSON array here. The \"c_user\" and \"xs\" cookies must be present. Leave empty to use the actor's default session."
          },
          "fbEmail": {
            "title": "Facebook email (automated login)",
            "type": "string",
            "description": "Alternative to cookies: email/phone of a throwaway Facebook account. If set together with fbPassword, the actor logs in itself and caches the session for future runs. The account must have 2FA disabled. Cookie export is more reliable — automated logins from datacenter IPs often trigger Facebook checkpoints."
          },
          "fbPassword": {
            "title": "Facebook password (automated login)",
            "type": "string",
            "description": "Password for the account in fbEmail. Stored encrypted."
          },
          "resultsLimit": {
            "title": "Results limit (alias)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Alias for \"Max comments per post\", kept for compatibility with integrations built against apify/facebook-comments-scraper. If both are set, maxComments wins."
          },
          "includeNestedComments": {
            "title": "Include nested comments (alias)",
            "type": "boolean",
            "description": "Alias for \"Include replies\", kept for compatibility with integrations built against apify/facebook-comments-scraper. Enabling either option expands replies.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy to route traffic through. Keep Apify RESIDENTIAL proxies with a country set — Facebook blocks most datacenter IPs, and the random global residential pool often hands out dead exit IPs, so the actor defaults RESIDENTIAL to US exits when no country is chosen.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "headless": {
            "title": "Run browser headless",
            "type": "boolean",
            "description": "Uncheck to run a headed browser (useful only for local debugging).",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}