# YouTube Video Analyzer | Ask AI Anything About a Video (`andok/youtube-video-analyzer`) Actor

AI watches the video and answers any question about it — products shown, claims made, moments, on-screen text, anything. $0.15/min (or $0.03/min with your Gemini key).

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

## Pricing

from $14.00 / 1,000 video minute analyzed (your gemini key)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## YouTube Video Analyzer — ask AI anything about a video

Gemini AI **watches the full video** — audio and visuals — and answers **any question you ask about it**, citing timestamps. Extract every product mentioned, audit claims, describe what happens on screen, check brand appearances, pull quotes, verify compliance — one prompt, one answer.

### What it does

- ✅ **Any custom prompt** — the AI watches the whole video before answering
- ✅ Sees **visuals**, not just speech: on-screen text, products shown, scenes, slides
- ✅ **MM:SS timestamps** in answers so you can jump to the moment
- ✅ Optional **structured JSON output** for pipelines and agents
- ✅ Works on videos **without captions**, any language, up to 150 minutes
- ✅ No API key needed — or bring your own Gemini key and pay 5× less

### Example prompts

- *"List every product, brand, or tool mentioned or shown, with timestamps and what is said about it."*
- *"Does this video make any health or financial claims? Quote each with its timestamp."*
- *"Describe every scene change and what is shown on screen."*
- *"Extract all statistics and numbers cited, with sources if given."*
- *"Is my brand X visible or mentioned anywhere in this video?"*

### Pricing

Charged **per minute of video** (minimum 5 minutes per video), plus a $0.02 actor start fee.

| Video length | No API key (bundled) | With your Gemini key |
|---|---|---|
| Short (≤5 min) | $0.75 | $0.15 |
| 10 min | $1.50 | $0.30 |
| 30 min | $4.50 | $0.90 |
| 60 min | $9.00 | $1.80 |

**Bring your own key and save 5×**: create a free key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey) and paste it into the `geminiApiKey` field (stored encrypted, used only for your run). Google token costs (a few cents per hour of video) are then billed to your Google account.

You are only charged when an answer is actually delivered — failed or timed-out runs charge nothing beyond the start fee.

### Input

| Field | Type | Description |
|---|---|---|
| `videoUrl` | string (required) | Public YouTube video URL (watch, youtu.be, or Shorts link) |
| `prompt` | string (required) | Your question or task about the video |
| `jsonOutput` | boolean | Answer as machine-readable JSON (default `false`) |
| `model` | string | `gemini-3.7-flash` (default) or `gemini-3.5-flash-lite` |
| `geminiApiKey` | secret string | Optional — your Google AI Studio key for 5× cheaper runs |

### Output

One dataset item per run:

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=…",
  "videoTitle": "…",
  "durationSeconds": 754,
  "minutesCharged": 13,
  "prompt": "List every product mentioned…",
  "answer": "1. **Acme Widget** (02:14) — the host calls it…",
  "answerJson": null,
  "answerUrl": "https://api.apify.com/v2/key-value-stores/…/records/answer-….md",
  "status": "completed"
}
```

### Use it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/andok~youtube-video-analyzer/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrl": "https://www.youtube.com/watch?v=…", "prompt": "Summarize every claim made about pricing."}'
```

### FAQ

**How is this different from transcript Q\&A tools?** Those only see caption text. This actor has Gemini watch the actual video — it catches products shown silently, on-screen text, demos, and scenes no transcript contains.

**What videos are supported?** Public, finished YouTube videos up to 120 minutes (150 minutes with your own key). Private, unlisted, and live videos are not supported.

**What if the run fails?** You are never charged per-minute fees for a failed or undelivered answer.

# Actor input Schema

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

Public YouTube video to analyze (youtube.com/watch, youtu.be, or Shorts link). Private and unlisted videos are not supported.

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

Any question or task about the video. The AI watches the full video — audio and visuals — before answering, and cites MM:SS timestamps.

## `jsonOutput` (type: `boolean`):

Ask the AI to answer as machine-readable JSON (parsed into the answerJson field) instead of markdown.

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

Bundled-key runs allow gemini-3.7-flash and gemini-3.5-flash-lite. The other models require your own geminiApiKey.

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

Bring your own Google AI Studio key (aistudio.google.com/apikey) and pay only $0.03 per video minute instead of $0.15; Google token costs are then billed to your Google account. Leave empty to use the bundled key.

## Actor input object example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "prompt": "List every product, brand, or tool mentioned or shown in this video, with the timestamp and what is said about it.",
  "jsonOutput": false,
  "model": "gemini-3.7-flash"
}
```

# Actor output Schema

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

No description

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

No description

## `files` (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",
    "prompt": "List every product, brand, or tool mentioned or shown in this video, with the timestamp and what is said about it."
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/youtube-video-analyzer").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",
    "prompt": "List every product, brand, or tool mentioned or shown in this video, with the timestamp and what is said about it.",
}

# Run the Actor and wait for it to finish
run = client.actor("andok/youtube-video-analyzer").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",
  "prompt": "List every product, brand, or tool mentioned or shown in this video, with the timestamp and what is said about it."
}' |
apify call andok/youtube-video-analyzer --silent --output-dataset

```

## MCP server setup

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

```

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/5gC4m2VnWR9DIkF3E/builds/wFiYFfc8jZjp1DWnV/openapi.json
