{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Reviews Scraper — Bulk CSV & Webhook API",
    "description": "Collect source-returned Facebook page reviews and ratings; accessible coverage varies by page. Bulk export: JSON, CSV, Excel and API. PPE: from $1.2/1K review results; start fee, usage extra; mode rates differ. Optional webhook delivery.",
    "version": "1.0",
    "x-build-id": "WGAzYHjkaiE4Twia4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apivault_labs~facebook-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apivault_labs-facebook-reviews-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/apivault_labs~facebook-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apivault_labs-facebook-reviews-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/apivault_labs~facebook-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apivault_labs-facebook-reviews-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": {
          "startUrls": {
            "title": "Facebook Page URLs",
            "type": "array",
            "description": "Facebook page URL or numeric ID. Page summaries may be returned and billed even when individual reviews are unavailable.",
            "items": {
              "type": "string"
            },
            "default": [
              "https://www.facebook.com/portosbakery"
            ]
          },
          "searchQueries": {
            "title": "Keyword search (optional)",
            "type": "array",
            "description": "Optional. Business/brand keywords to discover public Facebook pages (via search engines) and scrape their reviews. Use instead of, or together with, URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerPage": {
            "title": "Max reviews per page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum verified review rows saved per page from the available public response. This is a cap, not a promise that reviews are accessible.",
            "default": 5
          },
          "maxResults": {
            "title": "Max results (cost cap)",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap on review rows across all pages; 0 disables the review cap. Page summaries are separate paid events. No pagination/full-history guarantee.",
            "default": 5
          },
          "maxCostUsd": {
            "title": "Max cost USD (cost cap)",
            "minimum": 0,
            "type": "number",
            "description": "Event budget including one Actor start, page and review events at your plan prices. 0 disables this local guard. Platform and proxy costs are additional; use the platform max charge setting too.",
            "default": 0
          },
          "sinceDays": {
            "title": "Only reviews from last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Include reviews with a known publication date within N days. Unknown dates are excluded."
          },
          "keywordFilter": {
            "title": "Review text keyword filter",
            "type": "string",
            "description": "Optional. Keep only reviews whose text contains this keyword (case-insensitive)."
          },
          "onlyNewSinceLastRun": {
            "title": "Incremental — only new reviews",
            "type": "boolean",
            "description": "Require your own stateStoreName. Skip confirmed reviews previously delivered for this URL/search/filter scope. Stores the latest 50,000 keys; older reviews can reappear. Concurrent runs with one scope are unsupported.",
            "default": false
          },
          "analyzeSentiment": {
            "title": "English sentiment heuristic",
            "type": "boolean",
            "description": "English word lexicon plus explicit recommendation/star signals. No AI model. Other languages may be misclassified.",
            "default": true
          },
          "enrichPageContacts": {
            "title": "Extract page contact (email / phone)",
            "type": "boolean",
            "description": "Public contact fields from the verified page intro only, when provided by Facebook. Unknown values remain null.",
            "default": true
          },
          "includeMedia": {
            "title": "Include review photos",
            "type": "boolean",
            "description": "Include photo/image URLs attached to reviews when present.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to scrape in parallel. Recommended 3-8.",
            "default": 3
          },
          "timeout": {
            "title": "Timeout per page (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time to wait for each page fetch.",
            "default": 45
          },
          "maxRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for a blocked/failed fetch, each rotating a fresh proxy IP with backoff. 0-8.",
            "default": 0
          },
          "useResidentialProxy": {
            "title": "Allow residential proxy fallback",
            "type": "boolean",
            "description": "Optional paid fallback for blocked requests. A verified page with no review evidence is terminal and does not trigger residential retries.",
            "default": false
          },
          "proxyCountry": {
            "title": "Proxy country code (geo-targeting)",
            "type": "string",
            "description": "ISO 2-letter country code (e.g. US, GB, DE). Geo-targets both proxies to get region-specific availability and avoid locale redirects. Empty = automatic.",
            "default": ""
          },
          "dedupe": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Drop duplicate input pages and duplicate reviews (same review ID), so the same review is never saved or billed twice.",
            "default": true
          },
          "notifyWebhookUrl": {
            "title": "Real-time webhook URL",
            "type": "string",
            "description": "Optional HTTPS endpoint receiving each confirmed review row. Failures are recorded in ERRORS; they do not undo Dataset delivery."
          },
          "stateStoreName": {
            "title": "Your incremental state store",
            "type": "string",
            "description": "Required with onlyNewSinceLastRun. Use a store you own; 3–63 letters, digits or hyphens. Do not run the same scope concurrently."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}