# YouTube Video Timestamper | Chapters & Summaries (Gemini) (`andok/youtube-video-timestamper`) Actor

Turn any YouTube video into timestamped, titled chapter blocks with clickable URLs using your own Gemini API key. Any language. $0.05/video + $0.02 start.

- **URL**: https://apify.com/andok/youtube-video-timestamper.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** AI, Videos
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 video timestampeds

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

## YouTube Video Timestamper

Summarize any YouTube video into timestamped, titled blocks using Google Gemini AI. Each block contains a timestamp range, a descriptive title, a summary paragraph, and a clickable YouTube URL that jumps to that exact moment. Output in any language.

### Features

- **Timestamped summaries** — breaks videos into logical sections with start/end timestamps
- **Titled blocks** — each section gets a one-sentence descriptive title
- **Clickable URLs** — every block includes a YouTube link with the exact timestamp
- **Multi-language** — output in any language (English, Estonian, German, Spanish, etc.)
- **Configurable model** — use any Gemini model (default: gemini-3.1-flash-lite-preview)
- **Few-shot prompting** — uses multi-turn examples for consistent, high-quality output

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `videoUrl` | `string` | Yes | — | YouTube video URL to summarize |
| `geminiApiKey` | `string` | Yes | — | Google Gemini API key ([get one free](https://aistudio.google.com/apikey)) |
| `language` | `string` | No | `English` | Output language |
| `model` | `string` | No | `gemini-3.1-flash-lite-preview` | Gemini model ID |

#### Input Example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=EKG9kX86u0s",
  "geminiApiKey": "YOUR_API_KEY",
  "language": "Estonian",
  "model": "gemini-3.1-flash-lite-preview"
}
```

### Output

Each run produces a single dataset item with:

- `videoUrl` (`string`) — normalized YouTube URL
- `summary` (`string`) — the full timestamped summary
- `language` (`string`) — language used
- `modelUsed` (`string`) — Gemini model used
- `tokensUsed` (`integer`) — total tokens consumed
- `error` (`string`) — error message if failed
- `processedAt` (`string`) — ISO timestamp

#### Output Example

```
0:00 – 0:22 **Google Workspace CLI tutvustus**
Google Workspace on muutnud oma töökeskkonna AI-agentidele kättesaadavamaks, tuues turule uue Rust-põhise CLI-tööriista.
https://youtu.be/EKG9kX86u0s?t=0

0:22 – 0:37 **Tuleviku väljavaated MCP jaoks**
Google'i kui suurettevõtte sisenemine CLI-tööriistade arendusse tekitab küsimusi selle tehnoloogia tuleviku kohta.
https://youtu.be/EKG9kX86u0s?t=22
```

### Use Cases

- **Content creators** — generate chapter markers and descriptions for YouTube videos
- **Researchers** — quickly scan long videos for relevant sections
- **Translators** — get video summaries in any language without watching
- **Note-takers** — create structured notes from educational videos
- **SEO** — generate timestamped descriptions for video content

# Actor input Schema

## `videoUrl` (type: `string`):

YouTube video URL to summarize with timestamps.

## `geminiApiKey` (type: `string`):

Your Google Gemini API key. Get one free at https://aistudio.google.com/apikey

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

Language for the summary output (e.g., English, Estonian, German, Spanish).

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

Gemini model ID to use. Default is gemini-3.1-flash-lite-preview.

## Actor input object example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "language": "English",
  "model": "gemini-3.1-flash-lite-preview"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

## `run` (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 = {
    "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/youtube-video-timestamper").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 = { "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw" }

# Run the Actor and wait for it to finish
run = client.actor("andok/youtube-video-timestamper").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 '{
  "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
}' |
apify call andok/youtube-video-timestamper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andok/youtube-video-timestamper"
        }
    }
}
```

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/SFin6VambKp3ejhMk/builds/Sc4hZ9dRCN1gwPrf1/openapi.json
