{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Page Scraper – Posts, Photos & Details",
    "description": "Scrape any public Facebook page: its latest posts with full text, reactions, comments, shares and media (52 fields each), or the page itself — About block, follower count, photo albums and video library. No login and no cookies. Unofficial.",
    "version": "0.1",
    "x-build-id": "JKdR0IBd9ojttc4Ht"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simple.actors~facebook-page-posts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simple.actors-facebook-page-posts",
        "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/simple.actors~facebook-page-posts/runs": {
      "post": {
        "operationId": "runs-sync-simple.actors-facebook-page-posts",
        "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/simple.actors~facebook-page-posts/run-sync": {
      "post": {
        "operationId": "run-sync-simple.actors-facebook-page-posts",
        "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 page URLs",
            "type": "array",
            "description": "Public Facebook pages to read, e.g. https://www.facebook.com/CoJCTN. All three URL forms work and are normalised for you: vanity URLs (facebook.com/nasa), numeric ones (facebook.com/profile.php?id=100066882550448) and mobile links (m.facebook.com/...). Private pages and personal profiles that are not public cannot be read — they come back as a row with an \"error\" field rather than failing the run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "What to read: posts, or the page itself",
            "enum": [
              "posts",
              "details"
            ],
            "type": "string",
            "description": "**Latest posts** (the default) returns one row per post, exactly as this Actor always has — leave it alone and nothing about your existing runs changes. **Page details** instead returns one row per page: its About block (category, email, phone, website, address and every other field the page states), its follower count, profile and cover photo, plus its Photos tab, its albums and its Videos tab. The two read different parts of Facebook and neither is a substitute for the other — the About block is not in the post feed, and the media on a page's latest posts is not its photo and video library.",
            "default": "posts"
          },
          "maxPosts": {
            "title": "Number of posts (max 8)",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many of the latest posts to return, newest first. Defaults to 5, which is enough to see what is new on a page you poll regularly. Raise it to 8 for the full batch Facebook serves in one request — 8 is the ceiling, because a second request comes back with the same posts, so asking for more cannot be delivered. Note that a smaller number also reaches less far back, so if you use \"Only posts newer than\" with a long window, raise this to 8. Latest posts mode only; Page details mode returns one row per page and ignores this.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy (residential required)",
            "type": "object",
            "description": "Defaults to Apify residential proxy, which is required: Facebook answers /api/graphql/ from a datacenter IP with a rate-limit error instead of posts, so a datacenter run fails. A run moves under half a megabyte, so the residential bandwidth cost stays around a third of a cent.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "includeRaw": {
            "title": "Include raw post JSON",
            "type": "boolean",
            "description": "Attach Facebook's untouched post object under `raw`. Turn this on when you need a detail that has no named field; it makes each item much larger, so leave it off otherwise. Latest posts mode only — Page details rows do not carry `raw`, because Facebook's untouched payloads for a page run to several megabytes.",
            "default": false
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than (window or ISO date)",
            "type": "string",
            "description": "Keep only posts published after this point — ideal for incremental polling. Takes a window like \"20 hours\", \"last 3 days\" or \"90 minutes\", or an ISO date such as 2026-08-01. Minutes, hours, days, weeks and months all work, with or without a leading \"last\". Because a run reads only the page's latest posts, a window reaching further back than those posts do returns an error row for that page rather than a partial answer — so an empty result always means \"nothing new\", never \"we did not look\". Latest posts mode only."
          },
          "includePhotos": {
            "title": "Include photos and albums (details mode)",
            "type": "boolean",
            "description": "Page details mode only. Reads the page's Photos tab and its album list. Turn it off to skip a page load and its GraphQL calls when you only want the About block.",
            "default": true
          },
          "includeVideos": {
            "title": "Include videos (details mode)",
            "type": "boolean",
            "description": "Page details mode only. Reads the page's Videos tab — permalink, title, thumbnail, duration, publish date, play count and reactions for each. Turn it off to skip a page load when you only want the About block.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}