{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper",
    "description": "Scrape public Facebook posts from pages and profiles, or discover posts by keyword. One normalized row per post: text, author, timestamp, media, reactions with a per-reaction breakdown, comment and share counts, and outbound links. No Facebook login, cookies or session ID needed.",
    "version": "1.0",
    "x-build-id": "5s0GDrGuIZYldfDzf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-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/coregent~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-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/coregent~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-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 URLs",
            "type": "array",
            "description": "Public Facebook POST URLs, or PAGE / PROFILE URLs. A post URL returns that one post, complete — this is the reliable path, and the one to use for volume. A page or profile URL returns the single post Facebook renders on the page itself: reading further back through a timeline needs Facebook's feed endpoint, which refuses Apify's addresses outright (measured), so in the default configuration expect ONE post per page. See the Actor's README before planning a large run. Accepts any URL form (/posts/, /videos/, /reel/, /photo/, /watch/, /permalink.php), a bare page handle, an @handle, or a numeric page ID. Facebook GROUPS are not supported: a logged-out request for a group returns an empty page with no posts at all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords, phrases or hashtags to find public posts about. Discovery searches the open web for indexed Facebook posts — Facebook itself publishes no logged-out search. Roughly half of what a keyword returns is Facebook pages rather than individual posts; those are counted and reported, and you can paste them into 'Facebook URLs' to collect their timelines. Requires a search provider key to be configured on the Actor.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "GLOBAL cap on posts returned across every URL and every query — not per source. You are charged only for the posts you actually receive.",
            "default": 100
          },
          "dateFrom": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only return posts published on or after this date (inclusive). A plain date such as 2026-08-01 is read as UTC midnight. Timelines are newest-first, so this also lets the Actor stop paging a page once it has gone past your date instead of fetching history you filtered out.",
            "default": ""
          },
          "dateTo": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Only return posts published on or before this date (inclusive). A plain date such as 2026-08-31 covers the whole of that day.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "How the posts collected are ordered before the maximum is applied. 'Newest first' matches the timeline. 'Most reactions first' sorts the posts this run collected — Facebook publishes no logged-out 'top' ranking, so this is an ordering of your results, not a platform popularity ranking.",
            "default": "latest"
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer reactions than this. Posts where Facebook published no reaction count are KEPT — an unknown count is not a low one.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer comments than this. Posts with no published comment count are kept.",
            "default": 0
          },
          "minShares": {
            "title": "Minimum shares",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer shares than this. Posts with no published share count are kept.",
            "default": 0
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep only posts of these kinds. Leave empty for all. A reel also counts as a video. A shared post is one that reshares another post — its own text and media are usually empty, and the original it points at is reported in the row's sharedPost field.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "reel",
                "link",
                "share",
                "text"
              ],
              "enumTitles": [
                "Photo",
                "Video",
                "Reel",
                "Link",
                "Shared post",
                "Text only"
              ]
            },
            "default": []
          },
          "authorInclude": {
            "title": "Only these authors",
            "type": "array",
            "description": "Keep only posts whose author name, handle or numeric ID matches one of these (case-insensitive, partial matches allowed). Leave empty for all authors.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorExclude": {
            "title": "Exclude these authors",
            "type": "array",
            "description": "Drop posts by these authors. Matched the same way as the include list. If a post matches both lists it is excluded — a deny list is treated as the stronger instruction.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sourceTypes": {
            "title": "Only these source types",
            "type": "array",
            "description": "Keep only posts that came from these kinds of source. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "page",
                "profile",
                "post"
              ],
              "enumTitles": [
                "Facebook Page timelines",
                "Profile timelines",
                "Post URLs you supplied or that search found"
              ]
            },
            "default": []
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Optional place names appended to each search query, so one keyword becomes several searches. Only affects keyword discovery; it does nothing to URLs you supply. Adding locations returns more posts than searching one keyword more deeply.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSource": {
            "title": "Maximum posts per page or profile",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "A fairness ceiling so one very active page cannot consume the whole global limit. 0 means no per-source ceiling. This is never the primary control — 'Maximum posts' is.",
            "default": 0
          },
          "stopAfterConsecutiveOldPosts": {
            "title": "Stop a timeline after this many posts older than your start date",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Timelines are newest-first, so once this many posts in a row fall before 'Posted on or after', the rest are older still and are not worth fetching. Only applies when a start date is set. 0 disables the early stop.",
            "default": 3
          },
          "skipPostIds": {
            "title": "Skip these post IDs",
            "type": "array",
            "description": "Numeric post IDs to leave out — for scheduled runs that should only return what is new since last time.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipUrls": {
            "title": "Skip these post URLs",
            "type": "array",
            "description": "Post URLs to leave out. Matched on the post's identifier, so any URL form of the same post works.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeUnavailableRows": {
            "title": "Include unavailable posts as empty rows",
            "type": "boolean",
            "description": "Off by default. When on, posts that could not be read are returned as empty rows carrying an 'unavailableReason' instead of being left out. They are never charged either way. The run log, the run's status message, RUN_SUMMARY and the RETRY_INPUT record already report what was missed, so this is only useful if you want the gaps in the dataset itself.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (Datacenter) is strongly recommended and on by default. Facebook allows only a couple of timeline requests per IP address, so without a proxy a multi-page run collects roughly one post per page. APIFY RESIDENTIAL IS NOT SUPPORTED and the run will fail if you select it: residential bandwidth is billed to the Actor rather than to your run, it costs several times what the results are priced at, and it returns identical data because Facebook gates on the request fingerprint, not the IP. If you need residential routing, supply your own provider under Custom proxy URLs — that traffic goes through your account and is honoured in full.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}