{
  "description": "Find Facebook business pages by keyword and city, or enrich page URLs and IDs with public contact details. Keyword search uses Facebook's own page search and needs a Facebook session; page enrichment runs without cookies.",
  "properties": {
    "categoryFilter": {
      "default": [],
      "description": "Keep pages whose enriched category contains any of these terms (case-insensitive). Filtering happens after enrichment.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Category Filter",
      "type": "array"
    },
    "contactFilter": {
      "default": "any",
      "description": "Keep only lead-ready pages that expose the selected contact field.",
      "editor": "select",
      "enum": [
        "any",
        "email",
        "phone",
        "website"
      ],
      "enumTitles": [
        "Any page",
        "Has email",
        "Has phone",
        "Has website"
      ],
      "prefill": "any",
      "title": "Contact Filter",
      "type": "string"
    },
    "cookies": {
      "description": "Optional. Needed only for keyword discovery. c_user and xs are enough. Accepts a JSON array of cookie objects or a raw name=value; name2=value2 Cookie header. Page enrichment works without cookies.",
      "editor": "textfield",
      "isSecret": true,
      "prefill": "",
      "sectionCaption": "Discovery authentication",
      "sectionDescription": "Cookies are used only for Facebook page search. They are never sent when enriching public page URLs.",
      "title": "Facebook Session Cookies",
      "type": "string"
    },
    "failOnEmpty": {
      "default": false,
      "description": "Fail the run when zero page rows are produced. Leave off to finish successfully with diagnostic rows explaining why nothing was found.",
      "prefill": false,
      "title": "Fail When Empty",
      "type": "boolean"
    },
    "includeFailedPages": {
      "default": true,
      "description": "Emit diagnostic rows with errorCode, detailsError, and fieldsFound for pages that cannot be enriched. This prevents silent empty runs.",
      "prefill": true,
      "title": "Include Failed Pages",
      "type": "boolean"
    },
    "includeReviews": {
      "default": true,
      "description": "Fetch the public reviews tab and include reviews when Facebook exposes them. Adds one request per page. Review coverage is partial.",
      "prefill": false,
      "title": "Include Reviews",
      "type": "boolean"
    },
    "locations": {
      "default": [],
      "description": "City or region names added to the search query as a soft hint. Facebook does not expose a reliable city filter, so always verify the enriched address. Use strictLocation to drop rows whose address does not contain the location.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Locations",
      "type": "array"
    },
    "maxItems": {
      "default": 100,
      "description": "Maximum number of successful page rows. Failed rows do not consume this limit.",
      "maximum": 5000,
      "minimum": 1,
      "prefill": 1,
      "title": "Maximum Pages",
      "type": "integer"
    },
    "minFollowers": {
      "default": 0,
      "description": "Keep pages with at least this many followers. Pages with no follower count are dropped when this is above 0.",
      "maximum": 100000000,
      "minimum": 0,
      "prefill": 0,
      "title": "Minimum Followers",
      "type": "integer"
    },
    "pageIds": {
      "default": [],
      "description": "Facebook numeric Page IDs, usernames, or page URLs. Numeric IDs are fetched through https://www.facebook.com/<id>.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Page IDs or Usernames",
      "type": "array"
    },
    "proxyConfiguration": {
      "default": {
        "apifyProxyGroups": [
          "RESIDENTIAL"
        ],
        "useApifyProxy": true
      },
      "description": "Used only for keyword discovery. Defaults to Apify residential proxy because Facebook search blocks datacenter IPs. Public page enrichment does not use it.",
      "editor": "proxy",
      "prefill": {
        "apifyProxyGroups": [
          "RESIDENTIAL"
        ],
        "useApifyProxy": true
      },
      "title": "Proxy Configuration",
      "type": "object"
    },
    "searchTerms": {
      "default": [],
      "description": "Keywords for Facebook page discovery, for example Coffee Shop or Dentist. Each term is combined with each location as a text query. Facebook keyword search requires a cookie containing both c_user and xs.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Search Terms",
      "type": "array"
    },
    "startUrls": {
      "default": [],
      "description": "Direct Facebook page URLs to enrich, for example https://www.facebook.com/ozonecoffeeuk. Can be combined with pageIds and searchTerms.",
      "editor": "requestListSources",
      "items": {
        "properties": {
          "url": {
            "description": "A Facebook Page URL.",
            "title": "Page URL",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "prefill": [
        {
          "url": "https://www.facebook.com/nike"
        }
      ],
      "title": "Facebook Page URLs",
      "type": "array"
    },
    "strictLocation": {
      "default": false,
      "description": "Drop pages whose enriched address does not contain the search location. This is a best-effort post-filter, not an exact city boundary.",
      "prefill": false,
      "title": "Strict Location Post-Filter",
      "type": "boolean"
    },
    "verifiedOnly": {
      "default": false,
      "description": "Keep only pages whose public payload explicitly marks them as verified.",
      "prefill": false,
      "title": "Verified Pages Only",
      "type": "boolean"
    }
  },
  "schemaVersion": 1,
  "title": "Facebook Business Page Finder Input",
  "type": "object"
}
