{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Public Group Directory & Discovery",
    "description": "Find public Facebook groups by keyword or location and enrich each one from its public About page: exact member count, posts today and last month, creation date, privacy, rules, description, location tags and contact links. Cookieless, no login, automatic proxy.",
    "version": "1.0",
    "x-build-id": "AQ6WlRues4YjcphOa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~fb-group-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-fb-group-directory-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/xyrelith-data~fb-group-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-fb-group-directory-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/xyrelith-data~fb-group-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-fb-group-directory-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "One keyword or topic per line. Each query is searched with public web indexes restricted to Facebook group URLs, then every candidate is checked against its public About page. Add a city, country or niche in the same line for a location-qualified search.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "groupUrls": {
            "title": "Group URLs / IDs (optional)",
            "type": "array",
            "description": "Direct group URLs, vanity URLs, numeric group IDs, share links or Facebook group-search URLs. These are enriched even when no keyword is given.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "location": {
            "title": "Location qualifier",
            "type": "string",
            "description": "Optional city, country or region appended to every search keyword. Example: `Miami` or `Kenya`."
          },
          "maxResults": {
            "title": "Maximum groups in total",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the number of enriched group rows returned by the whole run.",
            "default": 100
          },
          "maxGroupsPerKeyword": {
            "title": "Maximum groups per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop enriching candidates for a keyword after this many matching groups.",
            "default": 50
          },
          "maxSearchPages": {
            "title": "Search-result pages per keyword",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many public web-index pages to read for each keyword (1-5). One page is usually enough; more pages widen the candidate pool.",
            "default": 2
          },
          "discoverySources": {
            "title": "Discovery sources",
            "type": "array",
            "description": "Which public discovery sources to use: `duckduckgo`, `bing`, `yahoo`, `facebook_catalog` (public Facebook category pages) or `slug_guess` (direct validation of likely group slugs).",
            "items": {
              "type": "string"
            },
            "default": [
              "duckduckgo",
              "bing",
              "yahoo",
              "facebook_catalog",
              "slug_guess"
            ]
          },
          "privacy": {
            "title": "Privacy filter",
            "enum": [
              "any",
              "public",
              "private"
            ],
            "type": "string",
            "description": "Keep any group, only public groups, or only private groups. Private groups expose their public About page; only their posts are hidden.",
            "default": "any"
          },
          "minMemberCount": {
            "title": "Minimum members",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop groups below this exact member count. Set 0 to keep every group.",
            "default": 0
          },
          "minPostsLastMonth": {
            "title": "Minimum posts in the last month",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop groups with fewer posts in the last month than this. Set 0 to keep every group.",
            "default": 0
          },
          "requireKeywordMatch": {
            "title": "Require keyword match",
            "type": "boolean",
            "description": "Keep only groups whose name, description, rules, tags or locations contain every word of the search keyword. Turn this off for broader discovery.",
            "default": true
          },
          "mustContainKeyword": {
            "title": "Must contain keyword (optional)",
            "type": "string",
            "description": "Extra phrase that must appear in the group name, description, rules, tags or locations. Leave empty to skip this check."
          },
          "rehostImages": {
            "title": "Rehost profile and cover images",
            "type": "boolean",
            "description": "Copy signed Facebook image URLs into this run's key-value store so the links stay accessible after Facebook's signed URL expires.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}