{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Videos Scraper: Page Videos, Views",
    "description": "Pull a public Facebook page's whole Videos tab, reels included, with no login: give links, usernames or page ids. Each video: exact plays and post plays, reactions by type, comment and share counts, title, upload date, length, HD and SD MP4 files, captions. JSON, CSV, API. Pay per video.",
    "version": "0.1",
    "x-build-id": "iCGtqdAe9Di0YYn2A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~facebook-videos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-facebook-videos-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/automation_craft~facebook-videos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-facebook-videos-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/automation_craft~facebook-videos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-facebook-videos-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": {
          "pages": {
            "title": "Facebook pages or profiles",
            "type": "array",
            "description": "One per line: a public page or profile (facebook.com/natgeo, facebook.com/natgeo/videos/, facebook.com/profile.php?id=100044623170418, facebook.com/people/Name/100044623170418/, a username such as natgeo or @natgeo, a numeric profile id or a page's numeric (delegate) id such as 23497828950). Its Videos tab is read: every video and reel the page posted, newest first. A link to one single video or reel is not read (a free status row says so). Up to 500 values. Also read as startUrls, profileUrls, facebook_urls, username, pageId, profileId, pageNames, pageIds, pageTargets, urls, delegatePageId or delegate_page_id.",
            "items": {
              "type": "string"
            }
          },
          "pagesListUrl": {
            "title": "Pages from a file or Google Sheet link",
            "type": "string",
            "description": "One https link to a public text or CSV file of up to 1 MB, or to a Google Sheet shared with \"anyone with the link\" (its first tab, or the tab in the link, is read as CSV). Every cell that names a Facebook page or profile is read as one more value of \"pages\". startUrls items in Apify's { \"requestsFromUrl\": ... } form are read the same way."
          },
          "maxVideosPerPage": {
            "title": "Videos per page",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many videos to deliver for each page, newest first (50 when empty, up to 100000: a page's whole Videos tab). Videos left out by a filter do not count. Also read as resultsLimit, maxResultsPerPage, maxVideosPerTab or maxVideosPerProfile."
          },
          "maxItems": {
            "title": "Videos in the whole run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "An upper bound on the videos the whole run delivers, across every page. Empty: no bound beyond the videos per page and your charge limit. Also read as maxResults, maxVideos or maxTotalItems."
          },
          "onlyVideosNewerThan": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only videos published on or after this day (UTC): YYYY-MM-DD, an ISO time, today, yesterday, or a relative \"7 days\", \"2 weeks\", \"3 months\", \"1 year\" counted back from the run's start. The Videos tab lists videos newest first, so the walk stops at the first older ones. Also read as onlyNewerThan, publishedAfter, dateFrom or newerThan."
          },
          "sinceDays": {
            "title": "Published in the last N days",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "The same window as \"Published on or after\", given as a number of days back from the run's start (0 is today). Send one of the two."
          },
          "onlyVideosOlderThan": {
            "title": "Published on or before",
            "type": "string",
            "description": "Only videos published on or before this day (UTC), in the same forms. The newer videos before it are read free (they are not charged) within the run's unpaid work allowance, so an end date far back in a busy page's list can end the run early with a free row saying so. Also read as onlyOlderThan, publishedBefore, dateTo or olderThan."
          },
          "minPlays": {
            "title": "Minimum plays",
            "minimum": 0,
            "maximum": 999999999999,
            "type": "integer",
            "description": "Leave out videos with fewer plays than this (Facebook's exact play count). Videos left out are free. Also read as minViews."
          },
          "maxPlays": {
            "title": "Maximum plays",
            "minimum": 0,
            "maximum": 999999999999,
            "type": "integer",
            "description": "Leave out videos with more plays than this. Videos left out are free."
          },
          "minDurationSeconds": {
            "title": "Minimum length (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Leave out videos shorter than this many seconds. Videos left out are free."
          },
          "maxDurationSeconds": {
            "title": "Maximum length (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "Leave out videos longer than this many seconds. Videos left out are free."
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "maximum": 999999999,
            "type": "integer",
            "description": "Leave out videos with fewer reactions than this. Videos left out are free. With Video details off, Facebook's list sometimes gives 10,000 or more as 10,000: a minimum above 10,000 is surest with the details on."
          },
          "includeKeywords": {
            "title": "Text contains",
            "type": "array",
            "description": "Only videos whose title, text or hashtags contain at least one of these words or phrases, as whole words, case and accents ignored. Videos left out are free. Also read as keywords or captionContains.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Text does not contain",
            "type": "array",
            "description": "Leave out videos whose title, text or hashtags contain any of these words or phrases (the same matching). Videos left out are free.",
            "items": {
              "type": "string"
            }
          },
          "videoTypes": {
            "title": "Reels or videos",
            "type": "array",
            "description": "Keep only reels, or only videos that are not reels (empty: both; the Videos tab lists both). Judged on Facebook's own link of each video, which its details give, so it needs \"Video details\" on. Videos left out are free. Also read as videoType; onlyReels (true) keeps reels.",
            "items": {
              "type": "string",
              "enum": [
                "reel",
                "video"
              ],
              "enumTitles": [
                "Reels",
                "Videos (not reels)"
              ]
            }
          },
          "onlyWithCaptions": {
            "title": "Only videos with captions",
            "type": "boolean",
            "description": "Keep only videos that carry Facebook captions (subtitles), judged on their details (needs \"Video details\" on). Videos left out are free."
          },
          "includeDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "On (the default): each video's own page is read and delivered at no extra charge: reel or video, comment count, share count, the HD video file, Facebook's captions (link, language, every track), the music of a reel, the exact time. Off: the rows carry what the Videos tab list gives (plays, reactions, time, text, size, SD file, thumbnail) and the run is faster. Also read as includeEngagement."
          },
          "includeTranscripts": {
            "title": "Transcripts",
            "type": "boolean",
            "description": "Read Facebook's own captions file of each delivered video that has one and deliver it as text and timed cues (transcript, transcriptCues). No extra charge; needs \"Video details\" on. A video without captions gets transcriptStatus no_captions. Also read as fetchTranscripts."
          },
          "includeComments": {
            "title": "Comments (add-on)",
            "type": "boolean",
            "description": "Deliver the comments of each delivered video as rows of their own, up to the number below, in the order chosen below. Charged as the Comment event per comment row. Commenters' names are delivered; their profile ids and links only with personal data on."
          },
          "maxCommentsPerVideo": {
            "title": "Comments per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "With comments on: how many comment rows (replies included) to deliver for each video (20 when empty). Also read as maxCommentsPerItem or comments_limit."
          },
          "commentsOrder": {
            "title": "Comment order",
            "enum": [
              "oldest",
              "newest",
              "relevant"
            ],
            "type": "string",
            "description": "With comments on: oldest first (the default), newest first, or Facebook's most relevant first. Also read as comment_filter (most_relevant, newest, all_comments)."
          },
          "includeReplies": {
            "title": "Replies to comments",
            "type": "boolean",
            "description": "With comments on: read the replies under each comment too (charged as Comment rows, inside the comments per video)."
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "With replies on: how many replies to read under each comment (10 when empty)."
          },
          "includePageDetails": {
            "title": "Page details",
            "type": "boolean",
            "description": "Add each Page's About tab and its Meta Ad Library facts to its page row: category, address, phone, e-mail, websites, business hours, price range, the rating line, and whether the Page runs ads now (with its active ads count). No extra charge; read only for a page that delivered a video."
          },
          "includePersonalData": {
            "title": "Include personal data",
            "type": "boolean",
            "description": "Off: a person's profile (a public figure's included) keeps its name, and its profile id, username, link and picture are empty, and its video links are Facebook's watch links (facebook.com/watch/?v=<id>), which name no profile; mentions and commenters that are people keep their names without ids or links; links in the text that reach a person's profile are left out. On: they are delivered, and phone numbers and e-mail addresses written in the text get fields of their own. You are responsible for using personal data lawfully, the GDPR included. Texts are always delivered as Facebook serves them.",
            "default": false
          },
          "outputFormat": {
            "title": "Row format",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "full: every field of a video. compact: 26 fields most buyers sort, chart and download by (ids, link, kind, title, text, time, length, plays, counts, engagement rate, thumbnail, video file, transcript, page).",
            "default": "full"
          },
          "maxConcurrency": {
            "title": "Pages at once",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many pages to read at the same time (1 to 3)."
          },
          "requestDelayMs": {
            "title": "Pause between calls (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "The pause between two calls of one page, in milliseconds (200 to 10000; 300 when empty)."
          },
          "maxRunSeconds": {
            "title": "Stop after (seconds)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "End the run after this many seconds with what was read so far (60 to 86400). Empty: the run's own timeout."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy by default: the Videos tab pages, each video's details and the comments go through Apify's datacenter pool, and the Videos tab's list through Apify residential exits (the only exits Facebook answers it on), in the country named here (US when empty); naming the RESIDENTIAL group changes nothing else. Your own proxy links are possible (every call through them), and no proxy uses the run container's own address (Facebook then gives the first 9 videos of each page only)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}