{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper & Tagged Profiles Extractor",
    "description": "Facebook Comments Scraper: Extract comments and tagged profiles from Facebook posts, including usernames, comment text, timestamps, reactions, and profile URLs. Analyze audience engagement, discover tagged users, monitor conversations, and build structured datasets for social media research.",
    "version": "0.1",
    "x-build-id": "ZmLrLxQcls0c19FA9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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 / video / photo links",
            "type": "array",
            "description": "Public Facebook permalinks to read comments from — one per line. Example: https://www.facebook.com/{page}/posts/{id}. Also accepts the base `startUrls` key.",
            "items": {
              "type": "string"
            }
          },
          "includeAttachments": {
            "title": "📎 Extract comment attachments",
            "type": "boolean",
            "description": "When on, each comment row gets `attachments[]` = {type (sticker/photo/gif/video/link), url, title} plus a `hasAttachment` boolean. Turn off to blank out media on comments and replies. Default: on.",
            "default": true
          },
          "includeMentions": {
            "title": "🏷️ Extract @-mentions & tagged entities",
            "type": "boolean",
            "description": "When on, each comment row gets `mentions[]` = {id, name, url} for every @-tagged profile/page in the comment text, plus `taggedProfiles[]` / `taggedProfilesCount` aggregating the tagged profiles found in the comment AND in its fetched replies (deduplicated by Facebook profile id). Default: on.",
            "default": true
          },
          "mediaOnly": {
            "title": "🎯 Only comments that contain media",
            "type": "boolean",
            "description": "When on, only comments with at least one attachment (sticker/photo/GIF/video/link) are saved. Great for harvesting reaction GIFs and shared images. Default: off.",
            "default": false
          },
          "mediaScanSettings": {
            "title": "📊 Media scan depth & order",
            "type": "object",
            "description": "How wide to scan each post for comment media & mentions: how many comments, how deep into replies, and in what order.",
            "properties": {
              "commentsToScan": {
                "title": "💬 Comments to scan per post",
                "type": "integer",
                "description": "Hard cap on top-level comments scanned AND returned per URL. Facebook serves 10 comments per page, so the result is truncated to exactly this number. Example: 20. Default: 10.",
                "editor": "number",
                "prefill": 10,
                "minimum": 1,
                "maximum": 2000
              },
              "repliesToScan": {
                "title": "↩️ Replies to scan per comment",
                "type": "integer",
                "description": "Nested replies to scan per threaded comment. Replies carry their own attachments and @-mentions, and their tagged profiles are merged into the parent row's `taggedProfiles[]`. Set 0 to skip reply fetching entirely (much faster). Use a large number for effectively all. Default: 1.",
                "editor": "number",
                "prefill": 1,
                "minimum": 0,
                "maximum": 500
              },
              "scanOrder": {
                "title": "🔀 Scan order",
                "type": "string",
                "description": "Which comment feed Facebook itself returns. This is sent to Facebook as the real comment-ordering intent token, so it changes WHICH comments come back, not just their order: ⭐ Most relevant = Facebook's ranked/filtered feed, 🆕 Newest first = most recent activity, 📜 All = ranked but unfiltered (includes low-quality/filtered comments).",
                "editor": "select",
                "enum": [
                  "most_relevant",
                  "newest",
                  "all"
                ],
                "enumTitles": [
                  "⭐ Most relevant",
                  "🆕 Newest first",
                  "📜 All comments (unfiltered)"
                ],
                "default": "all",
                "prefill": "all"
              }
            }
          },
          "postedAfter": {
            "title": "📅 Only comments newer than",
            "type": "string",
            "description": "Absolute date (e.g. `2024-01-15`) or relative window (e.g. `1 day`, `2 weeks`, `3 months`). Only comments/replies posted after this point are kept. Leave blank to disable. Also accepts the base `onlyCommentsNewerThan` key."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Which network the scraper goes out on. Honored exactly as set: pick a different Apify proxy group and the exit network really changes; switch the proxy off and the run goes direct (Facebook usually blocks that for logged-out reads). Leave on RESIDENTIAL for the highest success rate.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}