# Facebook video reel transcript (`linen_snack/facebook-video-reel-transcript`) Actor

Effortlessly convert any public Facebook reels videos into accurate text, subtitles, or translations with this powerful OpenAI Whisper API actor.

- **URL**: https://apify.com/linen_snack/facebook-video-reel-transcript.md
- **Developed by:** [ius iyb](https://apify.com/linen_snack) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 43 total users, 1 monthly users, 92.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Videos Transcriber & Translator

This Apify actor downloads a public Facebook  video, extracts its audio, and uses the OpenAI Whisper API to either transcribe it into its original language or translate it into English. It's built to be robust, automatically handling video-to-audio conversion and compression to stay within API limits.

It supports all the latest features from the OpenAI Audio API, including multiple models (`whisper-1`, `gpt-4o-transcribe`), various output formats (JSON, SRT, VTT), and word-level timestamp generation.

### Key Features

- **Direct Transcription from URL**: Simply provide a public Facebook  video URL.
- **Transcription & Translation**: Choose to transcribe in the original language or translate directly to English.
- **Multiple OpenAI Models**: Supports `whisper-1`, `gpt-4o-transcribe`, and `gpt-4o-mini-transcribe`.
- **Automatic Audio Handling**: The actor automatically extracts the audio from the `.mp4` video and compresses it to an `.mp3` to avoid OpenAI's 25 MB file size limit.
- **Word-Level Timestamps**: Get precise start and end times for each word in the transcript (requires `whisper-1`).
- **Rich Output Formats**: Get your transcript back as plain text, structured JSON, or subtitle formats like SRT and VTT.
- **Advanced Control**: Customize the output with optional parameters like language hints and temperature settings.

### Cost of Usage

This actor uses two services that may have associated costs:

1. **Apify Platform**: You will be charged for Apify [Compute Units (CUs)](https://docs.apify.com/platform/actors/running/usage-and-resources#compute-units) while the actor runs. The consumption is generally low for this task, as it primarily waits for API responses.
2. **OpenAI API**: The primary cost will come from the OpenAI API. You must provide your own OpenAI API key, and you will be billed by OpenAI for the audio processing. For the most current pricing, please refer to the [OpenAI Pricing Page](https://openai.com/pricing#audio-models).

### Input Configuration

The actor requires the following input configuration.

| Field | Type | Description |
| :--- | :--- | :--- |
| **`Facebook Url`** | `String` | **(Required)** The full URL of the public Facebook  video you want to process. |
| **`openaiApiKey`** | `String` | **(Required)** Your secret API key from OpenAI. It's highly recommended to set this as a [secret environment variable](https://docs.apify.com/platform/actors/development/environment-variables#secrets) for security. |
| **`task`** | `String` | The task to perform. Can be `transcription` (default) or `translation`. Translation will always output in English. |
| **`model`** | `String` | The OpenAI model to use. `whisper-1` (default) supports all features. `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` are newer but have some limitations. **Note:** Translation and Timestamps require `whisper-1`. |
| **`language`** | `String` | (Optional) The language of the audio in [ISO-639-1 format](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g., `en`, `es`, `zh`). Supplying this can improve accuracy. |
| **`prompt`** | `String` | (Optional) A text prompt to guide the model's style or to correct specific words and acronyms that are often misrecognized. |
| **`response_format`** | `String` | The output format of the transcript. Default is `json`. **Note:** `gpt-4o` models only support `json` or `text`. Timestamps require `verbose_json`. |
| **`temperature`** | `String` | (Optional) A value between 0 and 1. Higher values (e.g., 0.8) make the output more random; lower values (e.g., 0.2) make it more focused. |
| **`timestamp_granularities`** | `Array` | (Optional) Request word or segment-level timestamps. **Requires `whisper-1` model and `verbose_json` response format.** |

### Output

The actor will save its results to the default Apify dataset. The output is a JSON object that contains the task and model used, along with the full result from the OpenAI API.

#### Example Output (`verbose_json` with word timestamps)

```json
[{
  "task": "transcription",
  "model": "whisper-1",
  "result": {
    "text": "This is a test of the Facebook  transcriber.",
    "segments": [
      {
        "id": 0,
        "seek": 0,
        "start": 0,
        "end": 3.5,
        "text": " This is a test of the Facebook  transcriber.",
        "tokens": [ ... ],
        "temperature": 0,
        "avg_logprob": -0.25,
        "compression_ratio": 1.2,
        "no_speech_prob": 0.1
      }
    ],
    "words": [
      {
        "word": "This",
        "start": 0.5,
        "end": 0.7
      },
      {
        "word": "is",
        "start": 0.7,
        "end": 0.8
      },
      {
        "word": "a",
        "start": 0.8,
        "end": 0.9
      },
      {
        "word": "test",
        "start": 0.9,
        "end": 1.2
      },
      ...
    ],
    "language": "english"
  }
}]
```

### How to Use

1. Navigate to the actor on the Apify platform.
2. Click the "Try actor" button.
3. Enter the **Facebook  Video URL** and your **OpenAI API Key**.
4. (Optional) Adjust the other configuration options as needed.
5. Click the **Start** button and wait for the run to finish.
6. Once finished, check the **Output** tab in the run console to view and download your results.

### Limitations

- The input Facebook  video must be **publicly accessible**. Private or deleted videos will cause an error.

***

# Actor input Schema

## `facebookUrl` (type: `string`):

The URL of the Facebook video you want to process.

## `openaiApiKey` (type: `string`):

Your OpenAI API key. Best practice is to set this as a secret environment variable.

## `task` (type: `string`):

Choose whether to transcribe the audio into its original language or translate it into English.

## `model` (type: `string`):

Select the model. Note: 'translation' and 'timestamp_granularities' tasks require 'whisper-1'.

## `language` (type: `string`):

The language of the audio in ISO-639-1 format (e.g., 'en', 'es'). Improves accuracy. Required by some models.

## `prompt` (type: `string`):

A prompt to guide the model's style or to correct specific words and acronyms.

## `response_format` (type: `string`):

The output format. Note: 'gpt-4o-\*' models only support 'json' or 'text'. Timestamps require 'verbose_json'.

## `temperature` (type: `string`):

A value between 0 and 1. Higher values (e.g., 0.8) are more random; lower values (e.g., 0.2) are more focused.

## `timestamp_granularities` (type: `array`):

Request word or segment-level timestamps. Requires 'whisper-1' model and 'verbose_json' response format.

## Actor input object example

```json
{
  "task": "transcription",
  "model": "whisper-1",
  "response_format": "json"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "task": "transcription",
    "model": "whisper-1",
    "response_format": "json"
};

// Run the Actor and wait for it to finish
const run = await client.actor("linen_snack/facebook-video-reel-transcript").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "task": "transcription",
    "model": "whisper-1",
    "response_format": "json",
}

# Run the Actor and wait for it to finish
run = client.actor("linen_snack/facebook-video-reel-transcript").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "task": "transcription",
  "model": "whisper-1",
  "response_format": "json"
}' |
apify call linen_snack/facebook-video-reel-transcript --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,linen_snack/facebook-video-reel-transcript"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/z9Nxa66z8rFfOdpAS/builds/PvFj0KICU6IDKRByL/openapi.json
