{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Comments Scraper With Author Lead Enrichment",
    "description": "💬 Facebook Comments Scraper extracts comments, replies, authors, timestamps, reactions & permalinks from public or authorized posts/pages. 📊 Export CSV/JSON for sentiment, social listening & customer feedback. ⚡ Fast, reliable & proxy-ready. Ideal for research & marketing.",
    "version": "0.1",
    "x-build-id": "niSWOKO9eaHpWz09Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~facebook-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-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/api-empire~facebook-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-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/api-empire~facebook-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-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 posts to mine for commenter leads",
            "type": "array",
            "description": "📋 One URL per line. Works with public **post**, **photo**, and **reel** permalinks from facebook.com. Also accepts the base `startUrls` key.\n\n💡 Run a small test first, then raise the commenter limit.",
            "items": {
              "type": "string"
            }
          },
          "maxCommenters": {
            "title": "👥 Max commenters per post",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 Hard cap on how many top-level commenters (leads) to collect per URL. Also accepts the base `maxComments` / `commentSettings.maxComments`.\n\nExample: maxCommenters=50 → up to 50 lead rows per post."
          },
          "maxCommentsScanned": {
            "title": "💬 Max comments scanned per post",
            "minimum": 1,
            "type": "integer",
            "description": "🎯 Hard cap on how many top-level comments are walked/scanned per URL before lead rows are built — lower = faster. The final lead-row count is the smaller of this and `maxCommenters`. Also accepts the base `maxComments` / `commentSettings.maxComments`."
          },
          "maxRepliesScanned": {
            "title": "🧵 Max replies scanned per comment",
            "minimum": 0,
            "type": "integer",
            "description": "↩️ Nested replies fetched per threaded commenter (kept in each lead row's `reply[]`, also contact-scanned). Set 0 to skip replies, or a large number for effectively all. Also accepts the base `maxRepliesPerComment` / `commentSettings.maxRepliesPerComment`."
          },
          "commentsSortOrder": {
            "title": "📊 Commenter order",
            "enum": [
              "most_relevant",
              "newest",
              "all"
            ],
            "type": "string",
            "description": "🔀 Order commenters are collected in (top / newest / all). Also accepts the base `commentSettings.commentsSortOrder`."
          },
          "extractCommentContacts": {
            "title": "📇 Extract emails, phones & links from comment text",
            "type": "boolean",
            "description": "🔍 Regex out `commentEmails`, `commentPhones` and `commentLinks` from every comment body, set a `hasContact` flag, and compute a 0-100 `leadScore`. Turn OFF for identity-only lead rows. Default: ON.",
            "default": true
          },
          "enrichAuthorProfiles": {
            "title": "🕵️ Enrich each commenter's profile (bio, followers, category)",
            "type": "boolean",
            "description": "🌐 When ON, fetches each unique commenter's PUBLIC Facebook profile/page (logged-out) and adds `authorBio`, `authorFollowers`, `authorCategory`, `authorLikes` (plus `authorProfileFetched` so you can tell real nulls from misses). Adds one request per unique commenter, so it is slower.\n\n✅ Works for commenters who have a public page-style profile — creators, freelancers, businesses, public figures (typically the highest-value leads). ❌ Meta serves no public profile data at all for private personal profiles when logged out, so those rows keep `null` — never faked. Default: OFF.",
            "default": false
          },
          "onlyCommentersNewerThan": {
            "title": "📅 Only commenters newer than",
            "type": "string",
            "description": "Absolute date (`2024-01-15`) or relative window (`1 day`, `2 weeks`, `3 months`). Keeps only commenters whose comment is newer than this. Leave blank to disable. Also accepts the base `onlyCommentsNewerThan`.\n\nℹ️ Filtering happens after fetch, so set the commenter cap generously for narrow windows."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "ℹ️ Informational only — the scraper always attaches Apify residential proxy at runtime regardless of this setting."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}