# Instagram reels transcribe (`linen_snack/instagram-reels-transcribe`) Actor

Effortlessly convert any public Instagram reels videos into accurate text, subtitles, or translations with this powerful Google Gemini API actor.

- **URL**: https://apify.com/linen_snack/instagram-reels-transcribe.md
- **Developed by:** [ius iyb](https://apify.com/linen_snack) (community)
- **Categories:** AI, Social media, Automation
- **Stats:** 69 total users, 0 monthly users, 0.0% runs succeeded, 4 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

***

## Instagram Video Transcriber with Gemini

This Apify actor uses the **Google Gemini API** to transcribe it. It's built to be robust, automatically handling video-to-audio conversion and compression.

### Key Features

- **Direct Transcription from URL**: Simply provide a public Instagram video URL.
- **Powered by Google Gemini**: Leverages Google's powerful generative models for transcription. The default model is `gemini-1.5-flash`.
- **Automatic Audio Handling**: The actor automatically extracts the audio from the `.mp4` video and compresses it to an `.mp3` format suitable for the API.
- **Advanced Control**: Customize the output with optional parameters like a custom prompt and temperature settings to guide the model's output.

### 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. **Google AI Platform**: The primary cost will come from the Google Gemini API. You must provide your own Gemini API key, and you will be billed by Google for the API usage. For the most current pricing, please refer to the [Google AI Platform Pricing Page](https://ai.google.dev/pricing).

### Input Configuration

The actor requires the following input configuration.

| Field | Type | Description |
| :--- | :--- | :--- |
| **`instagramUrl`** | `String` | **(Required)** The full URL of the public Instagram video you want to process. |
| **`geminiApiKey`** | `String` | **(Required)** Your secret API key from Google AI Studio. It's highly recommended to set this as a [secret environment variable](https://docs.apify.com/platform/actors/development/environment-variables#secrets) for security. |
| **`model`** | `String` | (Optional) The Gemini model to use. Defaults to `gemini-1.5-flash`. |
| **`prompt`** | `String` | (Optional) A text prompt to guide the model's style or to correct specific words and acronyms that are often misrecognized. Example: "Transcribe the following audio:" |
| **`temperature`** | `Number` | (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. |

### Output

The actor will save its results to the default Apify dataset. The output is a JSON object that contains the model used and the transcribed text from the Gemini API.

#### Example Output

```json
[{
  "model": "gemini-1.5-flash",
  "result": "This is a test of the Instagram transcriber."
}]
```

### How to Use

1. Navigate to the actor on the Apify platform.
2. Click the "Try actor" button.
3. Enter the **Instagram Video URL** and your **Gemini 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 Instagram video must be **publicly accessible**. Private or deleted videos will cause an error.

***

# Actor input Schema

## `instagramUrl` (type: `string`):

The URL of the Instagram video you want to process.

## `googleApiKey` (type: `string`):

Your Google AI (Gemini) API key. Get one from Google AI Studio. Best practice is to set this as a secret environment variable.

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

Choose the primary task. This will be used to construct the prompt for the Gemini model. 'Translate' will request a translation to English.

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

Choose you gemini model.

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

The language of the audio in ISO-639-1 format (e.g., 'en', 'es'). Providing this can improve accuracy by giving the model a hint.

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

Provide a detailed prompt to guide the model's style, correct specific words/acronyms, or request special formatting (e.g., 'Provide a summary at the end').

## Actor input object example

```json
{
  "task": "transcription",
  "model": "gemini-2.5-pro"
}
```

# 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": "gemini-2.5-pro"
};

// Run the Actor and wait for it to finish
const run = await client.actor("linen_snack/instagram-reels-transcribe").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": "gemini-2.5-pro",
}

# Run the Actor and wait for it to finish
run = client.actor("linen_snack/instagram-reels-transcribe").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": "gemini-2.5-pro"
}' |
apify call linen_snack/instagram-reels-transcribe --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,linen_snack/instagram-reels-transcribe"
        }
    }
}
```

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/MmBfFf5e11ixJqOWH/builds/GUrQRuuwkbkGA2yci/openapi.json
