{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper: Comments, Replies & Reactions",
    "description": "Scrape comments and replies from public Facebook posts, photos, videos and reels: text, author and profile link, date, reactions by type, reply counts and a direct link to each comment. Filter by date, such as the last 7 days, for scheduled monitoring. Skipped comments cost nothing.",
    "version": "0.1",
    "x-build-id": "82wEpd4RgVuBX6THg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-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/automatic~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-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/automatic~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-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": "Facebook post, video, photo or Page links",
            "maxItems": 100,
            "type": "array",
            "description": "Public Page post links, photo, video, reel and watch links, share links (facebook.com/share/…, fb.watch) or Page URLs. Comment links read the whole post. For a Page URL, comments come from its latest public posts (see Posts per Page). Example: https://www.facebook.com/NASA/posts/… . Duplicates are removed; unsupported links are skipped and listed in the run summary. Empty input runs an announced five-comment NASA sample.",
            "items": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most comments to save from each post, replies included. Example: 100. Facebook may show fewer public comments than its displayed total.",
            "default": 100
          },
          "maxPostsPerPage": {
            "title": "Posts per Page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "For Page URLs only: how many of the Page's recent public posts to read, in the order the Page shows them (pinned posts can come first). Example: 5.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum comments in this run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most comments to save in this run across all links, replies included. Example: 500.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include public replies",
            "type": "boolean",
            "description": "Also save replies, up to two reply levels, as their own rows with depth and parentId. Replies count toward the same limits.",
            "default": false
          },
          "sort": {
            "title": "Comment order",
            "enum": [
              "most_relevant",
              "newest"
            ],
            "type": "string",
            "description": "Most relevant follows Facebook's default ranking. Newest first returns the latest comments first and works best with a date filter.",
            "default": "most_relevant"
          },
          "onlyCommentsNewerThan": {
            "title": "Only comments newer than",
            "maxLength": 24,
            "type": "string",
            "description": "Optional. A UTC date such as 2026-11-01 or a relative age such as 24 hours, 7 days or 2 weeks (counted back from the run start, handy for scheduled runs). Comments outside the window are skipped and not charged. With Newest first, reading stops at the first older comment."
          },
          "onlyCommentsOlderThan": {
            "title": "Only comments older than",
            "maxLength": 24,
            "type": "string",
            "description": "Optional. A UTC date such as 2026-11-01 or a relative age such as 30 days. Combine with Only comments newer than for a date range. Skipped comments are not charged."
          },
          "proxyConfiguration": {
            "title": "Connection settings",
            "type": "object",
            "description": "Optional Apify connection settings. Example: {\"useApifyProxy\":true,\"apifyProxyCountry\":\"US\"}.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          },
          "residentialFallback": {
            "title": "Retry blocked pages on another connection",
            "type": "boolean",
            "description": "When Facebook refuses a public page on the default connection, retry it on an alternative one. Example: true. Saved comments are kept.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}