{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Business Page Recommendation & Review Scraper",
    "description": "Get Facebook business page reviews by direct URL, business name search, or Page ID, with Recommended/Not Recommended status, owner replies, and filters for date, keyword, and recommendation status.",
    "version": "2.0",
    "x-build-id": "mOLyljzUlnPCEScHZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~facebook-business-page-recommendation-and-review/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-facebook-business-page-recommendation-and-review",
        "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/nimbryxo-studio~facebook-business-page-recommendation-and-review/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-facebook-business-page-recommendation-and-review",
        "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/nimbryxo-studio~facebook-business-page-recommendation-and-review/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-facebook-business-page-recommendation-and-review",
        "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 Page URLs",
            "type": "array",
            "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.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Page URL",
                  "type": "string",
                  "description": "Facebook business Page URL or /reviews URL."
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "pageIds": {
            "title": "Facebook Page IDs or Usernames",
            "type": "array",
            "description": "Numeric Facebook Page IDs (e.g. 100064458773195) or page usernames (e.g. mcdonalds). Use this when you do not have a full URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Reviews",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "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.",
            "default": 100
          },
          "maxPerPage": {
            "title": "Max Reviews Per Page",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Optional cap per Facebook page for multi-page runs. Leave empty to share the global Max Reviews cap across pages."
          },
          "includeReplies": {
            "title": "Include Comments and Owner Replies",
            "type": "boolean",
            "description": "Include the visible top comments and business owner replies inside each review row. When disabled, commentCount is still returned.",
            "default": true
          },
          "includePageSummary": {
            "title": "Include Page Summary Row",
            "type": "boolean",
            "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.",
            "default": true
          },
          "onlyNew": {
            "title": "Only New Reviews (Monitor Mode)",
            "type": "boolean",
            "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.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor State Key",
            "type": "string",
            "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."
          },
          "recommendation": {
            "title": "Recommendation Filter",
            "enum": [
              "all",
              "recommended",
              "not"
            ],
            "type": "string",
            "description": "Only return reviews with the selected recommendation status. Facebook uses binary Recommended / Not Recommended, not star ratings.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Date From (YYYY-MM-DD)",
            "type": "string",
            "description": "Only return reviews posted on or after this date. Reviews are newest-first, so collection stops when it passes this date."
          },
          "dateTo": {
            "title": "Date To (YYYY-MM-DD)",
            "type": "string",
            "description": "Only return reviews posted on or before this date."
          },
          "keyword": {
            "title": "Keyword Filter",
            "type": "string",
            "description": "Only return reviews whose text contains this word or phrase (case-insensitive)."
          },
          "requestDelayMs": {
            "title": "Delay Between Requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Pause between review requests. 500-800 ms is a polite pace and keeps long runs stable.",
            "default": 600
          },
          "maxRuntimeSecs": {
            "title": "Run Time Budget (seconds)",
            "minimum": 30,
            "maximum": 7200,
            "type": "integer",
            "description": "Stop collecting after this many seconds and return what has been collected so far.",
            "default": 1800
          },
          "failOnEmpty": {
            "title": "Fail When Nothing Is Found",
            "type": "boolean",
            "description": "Mark the run as failed when no review rows are returned. Monitor-mode runs that legitimately have no new reviews never fail.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "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."
          },
          "cookies": {
            "title": "Optional Facebook Cookies",
            "type": "array",
            "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.",
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}