{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Groups Scraper",
    "description": "Facebook groups scraper: export the posts from public Facebook groups. Each post gives the author, text, exact time, permalink, photos and videos, plus reaction, comment and share counts. Up to 50,000 posts and 50 groups per run, with a keyword filter. $0.70 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "sEDPd0HXZZGXuH08t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~facebook-groups-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-facebook-groups-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/dami_studio~facebook-groups-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-facebook-groups-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/dami_studio~facebook-groups-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-facebook-groups-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": {
          "startUrls": {
            "title": "Facebook group URLs",
            "type": "array",
            "description": "Public Facebook group URLs, e.g. https://www.facebook.com/groups/dogspotting/. Numeric group URLs work too. Up to 50 groups per run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resultsLimit": {
            "title": "Number of posts",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "How many posts to return in total across all groups. Maximum 50000. Only real posts are charged. A big pull takes time, so for thousands of posts give the run a longer timeout."
          },
          "maxPostsPerGroup": {
            "title": "Posts per group (optional)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most posts to take from any one group. Leave it empty and Number of posts is shared across the groups, as before. Set this and leave Number of posts empty, and the run asks for this many from every group, up to 50000 in all."
          },
          "viewOption": {
            "title": "Sorting order",
            "enum": [
              "CHRONOLOGICAL",
              "RECENT_ACTIVITY",
              "TOP_POSTS"
            ],
            "type": "string",
            "description": "Which feed ordering Facebook should return: new posts, newest activity, or most relevant."
          },
          "allPhotos": {
            "title": "All photos of each post (up to 24)",
            "type": "boolean",
            "description": "A post with many photos normally comes back with its first 5. Turn this on to get up to 24 of them. The price per post stays the same, but the run takes longer, a few seconds more for each post with more than 5 photos, so give big runs a longer timeout.",
            "default": false
          },
          "includeTopComments": {
            "title": "Top comments with each post",
            "type": "boolean",
            "description": "Adds topComments to each post: the comments it already shows, with who wrote each one, the text, the time, the reaction count and the reply count. No extra charge and no extra time. Many posts have none, and a post with 40 comments still shows only those few.",
            "default": false
          },
          "keywords": {
            "title": "Only posts with these words (optional)",
            "type": "array",
            "description": "Keep only posts whose text, shared post text or link preview holds at least one of these words or phrases, one per line. Case does not matter. Posts left out are not delivered and not charged. If your words match very few of the posts read, the run stops early with a free FILTER_TOO_RARE note instead of reading the whole group, so pick words that turn up in a fair share of the group's posts.",
            "items": {
              "type": "string"
            }
          },
          "onlyNewPosts": {
            "title": "Only posts new since the last run",
            "type": "boolean",
            "description": "For repeat runs. Each run remembers the newest post it handed over in each group, in a key-value store named facebook-groups-scraper-new-posts on your own Apify account, and the next run skips everything up to that post. Sorted by New posts, the run stops reading as soon as it gets there. Set Number of posts high enough to cover what a group posts between two runs: posts older than the newest one already handed over are not picked up later. Delete that store to start over.",
            "default": false
          },
          "skipDuplicatePosts": {
            "title": "Skip repeated posts",
            "type": "boolean",
            "description": "Leaves out a post when the same author already posted the same text in this run, or in your runs of the last 30 days: the same ad put up in many groups or every day. The first copy is delivered, and the FILTER_REPORT record counts the copies. Case, spaces, punctuation and emojis are ignored; a post with no text is never a repeat. Remembered in a key-value store named facebook-groups-scraper-repeats on your own account; delete it to start over.",
            "default": false
          },
          "skipPostsWithoutText": {
            "title": "Skip posts with no text",
            "type": "boolean",
            "description": "Leaves out a post that has no text of its own and shares no post with text: a picture or a video on its own.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Leave out posts with these words (optional)",
            "type": "array",
            "description": "Leaves out a post whose text, shared post text or link preview holds any of these words or phrases, one per line. Whole words only, and case does not matter: \"rent\" leaves out \"Flat for RENT\" but keeps \"parent\". A phrase must appear as written, such as \"bahria town\". Up to 200 entries.",
            "items": {
              "type": "string"
            }
          },
          "excludeAuthors": {
            "title": "Leave out posts by these authors (optional)",
            "type": "array",
            "description": "Leaves out the posts of these people or Pages, one per line: a profile link (https://www.facebook.com/some.name or https://www.facebook.com/profile.php?id=100001234567890), a numeric profile id, or the name exactly as Facebook shows it. Up to 200 entries.",
            "items": {
              "type": "string"
            }
          },
          "onlyPostsNewerThan": {
            "title": "Posts newer than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only posts created after this point. YYYY-MM-DD, a full ISO timestamp, or a relative value like \"7 days\". Hours and minutes work too: \"2 hours\", \"30 minutes\". Filtered-out posts are never charged."
          },
          "onlyPostsOlderThan": {
            "title": "Posts older than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only posts created before this point. Same formats as above, \"2 hours\" included."
          },
          "maxCommentsPerPost": {
            "title": "Comments per post (full threads)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Reads up to this many comments under each post that has comments, each as its own row with recordType \"comment\". Each comment is charged as one Comment event: $0.25 per 1,000 on the Free plan, a little less on paid plans. Leave it empty for none."
          },
          "includeCommentReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "With Comments per post set, also reads the replies under each comment. Replies count toward Comments per post and are charged the same way.",
            "default": false
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "type": "array",
            "description": "Leave this empty for a normal run. Fill it in only if you want the traffic to leave through proxy servers you already pay for, one URL per line, in the form http://user:pass@host:port.",
            "items": {
              "type": "string"
            }
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it.",
            "items": {
              "type": "string"
            }
          },
          "deepScan": {
            "title": "Deep scan: keep reading past old and already-delivered posts",
            "type": "boolean",
            "description": "Normally a group in New posts order ends after 6 posts in a row older than your dates or already had by your last run. Deep scan skips those and reads on for newer posts further down. With \"Only posts new since the last run\" on, no post is delivered or charged twice. Posts cost the same.",
            "default": false
          },
          "deepScanStopAfter": {
            "title": "Deep scan: stop a group after this many posts in a row older than your start date",
            "minimum": 6,
            "maximum": 300,
            "type": "integer",
            "description": "With Deep scan on, how many posts in a row older than your start date end a group. Posts newer than your end date and posts already delivered are skipped without counting, so a run reads on past days you already collected. With no start date, posts already delivered count instead. Leave it empty for 20. A bigger number reads further and takes longer; posts cost the same either way."
          },
          "deepScanMaxPages": {
            "title": "Deep scan: most feed pages per group",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "With Deep scan on, reads at most this many feed pages of each group, the first included. The first page holds up to 29 posts and each page after it 3. Leave it empty for no page limit of its own."
          },
          "keywordsKeepReading": {
            "title": "Keep reading when few posts hold your words",
            "type": "boolean",
            "description": "With \"Only posts with these words\" set, a run stops early with a free FILTER_TOO_RARE note once too few of the posts it reads hold your words. Turn this on to read such groups anyway: each post your words leave out is then charged as a filtered post, $0.19 per 1,000, while a delivered post keeps its price. It takes effect on 2 December 2026, when that price starts; until then it changes nothing.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}