{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Groups Search: Groups That Allow Promotion",
    "description": "Find Facebook groups by keyword and location, no Facebook account needed. Exact member count, posts per day and month, privacy, rules and whether the group allows self-promotion, plus websites and emails it published. Monitor new Facebook groups on a schedule with webhook or Telegram alerts.",
    "version": "0.1",
    "x-build-id": "6ge74d2pei37T2jH9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/firsthand~facebook-groups-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-firsthand-facebook-groups-search",
        "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/firsthand~facebook-groups-search/runs": {
      "post": {
        "operationId": "runs-sync-firsthand-facebook-groups-search",
        "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/firsthand~facebook-groups-search/run-sync": {
      "post": {
        "operationId": "run-sync-firsthand-facebook-groups-search",
        "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": {
          "queries": {
            "title": "Search keywords",
            "type": "array",
            "description": "What the groups should be about, one keyword or phrase per line, for example \"dog training london\" or \"real estate investors texas\". Each keyword is searched separately. Up to 50 keywords per run.",
            "items": {
              "type": "string"
            }
          },
          "searchLocations": {
            "title": "Search locations",
            "type": "array",
            "description": "Optional cities, regions or countries. Every keyword is searched with every location, for example \"yoga\" with \"London\" and \"Manchester\" gives \"yoga London\" and \"yoga Manchester\". Up to 200 keyword and location pairs per run.",
            "items": {
              "type": "string"
            }
          },
          "groupUrls": {
            "title": "Group URLs",
            "type": "array",
            "description": "Facebook groups to read directly: https://www.facebook.com/groups/<name or id>/ or a share link https://www.facebook.com/share/g/<code>/. Use it to enrich a list you already have or to track known groups in Monitor mode. Up to 1,000.",
            "items": {
              "type": "string"
            }
          },
          "maxGroupsPerQuery": {
            "title": "Max groups per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Stop a keyword after this many groups are returned. Up to 100. The Actor reads up to 10 DuckDuckGo and 20 Yahoo result pages per keyword; within them our tests gave 5 to 67 groups per keyword with Keyword match All words.",
            "default": 20
          },
          "maxItems": {
            "title": "Max groups in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on returned group rows in this run across all keywords. 0 means no cap. Screenings by the Promotion rules filter are not rows, so with that filter on use your maximum cost per run as the cap. The run also stops before your maximum cost per run is exceeded.",
            "default": 0
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "all",
              "any",
              "off"
            ],
            "type": "string",
            "description": "All words: keep a group only if every word of the keyword is in its name or search description (default). Any word: at least one word. Off: every group the search returns.",
            "default": "all"
          },
          "minMembers": {
            "title": "Min members",
            "minimum": 0,
            "type": "integer",
            "description": "Skip groups smaller than this. Skipped groups are not charged."
          },
          "maxMembers": {
            "title": "Max members",
            "minimum": 0,
            "type": "integer",
            "description": "Skip groups larger than this, handy for small niche communities. Skipped groups are not charged."
          },
          "privacy": {
            "title": "Privacy",
            "enum": [
              "any",
              "public",
              "private"
            ],
            "type": "string",
            "description": "Public groups show posts to anyone; private groups show only their About info (name, members, activity, rules).",
            "default": "any"
          },
          "minPostsPerMonth": {
            "title": "Min posts in the last month",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only active groups. Facebook shows the number of posts in the last month on the group's About page."
          },
          "locationContains": {
            "title": "Location contains",
            "type": "string",
            "description": "Keep only groups whose Facebook location contains this text, for example \"Florida\" or \"London\". Many groups have no location set. To search in a place, use Search locations instead."
          },
          "promotionPolicy": {
            "title": "Promotion rules",
            "enum": [
              "any",
              "allowed",
              "listings",
              "not_forbidden"
            ],
            "type": "string",
            "description": "An AI model reads each group's rules. Allowed: groups that allow promotion openly or with conditions (a promo thread or day, admin approval, in moderation, only on topic). Allowed or own listings only: also deals and buy-and-sell groups where you may post your own listings. Not forbidden: every group except the ones whose rules ban promotion. Reading rules needs the group page, so a group skipped by this filter is charged as a screening ($0.002). A keyword stops after about 20 screenings plus 10 per returned group. Other filters stay free.",
            "default": "any"
          },
          "includeContacts": {
            "title": "Include contacts",
            "type": "boolean",
            "description": "Return websites, emails and Facebook links that the group published in its own description and rules. Turn off if you do not need them.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "Search: return every matching group. Monitor: return only groups this monitor has not returned before. Schedule a saved task to get new groups every day or week. Monitor reads the top search results, so a new group shows up once search engines rank it there.",
            "default": "search"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Optional name for the monitor's memory. By default a saved task keeps its own memory, and a run without a task uses its keywords, locations and URLs."
          },
          "recheckKnownGroups": {
            "title": "Re-check known groups",
            "type": "boolean",
            "description": "Monitor mode: also open every group returned earlier and return the ones whose member count or privacy changed. Groups that do not pass your current filters are not returned. Each re-check that returns no row is charged as a group check. Group URLs are always re-checked in Monitor mode.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Monitor mode: HTTPS address that receives a POST with the new and changed groups after each run with changes."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Monitor mode: token of your Telegram bot (from @BotFather) to send a summary of new and changed groups."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Monitor mode: chat that receives the summary, for example -1001234567890. Add the bot to the chat first."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}