{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Reels Scraper",
    "description": "Facebook Reels Scraper extracts captions, play counts, reactions, hashtags and HD/SD video links — scrape Facebook Reels in bulk for analytics, influencer research, monitoring and short-video content export.",
    "version": "1.0",
    "x-build-id": "789jzO6x6pefRY8ax"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_minds~facebook-reels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_minds-facebook-reels-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/data_minds~facebook-reels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data_minds-facebook-reels-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/data_minds~facebook-reels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data_minds-facebook-reels-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": {
          "startUrls": {
            "title": "🔗 Facebook URLs",
            "type": "array",
            "description": "One or more Facebook links — bulk paste supported. Accepted formats:<br>📄 Page / profile: <code>https://www.facebook.com/LeonardoDiCaprio/</code><br>🎞️ Reels tab: <code>https://www.facebook.com/LeonardoDiCaprio/reels/</code><br>🆔 Numeric profile: <code>https://www.facebook.com/profile.php?id=100044203430980</code> or <code>people/Name/123456789</code><br>🎬 Single reel: <code>https://www.facebook.com/reel/31939704905645094</code> or <code>/videos/&lt;id&gt;</code><br>🔗 Share links: <code>https://www.facebook.com/share/r/…</code>, <code>fb.watch/…</code><br>👤 Bare usernames such as <code>LeonardoDiCaprio</code> work too.<br><strong>At least one URL here or one username below is required.</strong>",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "👤 Facebook usernames (optional)",
            "type": "array",
            "description": "✨ One username or numeric profile ID per line — bulk paste supported. Each is turned into a full profile URL automatically, e.g. <code>Cristiano</code>, <code>nike</code>, <code>100044203430980</code>. Use this instead of (or together with) the URL list above.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "🔢 Max reels per page / profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many reels for each page or profile. <code>0</code> = every reel the page has. Start low (10–50) to test, then scale up. Single-reel URLs always return exactly one record.",
            "default": 20
          },
          "onlyPostsNewerThan": {
            "title": "📅 Reels newer than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Only keep reels posted on or after this date. Absolute <code>YYYY-MM-DD</code> / ISO timestamp (<code>2025-09-23T10:02:01</code>, UTC) or relative like <code>3 days</code>, <code>2 weeks</code>, <code>6 months</code>, <code>1 year</code>. Pagination stops automatically once the feed gets older than this, saving time and cost."
          },
          "onlyPostsOlderThan": {
            "title": "📆 Reels older than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Only keep reels posted on or before this date — combine with the field above to scrape an exact date range. Same formats: <code>YYYY-MM-DD</code>, ISO timestamp, or relative (<code>1 month</code>)."
          },
          "minPlayCount": {
            "title": "▶️ Minimum play count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip reels with fewer plays than this. Leave empty / <code>0</code> for no minimum. Great for surfacing only viral content."
          },
          "maxPlayCount": {
            "title": "⏸️ Maximum play count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip reels with more plays than this. Leave empty / <code>0</code> for no maximum."
          },
          "minDurationSeconds": {
            "title": "⏱️ Minimum duration (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Skip reels shorter than this many seconds. Leave empty / <code>0</code> for no minimum."
          },
          "maxDurationSeconds": {
            "title": "⏳ Maximum duration (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Skip reels longer than this many seconds. Leave empty / <code>0</code> for no maximum."
          },
          "downloadVideos": {
            "title": "💾 Download reel videos to storage",
            "type": "boolean",
            "description": "When ON, each reel's MP4 (progressive, with audio) is downloaded and saved to this run's key-value store with a public download link in <code>downloadedVideoUrl</code>. Facebook's own video URLs expire after a few hours — this gives you a link that keeps working. ⚠️ Slower and uses more bandwidth; raise the Actor memory for big batches.",
            "default": false
          },
          "videoQuality": {
            "title": "🎚️ Video quality to download",
            "enum": [
              "hd",
              "sd"
            ],
            "type": "string",
            "description": "Which progressive MP4 to download when video download is ON. HD falls back to SD when Facebook only offers SD.",
            "default": "hd"
          },
          "includeDashManifest": {
            "title": "🧬 Include DASH manifest & full playback data",
            "type": "boolean",
            "description": "Keep the complete <code>playback_video</code> block including the DASH manifest XML (every video/audio rendition with direct URLs). Adds ~10–25 KB per reel. Turn OFF for a leaner dataset — the parsed <code>videoQualities</code> list and HD/SD URLs stay either way.",
            "default": true
          },
          "includeRawNode": {
            "title": "🧩 Include raw data",
            "type": "boolean",
            "description": "Attach the complete raw reel object under <code>raw</code> — for power users and debugging, or if a field you need isn't mapped yet.",
            "default": false
          },
          "includeProfileSummary": {
            "title": "📋 Include per-page summary rows",
            "type": "boolean",
            "description": "Emit one bookkeeping record per input URL (<code>recordType: \"profileSummary\"</code>) with reels found / saved / filtered, batches walked and why scraping stopped — shown in its own <em>Profile summary</em> view of the Output tab. These rows are never charged.",
            "default": true
          },
          "includeErrorRows": {
            "title": "🚨 Include error rows",
            "type": "boolean",
            "description": "Emit one record (<code>recordType: \"error\"</code>, <code>success: false</code>) for every input URL that could not be scraped, with a plain-English reason — shown in the <em>Errors</em> view. Never charged.",
            "default": true
          },
          "language": {
            "title": "🌐 Content language",
            "type": "string",
            "description": "Accept-Language sent to Facebook (affects localized labels such as privacy). Default <code>en-US</code>.",
            "default": "en-US"
          },
          "concurrency": {
            "title": "🧵 Pages in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages/profiles are scraped at the same time. 2–5 is a good balance between speed and staying under Facebook's radar.",
            "default": 3
          },
          "maxProfiles": {
            "title": "🧮 Max input URLs to process",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the merged, de-duplicated worklist to the first N targets. <code>0</code> = process everything you pasted.",
            "default": 0
          },
          "minRequestDelay": {
            "title": "🐢 Minimum delay before each request (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "A polite randomized pause is taken before every request, between this and the maximum below.",
            "default": 0.5
          },
          "maxRequestDelay": {
            "title": "🐇 Maximum delay before each request (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Upper bound of the randomized pause. Raise both delays if you see a lot of retry / backoff activity in the log.",
            "default": 1.5
          },
          "maxRetries": {
            "title": "🔁 Max retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times one failed / rate-limited request is retried (with backoff) before giving up on it. The residential proxy tier always gets at least 3 full attempts per page.",
            "default": 3
          },
          "requestTimeout": {
            "title": "⏱️ Request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for one response. Reels pages are large (10–20 MB), so keep this generous.",
            "default": 60
          },
          "maxPages": {
            "title": "📄 Max batches per page / profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety valve: hard cap on how many batches (≈10 reels each) are loaded per page or profile. <code>0</code> = no cap (until the limit / date range / end of feed).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "🚦 Default is NO proxy — the Actor talks to Facebook directly. If Facebook ever rejects or blocks a request, it escalates automatically step by step: 🚫 no proxy → 🖥️ datacenter proxy → 🏠 residential proxy (retrying up to 3× on residential), then sticks with residential for the rest of the run. Every escalation is logged clearly. Force a tier here if you already know what you need (residential is the most reliable for Facebook).",
            "default": {
              "useApifyProxy": false
            }
          },
          "debug": {
            "title": "🐞 Debug log",
            "type": "boolean",
            "description": "Log every retry / backoff with details. Handy when reporting an issue.",
            "default": false
          },
          "paginationDocId": {
            "title": "Pagination query override",
            "type": "string",
            "description": "Internal — leave empty."
          },
          "paginationFriendlyName": {
            "title": "Pagination query name override",
            "type": "string",
            "description": "Internal — leave empty."
          },
          "graphqlPageSize": {
            "title": "Batch size override",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Internal — leave at the default.",
            "default": 10
          },
          "extraRelayFlags": {
            "title": "Extra request flags",
            "type": "object",
            "description": "Internal — leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}