{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Pages Scraper By Category & Location Filter",
    "description": "Scrape detailed Facebook page data with the Facebook Page Scraper. Extract page names, usernames, descriptions, followers, likes, posts, and engagement stats. Ideal for competitor analysis, market research, and social media insights. Fast, reliable, and scalable for single or multiple pages.",
    "version": "0.1",
    "x-build-id": "YpMfzC8ZgoowkhNCo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~facebook-pages-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-facebook-pages-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/scrapier~facebook-pages-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-facebook-pages-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/scrapier~facebook-pages-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-facebook-pages-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": {
          "pageUrls": {
            "title": "🔗 Facebook pages to scan",
            "type": "array",
            "description": "📝 Full page links or bare usernames, one per line — the pool that gets scraped and then filtered. 🎯 Examples: https://www.facebook.com/copperkettleyqr or copperkettleyqr. (Backward compatible: a base `startUrls` field is still accepted.)",
            "items": {
              "type": "string"
            }
          },
          "filterCategories": {
            "title": "🧩 Keep only these categories",
            "type": "array",
            "description": "🎯 Case-insensitive allow-list matched against each page's category / categories. A page is KEPT only if one of its categories contains one of these terms. Example: [\"restaurant\", \"cafe\"] keeps eateries and drops everything else. Leave empty to skip the category filter.",
            "items": {
              "type": "string"
            }
          },
          "filterLocations": {
            "title": "📍 Keep only these locations",
            "type": "array",
            "description": "🌍 Case-insensitive allow-list matched against each page's address (and the page info line). A page is KEPT only if its location contains one of these terms. Example: [\"Regina\", \"London\"] keeps pages in those places. Leave empty to skip the location filter.",
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "⭐ Minimum recommend rating (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "📊 Keep only pages whose visitor recommend rating (0–100%, the `ratingOverall` field) is at least this value. Pages with no rating are dropped when this is set. Example: 80 keeps pages recommended by ≥80% of reviewers. 0 or empty = no rating filter.",
            "default": 0
          },
          "minFollowers": {
            "title": "👥 Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "📈 Keep only pages with at least this many followers. Pages with no follower count are dropped when this is set. Example: 10000 keeps pages with 10k+ followers. 0 or empty = no follower filter.",
            "default": 0
          },
          "filterMatchMode": {
            "title": "🔀 Combine filters with",
            "enum": [
              "all",
              "any"
            ],
            "type": "string",
            "description": "🧮 How to combine the filters you set. ALL = a page must satisfy every filter you enabled (AND). ANY = a page is kept if it satisfies at least one enabled filter (OR). Filters left empty are ignored either way. Default is ALL.",
            "default": "all"
          },
          "scanLimit": {
            "title": "🔢 Max pages to scan",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "🎚️ Cap on how many input page URLs to scrape before filtering (list order). Filtered-out pages still count against this scan cap. Range 1–10,000. Default 10. (Backward compatible: a base `maxPages` field is still accepted.)",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🌍 Apify Proxy (residential only)",
            "type": "object",
            "description": "🏠 This actor always runs through Apify RESIDENTIAL proxy for every request — datacenter or custom proxy groups here are ignored. 🔁 On tough pages it automatically tries up to 3 fresh residential sessions before giving up on that URL. 💳 Proxy access must be enabled on your Apify plan."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}