{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Profile Posts & All Photos Scraper",
    "description": "Scrape latest or historical posts from public Facebook personal profiles as agent-ready JSON with publication dates, stable URLs, nested text, engagement, and all recoverable photos hidden behind +N albums. Built for API, MCP, monitoring, and resumable backfills.",
    "version": "1.0",
    "x-build-id": "pzyUZ49WCDVKF6AOn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spbotdel~facebook-profile-posts-all-photos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spbotdel-facebook-profile-posts-all-photos-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/spbotdel~facebook-profile-posts-all-photos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spbotdel-facebook-profile-posts-all-photos-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/spbotdel~facebook-profile-posts-all-photos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spbotdel-facebook-profile-posts-all-photos-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",
        "required": [
          "profileUrls"
        ],
        "properties": {
          "profileUrls": {
            "title": "Public Facebook profile URLs",
            "type": "array",
            "description": "Required. Public Facebook personal-profile URLs, vanity handles, numeric IDs, profile.php?id=... URLs, or /people/.../<id> URLs. Do not enter Pages, Groups, Marketplace listings, or direct post URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxProfilesPerRun": {
            "title": "Max profiles per run",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of profile targets processed independently in one run. Results and billing multiply per profile. Extra profileUrls are skipped and reported in SUMMARY.",
            "default": 10
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum public post results returned for each profile. Each post is one billable result: 10 profiles x 1,000 posts is about 10,000 billable results. Use a small number for first tests or daily monitoring. For deeper history, request up to 1,000 posts, then continue with SUMMARY.profiles[].pointer.nextCursor.",
            "default": 20
          },
          "expandAllPhotos": {
            "title": "Expand all photos",
            "type": "boolean",
            "description": "Recover public photo URLs hidden behind Facebook +N album grids. Keep enabled for photo-complete datasets; disable only for a faster preview-only run.",
            "default": true
          },
          "omitPinnedPosts": {
            "title": "Omit pinned posts",
            "type": "boolean",
            "description": "Exclude pinned older posts from the profile header feed so latest-post and scheduled monitoring runs stay predictable.",
            "default": true
          },
          "sinceDate": {
            "title": "Since date",
            "type": "string",
            "description": "Optional monitoring boundary. Starting from the profile head, stop after reaching posts older than this date. Use an ISO date or timestamp. For exact known-post stops prefer knownPostIds. State routing: daily latest monitoring -> knownPostIds (or sinceDate for date cut); older-post backfill -> startCursor from SUMMARY.pointer.nextCursor. Never pass a backfill cursor into a latest run."
          },
          "knownPostIds": {
            "title": "Known post IDs",
            "type": "array",
            "description": "Post IDs already stored by your pipeline. The Actor starts from the newest visible posts and stops before the first matching ID. Best for scheduled monitoring without old duplicates. State routing: daily latest monitoring -> knownPostIds (or sinceDate for date cut); older-post backfill -> startCursor from SUMMARY.pointer.nextCursor. Never pass a backfill cursor into a latest run.",
            "items": {
              "type": "string"
            }
          },
          "startCursor": {
            "title": "Start cursor",
            "type": "string",
            "description": "Opaque cursor string from SUMMARY.pointer.nextCursor for a one-profile older-post backfill. Do not use yesterday's cursor to look for newer posts or reuse one profile's cursor for another profile. State routing: daily latest monitoring -> knownPostIds (or sinceDate for date cut); older-post backfill -> startCursor from SUMMARY.pointer.nextCursor. Never pass a backfill cursor into a latest run."
          },
          "includeRawPayload": {
            "title": "Include raw payload",
            "type": "boolean",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Include the parsed Facebook post payload in each result. Enable only for debugging or schema research because output becomes much larger.",
            "default": false
          },
          "includeUnavailablePosts": {
            "title": "Include unavailable timeline cards",
            "type": "boolean",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Return timeline cards whose shared or attached Facebook content has been deleted or access-restricted. Disabled by default so empty unavailable cards do not count toward the requested post total.",
            "default": false
          },
          "bootstrapRetries": {
            "title": "Bootstrap retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Fresh proxy/session attempts for profile resolution and bootstrap failures.",
            "default": 4
          },
          "graphqlPageRetries": {
            "title": "GraphQL page retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Retries for transient empty, rate-limited, or failed timeline pages.",
            "default": 4
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Two-letter country code for Apify residential proxy sessions.",
            "default": "US"
          },
          "fallbackProxyCountries": {
            "title": "Rate-limit fallback countries",
            "maxItems": 3,
            "type": "array",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Up to three residential proxy countries tried only when Facebook temporarily rate-limits or rejects a profile in the primary country.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "default": [
              "DE",
              "GB",
              "NL"
            ]
          },
          "mediaExpansionConcurrency": {
            "title": "Photo expansion concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Number of posts whose public photo sets can be expanded in parallel.",
            "default": 3
          },
          "mediaSetRetries": {
            "title": "Photo-set retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Retry count for each Facebook media/set or permalink expansion request.",
            "default": 1
          },
          "debug": {
            "title": "Debug output",
            "type": "boolean",
            "description": "Advanced. Leave the default unless a SUMMARY diagnostic names this exact knob. Add discovery and response diagnostics to SUMMARY.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}