{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper",
    "description": "Facebook comments scraper: paste post, reel, video or photo links and get every public comment and 3-level reply with author, text, date, reactions by type, GIFs, photos and links. One flat price: $0.24/1k Starter ($0.19 Business). $0 start fee, $0 request fees, $0 add-ons. No login.",
    "version": "0.3",
    "x-build-id": "tSqusz2MFXUlJ5HMW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-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/deepmine~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-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/deepmine~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-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, reel, video or photo links",
            "type": "array",
            "description": "Public Facebook links: posts (<code>/posts/pfbid...</code>, <code>permalink.php?story_fbid=...</code>), reels (<code>/reel/...</code>), videos (<code>/videos/...</code>, <code>watch/?v=...</code>, <code>fb.watch/...</code>), photos (<code>photo/?fbid=...</code>), share links (<code>/share/p/...</code>, <code>/share/r/...</code>, <code>/share/v/...</code>) and public group posts. Page links are rejected: a page has no comment thread of its own.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resultsLimit": {
            "title": "Comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "Up to this many comments (replies included) from each link. Empty: every comment Facebook shows, like apify/facebook-comments-scraper."
          },
          "includeNestedComments": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Replies too, up to the 3 levels Facebook shows (comment, reply, reply to a reply), each as its own row with the comment it answers and its thread's first comment. Replies count toward 'Comments per post'."
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Up to this many replies under each comment (with 'Include replies'). Empty: every reply. 0: none."
          },
          "viewOption": {
            "title": "Sort comments",
            "enum": [
              "RANKED_UNFILTERED",
              "RANKED_THREADED",
              "RECENT_ACTIVITY"
            ],
            "type": "string",
            "description": "Facebook's own comment orders.",
            "default": "RANKED_UNFILTERED"
          },
          "onlyCommentsNewerThan": {
            "title": "Comments newer than",
            "type": "string",
            "description": "Only comments written after this date: <code>2026-01-31</code>, an ISO time, or relative like <code>7 days</code>, <code>3 months</code>. Comments are then read newest first, and reading stops at the first older one."
          },
          "onlyCommentsOlderThan": {
            "title": "Comments older than",
            "type": "string",
            "description": "Only comments written before this date (same formats). With 'Comments newer than' this keeps a window."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy datacenter IPs by default.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Retry refused calls on residential IPs",
            "type": "boolean",
            "description": "When Facebook refuses a datacenter IP, ask again on a residential one.",
            "default": true
          },
          "postUrls": {
            "title": "Post URLs (alias)",
            "type": "array",
            "description": "Additional public post URLs. Combined with startUrls; repeated links are skipped.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "targetComments": {
            "title": "Target comments (alias)",
            "minimum": -1,
            "type": "integer",
            "description": "Comments and replies per post. -1 means all. If resultsLimit is also set, the smaller positive limit applies."
          },
          "orderingMode": {
            "title": "Ordering mode (alias)",
            "enum": [
              "MOST_RELEVANT",
              "NEWEST",
              "ALL"
            ],
            "type": "string",
            "description": "Use this when viewOption is unset or set to its published default."
          },
          "includeReplies": {
            "title": "Include replies (alias)",
            "type": "boolean",
            "description": "Used when includeNestedComments is unset."
          },
          "proxyUrls": {
            "title": "Custom proxy URLs (alias)",
            "type": "array",
            "description": "HTTP(S) proxy addresses. Used when proxyConfiguration is unset or set to its published default.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}