{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Reels Scraper",
    "description": "Facebook Reels scraper: get views, likes, comments, shares, captions, music and MP4 video URLs to download from any public Page or profile, or from reel, share and video links. No login. Exact likes and comments, views even from share links, and personal profiles as well as Pages.",
    "version": "0.1",
    "x-build-id": "f2F22kCPAtdRxGBiY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lanternfetch~facebook-reels/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lanternfetch-facebook-reels",
        "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/lanternfetch~facebook-reels/runs": {
      "post": {
        "operationId": "runs-sync-lanternfetch-facebook-reels",
        "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/lanternfetch~facebook-reels/run-sync": {
      "post": {
        "operationId": "run-sync-lanternfetch-facebook-reels",
        "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 URLs or handles",
            "type": "array",
            "description": "Facebook Pages, profiles, reels, share links or videos, in any mix. For a Page or profile (URL or handle, e.g. <code>natgeo</code> or <code>https://www.facebook.com/natgeo</code>, or a <code>profile.php?id=</code> URL) the scraper reads its Reels tab. Reel URLs (<code>/reel/&lt;id&gt;</code>), share links (<code>/share/r/&lt;code&gt;</code>) and video URLs (<code>/&lt;owner&gt;/videos/&lt;id&gt;</code>) give one reel each.",
            "items": {
              "type": "string"
            }
          },
          "maxReelsPerProfile": {
            "title": "Max reels per Page or profile",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many reels to take from each Page's or profile's Reels tab, newest first. Reel, share and video URLs always give one reel each. You pay per reel, so this also caps the cost per Page or profile.",
            "default": 50
          },
          "newerThan": {
            "title": "Only reels newer than",
            "type": "string",
            "description": "Skip reels posted before this date: a date (<code>2026-10-01</code>) or a relative time (<code>7 days</code>, <code>2 weeks</code>, <code>3 months</code>). Leave empty for all reels up to the maximum. Facebook's Reels tab is not strictly sorted by date, so the scraper keeps going until it has seen 5 older reels in a row."
          },
          "exactCounts": {
            "title": "Exact view counts (slower)",
            "type": "boolean",
            "description": "Also open each reel's video page for the exact <code>playCount</code> and <code>viewCount</code>, instead of only the rounded <code>playCountRounded</code> and <code>viewCountRounded</code>. One extra request per reel, so Page and profile inputs take about 10 times the requests.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works for logged-out Facebook and is the cheapest. Choose residential only if datacenter runs get blocked.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Fall back to residential proxy when blocked",
            "type": "boolean",
            "description": "After 3 blocked requests in a row (HTTP 429 or 403, or a login page) on datacenter proxy, use Apify residential proxy for the rest of the run. Residential proxy traffic is billed to your Apify account.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel inputs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many inputs are scraped at once. Each Page or profile is paginated by one session at a time.",
            "default": 5
          },
          "healthCheck": {
            "title": "Health check mode",
            "type": "boolean",
            "description": "For monitoring: the run fails (status FAILED) when any Page or profile gives fewer than <code>maxReelsPerProfile</code> reels, any input fails, or Facebook's pagination query id is not found. Used by the daily health-check task.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}