{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Scraper",
    "description": "Scrape Facebook posts from public pages and profiles with ease 📘📢 Extract post text, dates, reactions, comments, shares, media, and more. Perfect for competitor research, content analysis, audience insights, and trend tracking. Turn Facebook data into actionable insights fast 🚀",
    "version": "0.1",
    "x-build-id": "f2ciQ32epeTk2mtvR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemesh~facebook-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemesh-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/scrapemesh~facebook-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapemesh-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/scrapemesh~facebook-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemesh-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Facebook Page URLs or Usernames",
            "type": "array",
            "description": "📌 **Required.** Enter one or more Facebook *page* targets.\n\n• **Full URL:** `https://www.facebook.com/nytimes/` or `https://www.facebook.com/Cristiano/`\n• **Username only:** `nytimes`, `Cristiano`, `iamsrk` — the actor will turn these into full URLs.\n\nYou can mix URLs and usernames. Each target is scraped in sequence (one page after another) to reduce rate limits. 🔄",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "📊 Maximum Posts per Page",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "🎯 **Limit how many posts to collect *per target page*.**\n\n• Minimum: **1** — Maximum: **10,000**.\n• Default: **10** — Good for quick tests.\n• Increase for deeper timelines (e.g. 50–500). The actor stops once this count is reached for each page. 🛑",
            "default": 10
          },
          "includeVideoTranscript": {
            "title": "🎥 Include Video Transcripts",
            "type": "boolean",
            "description": "📝 **Capture video captions & transcripts!**\n\n• **ON** ✨ — Extracts closed captions/transcripts from video & reel posts into the output.\n• **OFF** — Video posts still appear with metadata, but no transcript text.\n\nDefault: **OFF** for faster scraping. Turn **ON** when you need subtitle/caption data. 🎬",
            "default": false
          },
          "oldestPostDateUnified": {
            "title": "📅 Posts Newer Than (Start Date)",
            "type": "string",
            "description": "⏳ **Only include posts *after* this date.**\n\n• **Absolute:** Pick a calendar date (e.g. `2024-01-01`).\n• **Relative:** e.g. `7` days, `2` months, `1` year — counted backward from today.\n\nLeave empty to allow posts from any past date. Combines with \"Posts Older Than\" for a window. 🗓️"
          },
          "newestPostDate": {
            "title": "⌛ Posts Older Than (End Date)",
            "type": "string",
            "description": "🛑 **Only include posts *before* this date.**\n\n• **Absolute:** e.g. `2024-12-31`.\n• **Relative:** e.g. `0` for “today” or a number of days/months/years ago.\n\nUse together with \"Posts Newer Than\" to scrape a precise date range. Leave empty for no end limit. 📆"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Settings",
            "type": "object",
            "description": "🛡️ **Anti-block & reliability.**\n\n• The actor **prefers Apify Residential proxy** when available for higher success rates.\n• If residential isn’t set, it falls back to **Apify Datacenter** proxy.\n• You can optionally provide **custom proxy URLs** here as a fallback.\n\nNo proxy configuration is required for basic runs; the actor will use Apify proxy when possible. 🔒"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}