{
  "description": "Scrape public Facebook business page recommendations and reviews by page URL, numeric Page ID, or username. Returns review rows plus one page-summary row per page.",
  "properties": {
    "cookies": {
      "default": [],
      "description": "Optional Facebook cookies exported from a logged-in browser. They are not required and do not increase how many reviews Facebook serves per request; the actor returns real reviews without them.",
      "editor": "json",
      "title": "Optional Facebook Cookies",
      "type": "array"
    },
    "dateFrom": {
      "description": "Only return reviews posted on or after this date. Reviews are newest-first, so collection stops when it passes this date.",
      "editor": "textfield",
      "title": "Date From (YYYY-MM-DD)",
      "type": "string"
    },
    "dateTo": {
      "description": "Only return reviews posted on or before this date.",
      "editor": "textfield",
      "title": "Date To (YYYY-MM-DD)",
      "type": "string"
    },
    "failOnEmpty": {
      "default": false,
      "description": "Mark the run as failed when no review rows are returned. Monitor-mode runs that legitimately have no new reviews never fail.",
      "prefill": false,
      "title": "Fail When Nothing Is Found",
      "type": "boolean"
    },
    "includePageSummary": {
      "default": true,
      "description": "Emit one recordType=page row per page with the recommendation percentage, total review count, followers, and talking-about count. This adds no extra requests.",
      "prefill": true,
      "title": "Include Page Summary Row",
      "type": "boolean"
    },
    "includeReplies": {
      "default": true,
      "description": "Include the visible top comments and business owner replies inside each review row. When disabled, commentCount is still returned.",
      "prefill": false,
      "title": "Include Comments and Owner Replies",
      "type": "boolean"
    },
    "keyword": {
      "description": "Only return reviews whose text contains this word or phrase (case-insensitive).",
      "editor": "textfield",
      "title": "Keyword Filter",
      "type": "string"
    },
    "maxItems": {
      "default": 100,
      "description": "Maximum number of review rows to return across all pages (1-2000). Facebook returns roughly 2-3 reviews per request (about 2.7 on average) even when a larger count is requested, so 100 reviews needs about 35-40 requests.",
      "editor": "number",
      "maximum": 2000,
      "minimum": 1,
      "prefill": 5,
      "title": "Max Reviews",
      "type": "integer"
    },
    "maxPerPage": {
      "description": "Optional cap per Facebook page for multi-page runs. Leave empty to share the global Max Reviews cap across pages.",
      "editor": "number",
      "maximum": 2000,
      "minimum": 1,
      "title": "Max Reviews Per Page",
      "type": "integer"
    },
    "maxRuntimeSecs": {
      "default": 1800,
      "description": "Stop collecting after this many seconds and return what has been collected so far.",
      "editor": "number",
      "maximum": 7200,
      "minimum": 30,
      "prefill": 1800,
      "title": "Run Time Budget (seconds)",
      "type": "integer"
    },
    "onlyNew": {
      "default": false,
      "description": "Return only reviews not seen in the saved state for this page. The state is stored in a named key-value store that persists across runs, so scheduled runs can monitor for new reviews.",
      "prefill": false,
      "title": "Only New Reviews (Monitor Mode)",
      "type": "boolean"
    },
    "pageIds": {
      "default": [],
      "description": "Numeric Facebook Page IDs (e.g. 100064458773195) or page usernames (e.g. mcdonalds). Use this when you do not have a full URL.",
      "editor": "stringList",
      "prefill": [],
      "title": "Facebook Page IDs or Usernames",
      "type": "array"
    },
    "proxyConfiguration": {
      "description": "Optional. Leave empty to let the actor choose automatically: it tries a direct connection first and only escalates through Apify Proxy if Facebook blocks the request. Change this only if you need a specific proxy setup.",
      "editor": "proxy",
      "title": "Proxy Configuration",
      "type": "object"
    },
    "recommendation": {
      "default": "all",
      "description": "Only return reviews with the selected recommendation status. Facebook uses binary Recommended / Not Recommended, not star ratings.",
      "editor": "select",
      "enum": [
        "all",
        "recommended",
        "not"
      ],
      "enumTitles": [
        "All Reviews",
        "Recommended Only",
        "Not Recommended Only"
      ],
      "prefill": "all",
      "title": "Recommendation Filter",
      "type": "string"
    },
    "requestDelayMs": {
      "default": 600,
      "description": "Pause between review requests. 500-800 ms is a polite pace and keeps long runs stable.",
      "editor": "number",
      "maximum": 5000,
      "minimum": 0,
      "prefill": 600,
      "title": "Delay Between Requests (ms)",
      "type": "integer"
    },
    "startUrls": {
      "default": [],
      "description": "Facebook business page URLs or /reviews URLs (e.g. https://www.facebook.com/mcdonalds/reviews). /reviews is added automatically when missing. Invalid or dead page URLs fail fast instead of being guessed.",
      "editor": "requestListSources",
      "items": {
        "properties": {
          "url": {
            "description": "Facebook business Page URL or /reviews URL.",
            "title": "Page URL",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "prefill": [
        {
          "url": "https://www.facebook.com/mcdonalds/reviews"
        }
      ],
      "title": "Facebook Page URLs",
      "type": "array"
    },
    "stateKey": {
      "description": "Optional prefix for the key-value store key used by monitor mode. Each page's state is stored separately. Leave empty to use the page ID.",
      "editor": "textfield",
      "title": "Monitor State Key",
      "type": "string"
    }
  },
  "schemaVersion": 1,
  "title": "Facebook Business Page Review Scraper Input",
  "type": "object"
}
