{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Groups Scraper - Public Group Posts",
    "description": "Scrape 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 5,000 posts and 50 groups per run, with a keyword filter. $0.70 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "wcME8YqhMlwLgExwI"
  },
  "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": 5000,
            "type": "integer",
            "description": "How many posts to return in total across all groups. Maximum 5000. Only real posts are charged."
          },
          "maxPostsPerGroup": {
            "title": "Posts per group (optional)",
            "minimum": 1,
            "maximum": 5000,
            "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 5000 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 Facebook already shows under it, usually one or two, 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
          },
          "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, at the price on the Pricing tab. Leave it empty for none. While Comment is not on the Pricing tab yet, this returns one free COMMENTS_SOON note and reads no comments."
          },
          "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"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}