{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Details Scraper - Reactions, Views & Shares",
    "description": "Scrape public Facebook post details by URL: text, author, date, reactions by type, comment and share counts, exact video views and plays, photos, video files, captions and links. Posts, photos, videos, reels, group posts and share links. Track engagement changes between runs. No login or cookies.",
    "version": "0.1",
    "x-build-id": "8XcBaDoROEvUbSyc5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~facebook-post-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-facebook-post-details-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/topapi~facebook-post-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-facebook-post-details-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/topapi~facebook-post-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-facebook-post-details-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": "🔗 Post URLs",
            "type": "array",
            "description": "Post, reel, video, photo or share links, e.g. https://www.facebook.com/nasa/posts/pfbid0..., /reel/123..., /share/p/1Bfb9bCnyH/. A Page or profile URL is not a post and is skipped.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "onlyPostsNewerThan": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "Keep only posts published on or after this date: absolute (2026-09-01) or relative (7 days, 3 months). Empty = no lower bound."
          },
          "onlyPostsOlderThan": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "Keep only posts published on or before this date, e.g. 2026-06-30 or 30 days. Combine with 'Posted after' for a window."
          },
          "postType": {
            "title": "🎞️ Post type",
            "enum": [
              "all",
              "status",
              "photo",
              "video",
              "reel",
              "link",
              "share"
            ],
            "type": "string",
            "description": "Keep only one kind of post. 'Videos and reels' keeps both; 'Reels only' keeps short-form reels.",
            "default": "all"
          },
          "minReactions": {
            "title": "👍 Minimum reactions",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only posts with at least this many reactions (all types), e.g. 100. 0 = no minimum.",
            "default": 0
          },
          "minViews": {
            "title": "▶️ Minimum video views",
            "minimum": 0,
            "maximum": 10000000000,
            "type": "integer",
            "description": "Keep only videos and reels with at least this many views, e.g. 10000. Posts without a video are removed when this is set. 0 = no minimum.",
            "default": 0
          },
          "includeTopComments": {
            "title": "💬 Add top comments",
            "type": "boolean",
            "description": "Add up to 10 public comments per post (text, author, date, reactions, reply count) in top_comments. Charged as a top-comments add-on per post that gets at least one.",
            "default": false
          },
          "maxTopComments": {
            "title": "💬 Comments per post",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many top comments to add per post, 1-10. For every comment and reply of a post, use Facebook Comments Scraper.",
            "default": 10
          },
          "topCommentsSort": {
            "title": "🔀 Comment order",
            "enum": [
              "most_relevant",
              "newest"
            ],
            "type": "string",
            "description": "Which comments are 'top': Facebook's most relevant ranking or the newest ones.",
            "default": "most_relevant"
          },
          "includeAuthorDetails": {
            "title": "👤 Add author details",
            "type": "boolean",
            "description": "Read the author's Page or profile header once per author: followers, following, talking about, verified badge, category, intro. Charged as an author-details add-on per post that gets it.",
            "default": false
          },
          "includeTranscript": {
            "title": "📝 Add video transcript",
            "type": "boolean",
            "description": "For videos and reels with captions, add the caption text as video_transcript (from Facebook's own caption file; no speech-to-text). Free.",
            "default": false
          },
          "monitorMode": {
            "title": "🔁 Track changes since the last run",
            "type": "boolean",
            "description": "Remember each post's counters in a named store and add previous values, deltas and changed_fields to every row, e.g. +120 reactions and +3,400 views since yesterday.",
            "default": false
          },
          "onlyChanged": {
            "title": "🔔 Only posts that changed",
            "type": "boolean",
            "description": "With tracking on, deliver only posts seen for the first time or whose reactions, comments, shares, views or plays moved since the last run.",
            "default": false
          },
          "monitorStoreName": {
            "title": "🗄️ Tracking store name",
            "type": "string",
            "description": "Named key-value store that keeps the snapshots. Use one name per tracked list, e.g. client-a-posts.",
            "default": "facebook-post-details-monitor"
          },
          "maxItems": {
            "title": "🔢 Maximum posts",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many delivered posts. 0 = every URL in the list.",
            "default": 0
          },
          "compact": {
            "title": "🤖 Compact output",
            "type": "boolean",
            "description": "Core fields only (18): id, type, URL, text, date, author, counts, views, image, video, link. Sized for AI agents and MCP clients.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Default: each post is read from Apify's own IP first and moves to Apify Proxy only when Facebook refuses or stalls; photo URLs move to RESIDENTIAL. Choose a proxy group to always use it.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "⚡ Parallel posts",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many posts are read at the same time, 1-10.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}