# Podcast to Highlights (`shortlane/podcast-highlights`) Actor

Turn a YouTube podcast (or any audio URL) into a timestamped transcript and the 5-8 moments most likely to work as short clips. Captions first, speech-to-text on demand, optional LLM rescoring with your own key.

- **URL**: https://apify.com/shortlane/podcast-highlights.md
- **Developed by:** [shortlane](https://apify.com/shortlane) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 podcast processeds

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?

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

## Podcast to Highlights

Give it a **YouTube podcast** (or a direct audio/video URL) and get back a **timestamped transcript** plus the **5-8 moments most likely to work as short clips**: start and end times, a suggested title, a hook score and the reasons behind it. Built for clippers, editors and agencies who cut Shorts, Reels and TikToks from long conversations.

### How it works

1. **Captions first.** If the video has YouTube captions (manual or automatic), the transcript is built from them in seconds and you pay only the per-podcast fee.
2. **Speech-to-text when needed.** No captions, a direct audio file, or `transcribe_speech` on: the audio is transcribed with a speech model and charged per minute.
3. **Highlight detection.** Sentences are grouped into 15-60 s windows and scored for hooks (questions, bold claims, concrete numbers, story markers, pacing). Overlapping windows are removed and the top N are returned in timeline order.
4. **Optional LLM rescoring.** Add your own OpenAI or Anthropic key to get sharper titles and a second opinion on the score. The key is sent only to that provider and never stored or logged.

### Output

One dataset record per highlight:

```json
{
  "rank": 1,
  "title": "80% of your time goes to manual work",
  "start": 812.4,
  "end": 846.9,
  "duration_s": 34.5,
  "score": 88.0,
  "reasons": ["hook at the start", "concrete number", "ideal length"],
  "text": "did you know that eighty percent of your time goes to manual work? ...",
  "source_url": "https://www.youtube.com/watch?v=...",
  "source_title": "A conversation with ...",
  "transcript_source": "youtube-captions"
}
```

The full transcript (segments and words with timestamps) is saved in the run's key-value store as `transcript.json`; the `OUTPUT` record summarizes the run (duration, transcript source, minutes charged, LLM status).

### Input

| Field | Description | Default |
|---|---|---|
| `url` | YouTube video URL or direct audio/video URL | required |
| `highlights` | Number of moments to return (3-15) | 6 |
| `language` | Spoken language code (`en`, `es`, ...) | auto |
| `transcribe_speech` | Force speech-to-text even if captions exist | false |
| `llm_provider` / `llm_api_key` | Optional rescoring with your own key | — |
| `max_duration_hours` | Reject longer sources before processing | 4 |

### Pricing

- **$0.10 per podcast processed** (captions route).
- **+ $0.02 per minute of audio** when speech-to-text is used (a 60-minute episode without captions costs $1.30 in total).
- Nothing is charged if the URL is invalid, the source is too long, or processing fails.

### Limits

- **YouTube and proxies.** YouTube blocks most datacenter IPs ("Sign in to confirm you're not a bot"). For YouTube URLs enable **Proxy for YouTube** with Apify residential proxies (billed to your Apify account, a few KB per run on the captions route) or pass your own proxy. Direct audio/video URLs need no proxy. If YouTube still blocks the request the run fails and **nothing is charged**.

- Sources up to 4 hours (configurable up to 8).

- YouTube captions are used as published; automatic captions may contain recognition errors. Speech-to-text uses a compact model tuned for speed; timestamps are accurate to about half a second.

- Only public YouTube videos and publicly reachable files. No downloads of video are made in the captions route.

### Pairs well with

[Content Rewards Campaign Finder](https://apify.com/shortlane/content-rewards-campaign-finder): find paid clipping campaigns, then run this Actor on their reference material.

Questions: shortlane.media@gmail.com

# Actor input Schema

## `url` (type: `string`):

A YouTube video URL, or a direct link to an audio/video file (mp3, m4a, wav, mp4).

## `highlights` (type: `integer`):

How many 15-60 s moments to return (3-15).

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

ISO code of the spoken language (e.g. en, es). Auto-detected when empty.

## `transcribe_speech` (type: `boolean`):

Ignore YouTube captions and transcribe the audio (charged per minute). Used automatically when no captions exist.

## `llm_provider` (type: `string`):

Rescore highlights and generate titles with your own LLM key. Nothing is stored.

## `llm_api_key` (type: `string`):

Your own key. Sent only to the provider you selected; never logged or stored.

## `max_duration_hours` (type: `number`):

Longer sources are rejected before any processing.

## `proxyConfiguration` (type: `object`):

YouTube blocks most datacenter IPs. For YouTube URLs use Apify Proxy (residential recommended, billed to your account) or your own proxy. Not needed for direct audio/video URLs.

## `proxy_url` (type: `string`):

http(s)://user:pass@host:port. Takes precedence over proxyConfiguration.

## Actor input object example

```json
{
  "url": "https://www.youtube.com/watch?v=",
  "highlights": 6,
  "transcribe_speech": false,
  "max_duration_hours": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `highlights` (type: `string`):

One record per highlight with start, end, title, score and text.

## `transcript` (type: `string`):

Segments and words with timestamps.

## `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 = {
    "url": "https://www.youtube.com/watch?v=",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("shortlane/podcast-highlights").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 = {
    "url": "https://www.youtube.com/watch?v=",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("shortlane/podcast-highlights").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 '{
  "url": "https://www.youtube.com/watch?v=",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call shortlane/podcast-highlights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shortlane/podcast-highlights"
        }
    }
}
```

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/SkpuCBzfmnu5XRRwP/builds/H3fn5TGGNehU1Hsa8/openapi.json
