{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Public Posts Scraper Ultra Premium",
    "description": "Scrape public Facebook page posts with text, timestamps, author details, media, links, and engagement signals. Built for monitoring brands, campaigns, competitors, and public content with clean, structured, analysis-ready data.",
    "version": "0.1",
    "x-build-id": "t71zjFusgduC2ZJUr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~facebook-public-posts-scraper-ultra-premium/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-facebook-public-posts-scraper-ultra-premium",
        "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/qaseemiqbal~facebook-public-posts-scraper-ultra-premium/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-facebook-public-posts-scraper-ultra-premium",
        "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/qaseemiqbal~facebook-public-posts-scraper-ultra-premium/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-facebook-public-posts-scraper-ultra-premium",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Facebook URLs",
            "type": "array",
            "description": "Public Facebook page, profile, post, reel, or video URLs to scrape.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of posts to extract from each source URL.",
            "default": 50
          },
          "dateFrom": {
            "title": "Post date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only include posts published on or after this date. Use YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Post date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only include posts published on or before this date. Use YYYY-MM-DD."
          },
          "sortOrder": {
            "title": "Post order",
            "enum": [
              "latest",
              "top",
              "native"
            ],
            "type": "string",
            "description": "Preferred crawl order. Facebook availability may vary by source.",
            "default": "latest"
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Filter by post type when detectable.",
            "items": {
              "type": "string"
            },
            "default": [
              "text",
              "photo",
              "video",
              "reel",
              "link",
              "shared"
            ]
          },
          "includeTextReferences": {
            "title": "Include text references",
            "type": "boolean",
            "description": "Extract hashtags, mentions, and external links referenced in post text.",
            "default": true
          },
          "includeReactionBreakdown": {
            "title": "Include reaction breakdown",
            "type": "boolean",
            "description": "Extract counts for Like, Love, Care, Haha, Wow, Sad, and Angry when available.",
            "default": true
          },
          "includeComments": {
            "title": "Include top comments",
            "type": "boolean",
            "description": "Extract visible top comments for each post.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of top-level comments to extract per post when comments are enabled.",
            "default": 5
          },
          "includeCommentReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Extract visible replies to comments. Increases runtime and cost.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Maximum replies per comment",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum visible replies to extract per comment when replies are enabled.",
            "default": 0
          },
          "includeMedia": {
            "title": "Include media metadata",
            "type": "boolean",
            "description": "Extract media URLs, thumbnails, dimensions, IDs, and OCR/alt text when available.",
            "default": true
          },
          "downloadMedia": {
            "title": "Download media files",
            "type": "boolean",
            "description": "Download media files to key-value store. Disabled by default to reduce cost and storage usage.",
            "default": false
          },
          "blockHeavyResources": {
            "title": "Block heavy page assets",
            "type": "boolean",
            "description": "Block browser loading of images, videos, and fonts to reduce proxy traffic and run cost. Media URLs can still be extracted from the page.",
            "default": true
          },
          "maxMediaPerPost": {
            "title": "Maximum media items per post",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of media items to include for each post.",
            "default": 20
          },
          "includeVideoDetails": {
            "title": "Include video and reel details",
            "type": "boolean",
            "description": "Open visible video/reel permalinks for richer metrics where available.",
            "default": false
          },
          "includeVideoTranscripts": {
            "title": "Include video transcripts",
            "type": "boolean",
            "description": "Extract public captions/transcripts when visible. Increases runtime.",
            "default": false
          },
          "includeOcrText": {
            "title": "Include OCR or alt text",
            "type": "boolean",
            "description": "Capture visible image alt/OCR text when Facebook exposes it.",
            "default": true
          },
          "includeAdLibraryInfo": {
            "title": "Include ad library info",
            "type": "boolean",
            "description": "Collect available public page ad-library identifiers or links when present.",
            "default": false
          },
          "saveMediaManifest": {
            "title": "Save media manifest",
            "type": "boolean",
            "description": "Write MEDIA_MANIFEST.json to key-value store.",
            "default": true
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Only return posts not seen in previous runs for the same canonical source URL.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used to persist incremental cursors.",
            "default": "facebook-public-posts-state"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Residential Apify Proxy is recommended for Facebook.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of browser pages to process at once.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for transient failures.",
            "default": 2
          },
          "maxRunMinutes": {
            "title": "Maximum run time in minutes",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "Stop gracefully after this many minutes. Use 0 for no custom limit.",
            "default": 0
          },
          "scrollWaitMillis": {
            "title": "Scroll wait in milliseconds",
            "minimum": 250,
            "maximum": 30000,
            "type": "integer",
            "description": "Delay after each source-page scroll.",
            "default": 1000
          },
          "maxEmptyScrolls": {
            "title": "Maximum empty scrolls",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Stop a source after this many scrolls with no new post candidates.",
            "default": 3
          },
          "failOnSourceError": {
            "title": "Fail on source error",
            "type": "boolean",
            "description": "Fail the whole run when any source fails. Disabled by default for partial-result workflows.",
            "default": false
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Save final-failure HTML snapshots to key-value store.",
            "default": false
          },
          "sessionCookies": {
            "title": "Optional session cookies",
            "type": "string",
            "description": "Optional cookies for content you are authorized to access. Public-only scraping remains the default."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}