{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper — Reactions, Comments & Video Views",
    "description": "Scrape posts from any public Facebook Page or profile: text, date, all 7 reaction types, comments, shares, video plays and views, photos with alt text, HD video links, hashtags, engagement rate. Free date range and filters, comments add-on, transcripts. No login.",
    "version": "0.1",
    "x-build-id": "4GYJKD0eL022D8b44"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apimy~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apimy-facebook-posts-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/apimy~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apimy-facebook-posts-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/apimy~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apimy-facebook-posts-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 Pages or profiles",
            "type": "array",
            "description": "Links of public Facebook Pages and public profiles, one per line: https://www.facebook.com/NASA, https://m.facebook.com/natgeo or https://www.facebook.com/profile.php?id=100064860875397. You can also upload a text file of links. Group, event and single-post links are not Pages and come back as a free error row.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pageNames": {
            "title": "…or Page names / IDs",
            "type": "array",
            "description": "No links at hand? Type Page usernames or numeric IDs, one per line: NASA, natgeo, 100044561550831. They are read exactly like links.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerPage": {
            "title": "Max posts per Page",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many posts (after your filters) to deliver from each Page. Posts come newest first. Pinned posts are skipped so the order stays by date. You pay only for delivered posts.",
            "default": 50
          },
          "onlyPostsNewerThan": {
            "title": "Posts newer than",
            "type": "string",
            "description": "Only posts published after this moment: a date (2025-03-12), a UTC time (2025-09-23T10:02:01) or a period back from now (\"7 days\", \"2 months\", \"1 year\", \"3 hours\"). Facebook filters on its side, so this costs nothing extra."
          },
          "onlyPostsOlderThan": {
            "title": "Posts older than",
            "type": "string",
            "description": "Only posts published before this moment, same formats. Combine with \"Posts newer than\" for an exact range — an old period (e.g. all of 2024) is reached directly, without paging through newer posts. Free."
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Keep only these kinds of posts. Empty = all kinds. \"Video\" also keeps reels.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "album",
                "video",
                "reel",
                "link",
                "text",
                "share",
                "other"
              ],
              "enumTitles": [
                "Photo",
                "Album (several photos)",
                "Video",
                "Reel",
                "Link",
                "Text only",
                "Share of another post",
                "Other (events, polls…)"
              ]
            },
            "default": []
          },
          "minReactions": {
            "title": "Min reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many reactions (all types together). Great for \"top posts\" research."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many comments."
          },
          "minShares": {
            "title": "Min shares",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts shared at least this many times."
          },
          "minVideoViews": {
            "title": "Min video views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep videos and reels with at least this many views (plays when Facebook shows no view count). Removes non-video posts when set above 0."
          },
          "includeKeywords": {
            "title": "Must contain any of these words",
            "type": "array",
            "description": "Keep posts whose text, link title or hashtags contain at least one of these words or phrases (case-insensitive), e.g. \"giveaway\", \"launch\", \"#sale\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop posts whose text, link title or hashtags contain any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "onlyPaidPartnership": {
            "title": "Only paid partnerships",
            "type": "boolean",
            "description": "Keep only branded content posts marked \"Paid partnership\" — influencer and sponsorship research.",
            "default": false
          },
          "includeComments": {
            "title": "Scrape comments (add-on)",
            "type": "boolean",
            "description": "Also write the comments of every delivered post as separate rows (type \"comment\") right after their post: text, time, author name and picture, reactions, reply count. Charged per comment row.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of comment rows per post (Facebook serves 10 per call). Posts with fewer comments return what they have.",
            "default": 20
          },
          "commentsSort": {
            "title": "Comments order",
            "enum": [
              "relevant",
              "newest",
              "all"
            ],
            "type": "string",
            "description": "Which comments Facebook gives first. \"All comments\" also includes the ones Facebook hides as low quality.",
            "default": "relevant"
          },
          "includeVideoTranscript": {
            "title": "Video transcripts",
            "type": "boolean",
            "description": "For videos and reels with captions (including Facebook auto-captions), return the spoken text in \"captionText\". Free.",
            "default": false
          },
          "includeTopComments": {
            "title": "Top comments preview",
            "type": "boolean",
            "description": "Facebook ships 1–2 top comments with each post — keep them in \"topComments\" at no extra cost and without the comments add-on.",
            "default": true
          },
          "includeMediaDetails": {
            "title": "Full media details",
            "type": "boolean",
            "description": "Each photo and video as an object (link, size, alt text, HD/SD video, duration, thumbnail). Untick for a flat \"mediaUrls\" list — easier in CSV and Excel.",
            "default": true
          },
          "includePageDetails": {
            "title": "Page details on every row",
            "type": "boolean",
            "description": "Page username, category, followers, verified badge, Ad Library ID and picture on every post row (Page ID, name and link are always there).",
            "default": true
          },
          "sortBy": {
            "title": "Sort posts by",
            "enum": [
              "newest",
              "oldest",
              "reactions",
              "comments",
              "shares",
              "views",
              "engagement"
            ],
            "type": "string",
            "description": "Any order other than \"newest\" writes all rows at the end of the run.",
            "default": "newest"
          },
          "includeRunSummary": {
            "title": "Add a free summary row",
            "type": "boolean",
            "description": "One free row at the end (type \"notice\") with what was delivered, filtered and charged. Untick to keep the dataset posts-only.",
            "default": true
          },
          "onlyNewRowsStore": {
            "title": "Only new posts (monitoring memory)",
            "type": "string",
            "description": "Give the run a memory name, e.g. \"competitor-pages\". The Actor remembers every post and comment it delivered under that name; later runs deliver — and charge — only new ones, and stop reading a Page at the first already-known posts. Put the Actor on a schedule for a new-post feed."
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many Pages are read at the same time. Posts within one Page are read in order.",
            "default": 3
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two-letter country of the residential addresses (US by default). Some Pages show different posts by country.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the Actor rotates its own residential addresses for Facebook (Facebook sends server addresses to the login page) and falls back to an unblocker when needed. Your own proxy URLs, if given, are used as they are.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}