{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Reviews Scraper",
    "description": "Scrape public Facebook Page reviews and recommendations: recommends / doesn't recommend, review text, reviewer, date, tags, photos, reactions, comments, business replies, Page recommend % and review count. Date, keyword and positive/negative filters, only-new monitoring. No login or cookies.",
    "version": "1.0",
    "x-build-id": "0ri30UlhBYXoRwn5M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~facebook-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-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/coregent~facebook-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-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/coregent~facebook-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-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": {
          "pageTargets": {
            "title": "Facebook Pages",
            "type": "array",
            "description": "The Pages whose public reviews to scrape. Each line can be a Page URL (https://www.facebook.com/portosbakery), its reviews URL (…/portosbakery/reviews), a handle (portosbakery), a profile.php?id= URL, or a numeric Page ID. The same Page given in several forms is scraped once. Up to 100 Pages per run.",
            "default": [
              "https://www.facebook.com/portosbakery"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search Pages by name (optional)",
            "type": "array",
            "description": "Business names to look up with Facebook's own Page search, e.g. \"Porto's Bakery\". The top matching Page(s) are scraped, and every review row records which name found it and how closely the Page name matched (resolutionConfidence HIGH / MEDIUM / LOW) — check it before trusting a same-name business. Up to 20 names.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerQuery": {
            "title": "Pages per name search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of Facebook's top Page matches to scrape for each searched name. Chains often have one Page per branch, so 1 takes only the best match.",
            "default": 1
          },
          "maxReviewsPerPage": {
            "title": "Maximum reviews per Page",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "The most reviews to return from EACH Page, newest first. 0 = every review Facebook shows a logged-out visitor (up to 10,000 per Page). You are charged only for reviews delivered.",
            "default": 100
          },
          "maxReviewsTotal": {
            "title": "Maximum reviews per run",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap on reviews across all Pages in the run. 0 = no cap.",
            "default": 0
          },
          "recommendationType": {
            "title": "Recommendation type",
            "enum": [
              "ALL",
              "RECOMMENDS",
              "DOES_NOT_RECOMMEND"
            ],
            "type": "string",
            "description": "Facebook reviews are recommendations, not star ratings: each reviewer either recommends the Page or doesn't. Choose \"Doesn't recommend\" to collect only negative reviews.",
            "default": "ALL"
          },
          "dateFrom": {
            "title": "Reviews newer than",
            "type": "string",
            "description": "Only reviews posted on or after this date: YYYY-MM-DD, an ISO timestamp, or a relative period such as \"7 days ago\" or \"3 months\". Reviews arrive newest first, so the Actor stops reading a Page at the first older review — recent-review runs are fast and cheap.",
            "default": ""
          },
          "dateTo": {
            "title": "Reviews older than",
            "type": "string",
            "description": "Only reviews posted on or before this date (YYYY-MM-DD includes the whole day), for historical windows.",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only reviews whose text or tags contain at least one of these words (case and accents ignored; \"deliver\" also matches \"delivery\"). Each row lists the keywords it matched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWithText": {
            "title": "Only reviews with text",
            "type": "boolean",
            "description": "Skip recommendations that have no written text.",
            "default": false
          },
          "onlyWithPhotos": {
            "title": "Only reviews with photos",
            "type": "boolean",
            "description": "Keep only reviews that include at least one photo.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Add the review's comments (and optionally replies) to each row. Facebook shows a logged-out visitor only some comments on a review, so a thread can have fewer than commentCount. Business-owner replies are detected either way, from the comments Facebook shows with the review.",
            "default": false
          },
          "maxCommentsPerReview": {
            "title": "Maximum comments per review",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "With \"Include comments\" on: the most top-level comments to add per review.",
            "default": 20
          },
          "maxRepliesPerComment": {
            "title": "Maximum replies per comment",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "With \"Include comments\" on: the most replies to fetch per comment. 0 = only replies Facebook already shows with the comment.",
            "default": 0
          },
          "includePageMetadata": {
            "title": "Include Page details",
            "type": "boolean",
            "description": "Add the Page's handle, reviews URL, picture, verified badge and follower count to each row's page object. The Page ID, name, URL, recommend % and review count are always included.",
            "default": true
          },
          "onlyNewReviews": {
            "title": "Only new reviews (monitor)",
            "type": "boolean",
            "description": "Return only reviews posted since the last run with the same Monitor key. The first run records a baseline and returns nothing (unless \"Return baseline reviews\" is on); later runs stop as soon as they reach a review they have already seen. Schedule it daily to track new reviews.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Any name for this monitor, e.g. \"client-reviews\". Required with \"Only new reviews\". Use the same key on every scheduled run; a different key starts a new baseline.",
            "default": ""
          },
          "emitBaselineReviews": {
            "title": "Return baseline reviews",
            "type": "boolean",
            "description": "On the first monitor run, also return (and be charged for) the reviews used as the baseline, instead of returning nothing.",
            "default": false
          },
          "maxReviewsScannedPerPage": {
            "title": "Maximum reviews scanned per Page",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How far to read into a Page looking for reviews that pass your filters. 0 = automatic: equal to \"Maximum reviews per Page\" without filters, ten times it (at least 300) with filters. Scanned-but-filtered reviews are not charged.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many Pages are read at the same time. Reviews of one Page are always read in order. Lower this if you see rate-limit warnings.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (Datacenter) is on by default. APIFY RESIDENTIAL IS NOT SUPPORTED — a run that selects it uses Apify Datacenter instead, with a warning: residential bandwidth is billed to the Actor rather than to your run and costs more than the reviews are priced at. If you need residential routing, supply your own provider under Custom proxy URLs — that traffic goes through your account.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}