{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Scraper",
    "description": "Scrape public Facebook posts from pages, profiles, groups and post links. Get text, date, author, reactions by type, comments with replies, shares, photos, videos, views and transcripts as clean JSON. Date filters, live results, no account or cookies needed.",
    "version": "1.0",
    "x-build-id": "S05dat8TlrTUuPFdR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~facebook-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-facebook-post-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/insights_data~facebook-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-facebook-post-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/insights_data~facebook-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-facebook-post-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 Facebook URLs",
            "minItems": 1,
            "type": "array",
            "description": "Facebook pages, profiles (including profile.php?id=), public groups and direct post, reel, video, photo or share links. Paste as many as you like (bulk input) and mix them freely.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerSource": {
            "title": "🔢 Max posts per source",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum posts collected from each page, profile or group. 0 means no per-source cap. Ignored for direct post links.",
            "default": 10
          },
          "maxPostsTotal": {
            "title": "🧮 Max posts in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum posts for the whole run across all sources. 0 means no global cap.",
            "default": 0
          },
          "onlyPostsNewerThan": {
            "title": "📅 Only posts newer than",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[\\d:.]+Z?)?$|^(\\d+)\\s*(minute|min|hour|day|week|month|year)s?(\\s*ago)?$",
            "type": "string",
            "description": "Keep only posts published after this date. Use YYYY-MM-DD, a full ISO date, or a relative value like 3 days or 2 months. Leave empty for no lower bound."
          },
          "onlyPostsOlderThan": {
            "title": "📆 Only posts older than",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[\\d:.]+Z?)?$|^(\\d+)\\s*(minute|min|hour|day|week|month|year)s?(\\s*ago)?$",
            "type": "string",
            "description": "Keep only posts published before this date. Same formats as above. Leave empty for no upper bound."
          },
          "groupSort": {
            "title": "🔃 Group feed order",
            "enum": [
              "new_posts",
              "recent_activity",
              "most_relevant"
            ],
            "type": "string",
            "description": "Order used when a source is a group. Newest posts first lets date filters stop early.",
            "default": "new_posts"
          },
          "includeComments": {
            "title": "💬 Collect comments",
            "type": "boolean",
            "description": "Read the comment thread of each post instead of only the few comments shown in the feed.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "📊 Max comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Top-level comments to collect per post. 0 means all available comments.",
            "default": 5
          },
          "commentsSortOrder": {
            "title": "🔀 Comment order",
            "enum": [
              "all",
              "most_relevant",
              "newest"
            ],
            "type": "string",
            "description": "Order of the comments. All comments returns the most replies when not logged in.",
            "default": "all"
          },
          "includeReplies": {
            "title": "🧵 Collect replies",
            "type": "boolean",
            "description": "Also collect replies under each comment. Needs comments to be on.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "🪜 Max replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Replies collected under each comment, nested replies included. 0 means all available replies.",
            "default": 2
          },
          "includeVideoDetails": {
            "title": "🎬 Exact video views",
            "type": "boolean",
            "description": "Add exact view and play counts for video and reel posts. Costs one extra request per video.",
            "default": true
          },
          "includeVideoTranscript": {
            "title": "📜 Video transcript",
            "type": "boolean",
            "description": "Add the auto-generated transcript of video posts when one exists.",
            "default": true
          },
          "includeFullAlbums": {
            "title": "📸 Full photo albums",
            "type": "boolean",
            "description": "Feeds show at most 5 photos per album. Turn on to collect every photo of the album.",
            "default": true
          },
          "includeSourceInfo": {
            "title": "📛 Page or group details",
            "type": "boolean",
            "description": "Attach followers, likes, category, verification or group members and privacy to every post.",
            "default": true
          },
          "outputFormat": {
            "title": "🧾 Output format",
            "enum": [
              "full",
              "flat"
            ],
            "type": "string",
            "description": "Full keeps nested objects. Flat gives one level of simple columns that is easy to export to CSV or Excel.",
            "default": "full"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}