# Bulk Media Transcriber (`physealabs/bulk-media-transcriber`) Actor

Transcribe batches of Instagram, TikTok, YouTube, direct media URLs, and uploaded files into text, timestamps, SRT, and VTT.

- **URL**: https://apify.com/physealabs/bulk-media-transcriber.md
- **Developed by:** [jay casey](https://apify.com/physealabs) (community)
- **Categories:** AI, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 media transcribeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bulk Media Transcriber

Turn Instagram reels, TikToks, YouTube videos, direct media links, and uploaded files into searchable text and subtitle files. **No OpenAI key is required**—the Actor uses its own GPU-hosted large-v3 Whisper service by default. You are charged **$0.006 only for each successfully transcribed media item**.

### Input example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "language": "en",
  "includeSubtitles": true
}
```

### Output example

One dataset row is written per input. Failures remain visible as rows with `status: "failed"` and `error`.

```json
{
  "index": 1,
  "source_url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
  "source_type": "youtube",
  "status": "succeeded",
  "title": "Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film",
  "language": "en",
  "duration_seconds": 33.0,
  "word_count": 12,
  "text": "Complete detected speech appears here...",
  "segments": [
    {"start": 2.4, "end": 5.9, "text": "Timestamped segment text."}
  ],
  "processing_seconds": 8.31
}
```

The default key-value store also contains:

- `transcripts/0001-....txt` — plain text
- `transcripts/0001-....srt` — SubRip subtitles
- `transcripts/0001-....vtt` — WebVTT subtitles
- `RUN_SUMMARY.json` — success, failure, and word totals

### Supported inputs

- Public Instagram reel/post, TikTok, and YouTube URLs, acquired with `yt-dlp`
- Direct public HTTP(S) audio/video URLs
- Public or signed Apify key-value-store/object-store file URLs

Use `urls` for mixed social/direct links, `mediaUrls` for direct links, or `uploadedFiles` for uploaded-file URLs. A run can process up to 1,000 items when `maxItems` is raised.

### Options

- `language`: optional ISO-639-1 hint such as `en`, `es`, or `hi`; blank enables detection.
- `prompt`: optional names, acronyms, and vocabulary hints.
- `includeSubtitles`: create SRT and VTT files (default `true`).
- `concurrency`: parallel items, from 1 to 10 (default `3`).
- `maxFileSizeMb`: direct/uploaded download limit (default `24`).
- `transcription`: advanced buyer override. Supply `baseUrl`, `apiKey`, and optionally `model` to use your own OpenAI-compatible `/audio/transcriptions` API. Leaving it blank uses the included GPU service.

### Billing and failure behavior

Billing emits the `media-transcribed` event at **$0.006** only after media acquisition and transcription succeed. Download, unsupported/private media, and transcription failures are not charged. One failed item does not stop the rest of the batch.

Social sources must be publicly accessible to `yt-dlp`. Login-gated, private, geo-blocked, or DRM-protected media can fail as an item-level row.

### Local development

```bash
python -m pip install -r requirements.txt -r requirements-dev.txt
pytest -q
python -m compileall -q src
```

For a local Actor run, put input in `storage/key_value_stores/default/INPUT.json`, set `APIFY_LOCAL_STORAGE_DIR=./storage`, `OPENAI_BASE_URL`, and `OPENAI_API_KEY`, then run `python -m src`.

# Actor input Schema

## `urls` (type: `array`):

Instagram reel/post, TikTok, YouTube, or direct downloadable audio/video URLs. Each successful URL costs $0.006.

## `mediaUrls` (type: `array`):

Direct public HTTP(S) links to audio or video files.

## `uploadedFiles` (type: `array`):

Public or signed URLs for files uploaded to an Apify key-value store or another object store. API callers may also send objects with url and name.

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

Optional ISO-639-1 code such as en, es, or hi. Leave blank for automatic detection.

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

Optional names, acronyms, spellings, or context that may improve transcription.

## `transcription` (type: `object`):

Optional override for the built-in GPU Whisper service. Most users should leave this unchanged. To bring your own OpenAI-compatible endpoint, supply model, baseUrl, and apiKey; omitted values use the Actor's secure defaults.

## `includeSubtitles` (type: `boolean`):

Save timestamped SRT and WebVTT subtitle files for every successful item.

## `concurrency` (type: `integer`):

Number of media items processed concurrently. Lower this if source sites throttle downloads.

## `maxItems` (type: `integer`):

Safety limit for the total number of URLs accepted in one run.

## `maxFileSizeMb` (type: `integer`):

Reject direct or uploaded media larger than this many megabytes before transcription.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aqz-KE-bpKQ"
  ],
  "transcription": {
    "model": "whisper-1"
  },
  "includeSubtitles": true,
  "concurrency": 3,
  "maxItems": 100,
  "maxFileSizeMb": 24
}
```

# Actor output Schema

## `transcripts` (type: `string`):

One structured row per input, including source metadata, status, transcript, segments, and errors.

## `files` (type: `string`):

Per-item TXT, SRT, and VTT records plus RUN\_SUMMARY.json.

## `summary` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://www.youtube.com/watch?v=aqz-KE-bpKQ"
    ],
    "transcription": {
        "model": "whisper-1"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("physealabs/bulk-media-transcriber").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 = {
    "urls": ["https://www.youtube.com/watch?v=aqz-KE-bpKQ"],
    "transcription": { "model": "whisper-1" },
}

# Run the Actor and wait for it to finish
run = client.actor("physealabs/bulk-media-transcriber").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 '{
  "urls": [
    "https://www.youtube.com/watch?v=aqz-KE-bpKQ"
  ],
  "transcription": {
    "model": "whisper-1"
  }
}' |
apify call physealabs/bulk-media-transcriber --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,physealabs/bulk-media-transcriber"
        }
    }
}

```

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/4b1UsGAdFVBoAOtNm/builds/YPahfdXfaOX2NbD3r/openapi.json
