{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Group Members Scraper",
    "description": "Extract active, visible members of public Facebook groups from recent post and comment authors. Cookieless, provider-backed, MCP-ready.",
    "version": "0.1",
    "x-build-id": "uluhbBjo0rgiVKM6J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~facebook-group-members-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-facebook-group-members-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/khadinakbar~facebook-group-members-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-facebook-group-members-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/khadinakbar~facebook-group-members-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-facebook-group-members-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": {
          "groupUrls": {
            "title": "Group URLs",
            "type": "array",
            "description": "Public Facebook group URLs to extract members from (e.g. 'https://www.facebook.com/groups/vegrecipes'). One member list is built per group from authors of recent visible posts and comments. Accepts /groups/<slug> or /groups/<numericId> forms. NOT a profile or page URL.",
            "items": {
              "type": "string"
            }
          },
          "groupIds": {
            "title": "Group IDs",
            "type": "array",
            "description": "Numeric Facebook group IDs as an alternative to URLs (e.g. '198591470769811'). Use when you have the raw group ID instead of the vanity slug. Merged with Group URLs. NOT a post ID or user ID.",
            "items": {
              "type": "string"
            }
          },
          "maxMembers": {
            "title": "Max members per group",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum unique members to return per group before stopping (e.g. 200). Caps both pagination and your billed cost. Defaults to 200. This is an upper bound; sparse groups return fewer.",
            "default": 200
          },
          "maxPostsPerGroup": {
            "title": "Max posts to scan per group",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many recent group posts to page through while collecting members (e.g. 100). More posts surface more members but cost more provider time. Defaults to 100. Pagination also stops early when the group runs out of visible posts.",
            "default": 50
          },
          "includeCommenters": {
            "title": "Include commenters as members",
            "type": "boolean",
            "description": "When true, people who commented on the scanned posts are counted as members in addition to post authors. Uses comment authors already embedded in each post (no extra calls). Defaults to true. Set false to return only people who authored posts.",
            "default": true
          },
          "deepComments": {
            "title": "Deep comment enrichment",
            "type": "boolean",
            "description": "When true, fetches the full comment thread for each post to surface every commenter, not just the top embedded ones. Increases member yield on busy groups but consumes more provider credits and run time. Defaults to false. Requires Include commenters to be on.",
            "default": false
          },
          "sortBy": {
            "title": "Sort posts by",
            "enum": [
              "RECENT_ACTIVITY",
              "TOP_POSTS",
              "CHRONOLOGICAL",
              "CHRONOLOGICAL_LISTINGS"
            ],
            "type": "string",
            "description": "Provider-side ordering of the group posts scanned for members. 'RECENT_ACTIVITY' favors currently active members; 'TOP_POSTS' favors high-engagement authors. Defaults to RECENT_ACTIVITY.",
            "default": "RECENT_ACTIVITY"
          },
          "providerOrder": {
            "title": "Provider order",
            "enum": [
              "scrapecreators-first",
              "sociavault-first",
              "scrapecreators-only",
              "sociavault-only"
            ],
            "type": "string",
            "description": "Which backing data provider to try first. Defaults to ScrapeCreators with SociaVault fallback, which maximizes coverage. Only change for debugging or provider-specific testing.",
            "default": "scrapecreators-first"
          },
          "includeRawData": {
            "title": "Include raw provider data",
            "type": "boolean",
            "description": "When true, attaches the raw provider author object to each member record under rawAuthor for debugging. Defaults to false to keep output lean for AI agents.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}