# AI Video Analyzer: Video to Text, Transcript & OCR (`invideoiq/ai-video-analysis`) Actor

Everything a video says, shows and writes, in one Actor. Get the transcript, the scenes, the text on screen (OCR) and an AI analysis or your own JSON fields. YouTube, TikTok, Instagram, X, Facebook, Snapchat, Vimeo, Dailymotion, Loom and Rumble.

- **URL**: https://apify.com/invideoiq/ai-video-analysis.md
- **Developed by:** [InVideoIQ](https://apify.com/invideoiq) (community)
- **Categories:** AI, Videos, Social media
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $17.00 / 1,000 speech to text, per minute

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/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

### 🎬 What is AI Video Analyzer?

#### Everything a video says, shows and writes. In one Actor.

Paste a video link. **AI Video Analyzer** returns its **transcript**, its **scenes**, the **text on screen (OCR)** and an **AI analysis**: ready-made insights or **your own fields as JSON**. Tick what you want and pay only for that.

**🌍 10 platforms: YouTube · TikTok · Instagram · X (Twitter) · Facebook · Snapchat · Vimeo · Dailymotion · Loom · Rumble**

**💰 From $0.01 per video · ⚡ Under a minute for a short video · 🗣️ 99+ languages · 🔇 Works without speech · 🔓 No login**

**You send:**

```json
{ "video_urls": ["https://www.youtube.com/shorts/WhNzhnXO16c"], "ai_analysis": "insights" }
```

**You get** (shortened):

```json
{
  "transcript_text": "We were certainly hooked on this mission, but when we came home, we were shocked at the...",
  "scenes": [{ "start": 0.0, "end": 15.0, "description": "Reid Wiseman, wearing a blue NASA flight suit, speaks to the camera." }],
  "ocr_text": "NASA, 100 DAYS, REID WISEMAN\nNASA, CHRISTINA H. KOCH",
  "insights": { "summary": "The Artemis II crew members reflect on their historic test flight around the Moon...", "tone": "inspirational, reflective" }
}
```

| You get | What it holds |
|---|---|
| 💬 **Transcript** | Every sentence with its time, from the captions or with speech to text |
| 🎞️ **Scenes** | Every shot with its start, its end and what it shows |
| 🔤 **OCR** | The text on screen with its time: titles, prices, promo codes, slides |
| ✨ **AI insights** | Summary, hook, key moments, products, call to action, audience, tone |
| 🧩 **Your own fields** | The data you describe, as structured JSON |
| 🎯 **Evidence** | The second of the video each AI value comes from |
| 📊 **Video info** | Title, channel, duration, views, likes, publish date, thumbnail |

***

### 🌍 Which platforms can it analyze?

**10 platforms, the same input, the same output.** Mix them in one run.

| Platform | What you can analyze |
|---|---|
| ▶️ **YouTube** | Videos and Shorts, with or without captions |
| 🎵 **TikTok** | Public videos |
| 📸 **Instagram** | Reels and video posts. In a carousel, add `?img_index=N` to the URL to pick the video |
| ✖️ **X (Twitter)** | Videos in posts: paste the URL of the post |
| 👍 **Facebook** | Public videos and Reels |
| 👻 **Snapchat** | Spotlight, stories and highlights. In a highlight, add `?img_index=N` to the URL to pick the video |
| 🎥 **Vimeo** | Public videos |
| 📺 **Dailymotion** | Public videos |
| 🖥️ **Loom** | Public recordings |
| 🟢 **Rumble** | Public videos |

***

### ⚡ How to analyze a video with AI

1. Open [AI Video Analyzer](https://apify.com/invideoiq/ai-video-analysis) and click **Try for free**. A free Apify account is enough.
2. Paste your **video links**, one per line.
3. Tick **Transcript**, **Scenes and OCR**, or both.
4. Choose an **AI analysis** if you want one: **Insights** or **Your own fields**.
5. Click **Start**, then open the **Output** tab and export to **JSON, CSV, Excel or HTML**.

***

### ☑️ What can you get from a video?

#### 💬 Video to text: the transcript

Each sentence with its time, and the whole text in `transcript_text`. You choose where it comes from:

| `transcript_source` | A video with captions | A video without captions |
|---|---|---|
| **Automatic** (default) | Its captions | Its speech is transcribed |
| **Captions only** | Its captions | No transcript, not charged |
| **Speech to text** | Its speech is transcribed | Its speech is transcribed |

Each result says which one was used. When nobody speaks, speech to text is not charged.

#### 🎞️ Scene analysis: what the video shows

Each shot with its start, its end and a description of the picture. You also get the **opening** (what the first 3 seconds show, say and write) and a **timeline** that merges picture, on-screen text and speech into one text, ready for an AI agent.

#### 🔤 Video OCR: what is written on screen

Included with the scenes, at no extra cost. The text is read from the picture itself, so you get what nobody says out loud:

- titles, hooks and captions burned into the video
- prices, promo codes, phone numbers and web addresses
- slides, charts, code and screen recordings
- logos, signs, labels and name tags

Each text comes with its time in `ocr`, and all of them as one text in `ocr_text`.

#### ✨ AI insights, and the answer to your question

Summary, hook and why it works, key moments, products and brands, commercial intent, call to action, format, audience and tone. Add a question, for example "Is a discount code shown, and which one?", and get its answer for every video.

#### 🧩 Your own fields, as JSON

Describe the data you want in plain words, or give a JSON Schema. The AI reads what you ticked (the transcript, the scenes and their text, or both) and fills your fields, each with the second it comes from.

#### 📐 How to write your schema

A schema is a list of fields. Each field has a **name**, a **type** and a **description** that tells the AI what to put in it.

```json
{
  "type": "object",
  "properties": {
    "brand": { "type": "string", "description": "Brand shown or named" },
    "price": { "type": "number", "description": "Price in dollars, said or written on screen" },
    "sponsored": { "type": "boolean", "description": "True when the video says it is sponsored" },
    "mood": { "type": "string", "enum": ["funny", "serious", "emotional"], "description": "Mood of the video" },
    "pros": { "type": "array", "description": "Good points given", "items": { "type": "string", "description": "One good point" } }
  }
}
```

| Rule | Why it stops the run |
|---|---|
| Start with `"type": "object"` and list the fields under `"properties"` | Anything else is not a JSON Schema |
| Types: `string`, `number`, `integer`, `boolean`, `array`, `object` | `date`, `String` or `float` are not types |
| **One type per field**. `null` may be added: `["string", "null"]` | `["string", "number"]` is refused |
| **10 fields at most** per level | Split a longer list into several runs |
| **3 levels at most**: a list of objects is 2 levels, their fields the 3rd | Deeper levels are refused |
| An `array` says what it holds in `items`, an `object` lists its `properties` | An empty list or object is refused |
| `enum` is a list of texts or numbers | Anything else is refused |
| A `$ref` stays inside the schema, and never points to itself | Links to other files and loops are refused |

A field without a description is accepted, with a warning: the AI then only has its name.

**What happens when the schema is wrong?** It is checked **before the first video**. The run stops, **nothing is charged**, and the message names every field to correct, for example: *"price has the type 'float', which is not supported"*, *"pros is a list: say what it holds under items"*.

**No schema?** Describe what you want in `ai_instructions`, for example "The products shown, with their price". The fields are written for you, they are the same for every video of the run, and they are saved as `SCHEMA` in the key-value store so that you can use them again.

#### 🧰 One run instead of several tools

| To know | You would need | Here |
|---|---|---|
| What is said | A caption scraper, plus speech to text when there are no captions | ✅ |
| What is shown | A scene detector, plus a vision model | ✅ |
| What is written on screen | An OCR tool, frame by frame | ✅ |
| What it means for you | A prompt, a parser and a schema validator | ✅ |
| When it happens | Aligning all of the above | ✅ Same clock everywhere |
| On another platform | Another tool | ✅ 10 platforms |

***

### 🧩 Templates to copy

Paste one into the **JSON** tab of the input, and change the links.

#### UGC and ad breakdown

```json
{
  "video_urls": ["https://www.tiktok.com/@space_minds/video/7662062584748723459"],
  "ai_analysis": "own_fields",
  "schema": {
    "type": "object",
    "properties": {
      "hook_line": { "type": "string", "description": "First sentence said or written on screen" },
      "problem": { "type": "string", "description": "Problem or desire the video starts from" },
      "offer": { "type": "string", "description": "What is offered, with its price or discount when given" },
      "promo_code": { "type": "string", "description": "Promo code said or written on screen" },
      "call_to_action": { "type": "string", "description": "What the viewer is asked to do" },
      "urgency": { "type": "boolean", "description": "True when the video creates urgency or scarcity" }
    }
  }
}
```

#### Products and prices

```json
{
  "video_urls": ["https://www.youtube.com/watch?v=YOUR_VIDEO"],
  "ai_analysis": "own_fields",
  "schema": {
    "type": "object",
    "properties": {
      "products": {
        "type": "array",
        "description": "Products shown or named",
        "items": {
          "type": "object",
          "properties": {
            "name": { "type": "string", "description": "Name of the product" },
            "brand": { "type": "string", "description": "Brand, when shown or named" },
            "price": { "type": "string", "description": "Price with its currency, said or written on screen" },
            "opinion": { "type": "string", "enum": ["positive", "neutral", "negative"], "description": "Opinion given about it" }
          }
        }
      }
    }
  }
}
```

#### Recipe

```json
{
  "video_urls": ["https://www.instagram.com/reel/YOUR_REEL/"],
  "ai_analysis": "own_fields",
  "schema": {
    "type": "object",
    "properties": {
      "dish": { "type": "string", "description": "Name of the dish" },
      "ingredients": { "type": "array", "description": "Ingredients with their quantity, said or written on screen", "items": { "type": "string", "description": "One ingredient" } },
      "steps": { "type": "array", "description": "Steps in order", "items": { "type": "string", "description": "One step" } },
      "total_minutes": { "type": "integer", "description": "Total time in minutes, when given" }
    }
  }
}
```

#### Interview, podcast or news clip

```json
{
  "video_urls": ["https://x.com/elonmusk/status/1857814606120436119"],
  "ai_analysis": "own_fields",
  "schema": {
    "type": "object",
    "properties": {
      "speakers": { "type": "array", "description": "People who speak, named out loud or on screen", "items": { "type": "string", "description": "Name of one speaker" } },
      "claims": {
        "type": "array",
        "description": "Main claims made",
        "items": {
          "type": "object",
          "properties": {
            "claim": { "type": "string", "description": "The claim in one sentence" },
            "said_by": { "type": "string", "description": "Who makes it" },
            "time": { "type": "number", "description": "When it is made, in seconds" }
          }
        }
      },
      "topic": { "type": "string", "description": "Main topic" }
    }
  }
}
```

***

### 💰 How much does AI video analysis cost?

**One price for every platform.** You pay for what you tick, and only when it is delivered. A video that fails is not charged.

| Apify plan | Free | Starter | Scale | Business and above |
|---|---|---|---|---|
| **Captions**, per video | $0.01 | $0.01 | $0.01 | $0.01 |
| **Speech to text**, per minute | $0.025 | $0.022 | $0.0195 | $0.017 |
| **Scenes and OCR**, per minute | $0.025 | $0.022 | $0.0195 | $0.017 |
| **AI analysis**, per video | $0.02 | $0.02 | $0.02 | $0.02 |

Minutes are started minutes: a video of 61 seconds counts 2. The AI analysis of a very long video counts once more per 15,000 tokens, about 1 hour and 15 minutes of speech.

| Example | Free plan | Business plan |
|---|---|---|
| 1 TikTok of 45 seconds with captions: transcript | $0.01 | $0.01 |
| 1 Instagram Reel of 45 seconds: transcript | $0.025 | $0.017 |
| 1 Instagram Reel of 45 seconds: transcript, scenes and OCR | $0.05 | $0.034 |
| 1 Instagram Reel of 45 seconds: everything | $0.07 | $0.054 |
| 100 TikToks under 1 minute with captions: everything | $5.50 | $4.70 |
| 1 YouTube video of 10 minutes with captions: everything | $0.28 | $0.20 |
| 1 Vimeo video of 45 minutes without captions: transcript | $1.13 | $0.77 |

**🆓 Free to try:** the free Apify plan includes $5 of usage every month, enough for about 70 short videos with everything ticked. Runs on the free plan are limited to **3 videos** (a limit of the free Apify plan, not of the Actor). Any paid Apify plan removes the limit.

Set a **Maximum cost per run** in the run options to cap your spending. When a video costs more than what is left, its result is neither returned nor charged, and the run stops. When only the AI analysis doesn't fit, you get the rest without it.

***

### 📦 Input and output

#### Input

Give video links, a dataset, or both.

| Input | Type | Description |
|-------|------|-------------|
| `video_urls` | array of strings | Public video URLs, one per line |
| `transcript` | boolean | Get what is said. On by default |
| `transcript_source` | string | `auto` (default): captions, otherwise speech to text. `captions`: captions only. `speech_to_text`: always transcribed |
| `scenes` | boolean | Get what is shown and the text on screen (OCR). On by default |
| `ai_analysis` | string | `none` (default), `insights` or `own_fields` |
| `ai_instructions` | string | With insights, a question asked of every video. With your own fields, what to extract. It turns the AI analysis on |
| `schema` | object | Your own fields as a JSON Schema ([rules](#how-to-write-your-schema)). It turns your own fields on |
| `ai_language` | string | Language of the AI analysis, English by default |
| `dataset_id` | string | Dataset of another Actor: its video URLs are analyzed too |
| `max_dataset_videos` | integer | How many videos of the dataset are analyzed, 10 by default |

#### Output example

```json
{
  "video_url": "https://www.youtube.com/shorts/WhNzhnXO16c",
  "video_info": { "title": "Reflections from the Artemis II Crew", "channel": "NASA", "duration": 80.0, "views": 428835, "likes": 17176 },
  "transcript_source": "captions",
  "transcript_text": "We were certainly hooked on this mission, but when we came home, we were shocked at the...",
  "transcript": [{ "text": "We were certainly hooked on this mission,", "start": 0.066, "end": 1.701 }],
  "opening": {
    "shows": "Reid Wiseman, wearing a blue NASA flight suit, speaks to the camera.",
    "on_screen_text": "NASA, 100 DAYS, REID WISEMAN",
    "says": "We were certainly hooked on this mission, but when we came home, we were shocked at the"
  },
  "scenes": [
    { "start": 0.0, "end": 15.0, "description": "Reid Wiseman, wearing a blue NASA flight suit, speaks to the camera.", "on_screen_text": "NASA, 100 DAYS, REID WISEMAN" },
    { "start": 15.0, "end": 38.0, "description": "Christina H. Koch, wearing a blue NASA flight suit, speaks to the camera.", "on_screen_text": "NASA, CHRISTINA H. KOCH" }
  ],
  "ocr": [
    { "start": 0.0, "end": 15.0, "text": "NASA, 100 DAYS, REID WISEMAN" },
    { "start": 15.0, "end": 38.0, "text": "NASA, CHRISTINA H. KOCH" }
  ],
  "ocr_text": "NASA, 100 DAYS, REID WISEMAN\nNASA, CHRISTINA H. KOCH",
  "timeline_text": "[0:00 - 0:15]\nShows: Reid Wiseman, wearing a blue NASA flight suit, speaks to the camera.\nOn screen: NASA, 100 DAYS, REID WISEMAN\nSays: We were certainly hooked on this mission, but when we came home...",
  "stats": { "scene_count": 5, "average_scene_seconds": 16.0, "word_count": 269, "words_per_minute": 202, "like_rate": 0.0401 },
  "insights": {
    "summary": "The Artemis II crew members reflect on their historic test flight around the Moon, expressing gratitude for global support and describing the emotional impact of their mission.",
    "hook": { "what": "Reid Wiseman in a blue NASA flight suit with NASA logo and 100 DAYS badge appears on screen", "type": "visual surprise", "why_it_works": "Immediate iconic astronaut imagery captures viewer interest" },
    "key_moments": [{ "time": 16.0, "what": "Christina H. Koch expresses emotional impact and gratitude to the public", "why_it_matters": "Highlights personal connection and emotional resonance with audiences" }],
    "promotion": "organic",
    "call_to_action": null,
    "format": "press conference",
    "audience": "general public and space enthusiasts",
    "tone": "inspirational, reflective"
  },
  "evidence": { "hook": [{ "start": 0.0, "end": 15.0, "in": "picture" }, { "start": 0.07, "end": 10.38, "in": "speech" }] },
  "frames_analyzed": 40,
  "charged": { "captions": 1, "scene-minute": 2, "ai-analysis": 1 }
}
```

This run costs **$0.08** on the free plan: $0.01 for the captions, $0.05 for the scenes and OCR, $0.02 for the AI analysis. With your own fields, their values are in `extracted_data`.

#### Output fields

| Field | Description |
|-------|-------------|
| `video_url`, `video_info` | The URL you sent, and the title, description, channel, duration, views, likes, publish date, thumbnail and keywords |
| `transcript`, `transcript_text` | What is said: `text`, `start`, `end`, and the same as one text |
| `transcript_source` | `captions`, `speech_to_text`, or `null` when there is no transcript |
| `scenes` | The scenes in order: `start` and `end` in seconds, `description`, `on_screen_text` |
| `ocr`, `ocr_text` | The texts read on screen: `text`, `start`, `end`, and the same as one text, each text once |
| `opening` | What the first 3 seconds show, say and write on screen |
| `timeline_text` | Picture, on-screen text and speech as one text, scene by scene |
| `insights` | With insights: `summary`, `hook`, `key_moments`, `products`, `promotion`, `call_to_action`, `format`, `audience`, `tone`, and `answer` when you asked a question |
| `extracted_data` | With your own fields: their values, `null` when the video does not give them |
| `evidence` | For each AI value, the moments it comes from: `start`, `end`, and `in`: `picture`, `speech` or `post` |
| `stats`, `frames_analyzed` | `scene_count`, `average_scene_seconds`, `word_count`, `words_per_minute`, `like_rate`, and how many pictures were read |
| `transcript_error`, `scenes_error`, `ai_error` | Only when that part could not be made: why. It is then not charged |
| `charged` | What was counted for this video |

The results open as tables too: **Transcript** (one row per sentence), **Scenes**, **OCR**, **Insights** and **Your own fields**.

#### Analyze the results of a video scraper

No links to copy. Example: what do the best TikToks about skincare have in common?

1. Run a scraper, for example [TikTok Search Scraper](https://apify.com/invideoiq/tiktok-keyword-search-scraper) with the keyword `skincare`.
2. In AI Video Analyzer, open **Videos from another Actor** and pick the dataset of that run. With the API, send its ID.
3. Choose how many videos to analyze, then click **Start**.

```json
{ "dataset_id": "YOUR_DATASET_ID", "max_dataset_videos": 20, "ai_analysis": "insights" }
```

The links of the videos are found for you, in the order of the dataset. It works with [TikTok Search Scraper](https://apify.com/invideoiq/tiktok-keyword-search-scraper), [TikTok Profile Scraper](https://apify.com/invideoiq/tiktok-profile-scraper) and most Instagram, YouTube, Facebook and X scrapers. Items without a video link are skipped.

***

### 🔌 AI video analysis API

#### Python

```python
import requests

videos = requests.post(
    "https://api.apify.com/v2/acts/invideoiq~ai-video-analysis/run-sync-get-dataset-items",
    params={"token": "YOUR_APIFY_TOKEN"},
    json={"video_urls": ["https://www.youtube.com/shorts/WhNzhnXO16c"], "ai_analysis": "insights"},
    timeout=300,
).json()

print(videos[0]["insights"]["summary"])
print(videos[0]["ocr_text"])
```

#### JavaScript

```javascript
const response = await fetch(
  'https://api.apify.com/v2/acts/invideoiq~ai-video-analysis/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ video_urls: ['https://www.youtube.com/shorts/WhNzhnXO16c'], ai_analysis: 'insights' }),
  },
);
const videos = await response.json();
console.log(videos[0].transcript_text);
```

The synchronous endpoint waits up to 5 minutes. For long videos or large batches, start a run and read its dataset when it finishes. More examples, with cURL and the Apify clients, are in the [API tab](https://apify.com/invideoiq/ai-video-analysis/api).

#### AI agents (MCP)

Add `https://mcp.apify.com?tools=invideoiq/ai-video-analysis` to any MCP client, and your agent can watch a video from its link. `timeline_text` holds the whole video as one text.

#### Integrations

With the Apify platform you also get **scheduling**, **webhooks**, **run monitoring**, and integrations with **Google Sheets, Slack, Zapier, Make and n8n**.

***

### 👥 Who uses AI Video Analyzer, and what for?

- 📣 **UGC and performance marketers**: swipe files with the hook, the shots and the on-screen text of winning ads
- 🏷️ **Brand teams**: find when a product or a logo is shown, even when it is never named
- 🎨 **Creators and agencies**: turn the best videos of a niche into briefs and scripts
- 🤖 **AI and data teams**: give agents, RAG pipelines and datasets what videos show, not only what they say
- 📰 **Media monitoring and fact-checking teams**: document what a clip shows, with the exact time
- 🎓 **E-learning and accessibility teams**: OCR the text of slides, draft audio descriptions
- 🛒 **E-commerce teams**: collect prices, promo codes and claims from hundreds of product videos
- 🔎 **Video search and moderation teams**: index scenes, and read what a video shows before a human looks at it

***

### ❓ FAQ

#### Can AI watch a video?

Yes. AI Video Analyzer reads the picture and the sound of a video from its link. It returns what each scene shows, the text on screen and what is said, with the time of each moment. You don't need to download or upload the video.

#### How do I analyze a YouTube video with AI?

Paste its link and click **Start**. Videos and Shorts work, with or without captions. Choose **Insights** for a summary, the key moments and the answer to your question.

#### How do I analyze a TikTok video with AI?

Copy the link of the TikTok, paste it into `video_urls` and click **Start**. In less than a minute you get its scenes, on-screen text and transcript. Choose **Insights** to get its hook, key moments and products too.

#### How do I analyze an Instagram Reel?

Paste the link of the Reel. No Instagram login is needed. For a carousel, add `?img_index=N` to the link to pick the video.

#### How do I convert a video to text?

Paste its link and keep **Transcript** ticked. The captions are used when the video has some. Otherwise its speech is transcribed, in 99+ languages. Untick **Scenes and OCR** to pay for the transcript only.

#### Captions or speech to text: which one should I choose?

Keep **Automatic**: it takes the captions, which cost less, and transcribes the speech only when there are none. Choose **Speech to text** when the captions are missing words or badly timed. Choose **Captions only** to never pay for a transcription.

#### Can AI do OCR on a video?

Yes. Tick **Scenes and OCR**: the text readable on screen comes back in `ocr` with its time, and in `ocr_text` as one text. Titles, burned-in captions, prices, slides and signs are read from the picture, even when nobody says them.

#### How do I extract the text shown in a TikTok or a Reel?

Paste its link and keep **Scenes and OCR** ticked. Untick **Transcript** when you only want the text on screen. The **OCR** table of the results gives one row per text.

#### What is the difference between OCR and a transcript?

A transcript is what is **said**. OCR is what is **written on screen**. Many short videos say one thing and write another, so most users tick both.

#### How do I extract structured data from a video?

Choose **Your own fields**, then describe them in plain words or give a JSON Schema. You get one JSON object per video, with the moment each value is taken from.

#### Can I ask a question about a video?

Yes. Write it in `ai_instructions`, for example "Which tools are used?". It is asked of every video of the run, and each answer comes with the moments it is taken from.

#### Can it analyze a video without speech?

Yes. You get its scenes and on-screen text. `transcript` is empty, `transcript_error` says why, and speech to text is not charged.

#### What are the limits?

- **Length**: up to 2 hours per video for the scenes. YouTube has no such limit.
- **Public videos only**: private, login-protected or geo-restricted videos cannot be analyzed.
- **Live streams** and clips of a few seconds may have no picture to read. The other parts are still returned.
- **OCR**: very small text, or text shown for a fraction of a second, can be missed. Captions that change word by word are read in part: take them from the transcript.
- **The AI analysis is written by AI**: check the important values with their evidence.

#### Which InVideoIQ Actor should I use?

| You want | Use |
|----------|-----|
| What a video **says, shows and writes**, in one run | **AI Video Analyzer** |
| Only **existing captions**, with rich metadata | [Video Transcript Scraper](https://apify.com/invideoiq/video-transcript-scraper) |
| Only **speech to text**, one price per 10 minutes | [Video Transcriber](https://apify.com/invideoiq/video-transcriber) |
| What a **tweet** really claims | [Tweet Claim Analyzer](https://apify.com/invideoiq/tweet-claim-analyzer) |

#### What happens if a video fails?

The run goes on with the others. The videos that failed are listed with the reason in the `FAILED_VIDEOS` record of the run's key-value store, and they are not charged.

#### Is it legal to analyze videos?

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only read what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not process personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read the Apify blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### 🔗 Related Actors

- [Video Transcriber](https://apify.com/invideoiq/video-transcriber): speech to text for YouTube, TikTok, Instagram, X, Facebook, Snapchat and more. From $0.035 per video.
- [Video Transcript Scraper](https://apify.com/invideoiq/video-transcript-scraper): existing captions plus rich metadata. $10 per 1,000 results.
- [Tweet Claim Analyzer](https://apify.com/invideoiq/tweet-claim-analyzer): what a tweet really claims, including its quoted tweet, video and images. $0.02 per tweet.
- [TikTok Search Scraper](https://apify.com/invideoiq/tiktok-keyword-search-scraper): find TikTok videos by keyword, then analyze them here. $0.40 per 1,000 videos.
- [TikTok Profile Scraper](https://apify.com/invideoiq/tiktok-profile-scraper): every video from any public TikTok creator. $0.20 per 1,000 videos.

***

### 💬 Support

Found a bug or need a new field? [Open an issue](https://apify.com/invideoiq/ai-video-analysis/issues/open) and we'll get back to you quickly.

Need a custom workflow or a higher volume? Reach out through the Issues tab, we're happy to help.

# Actor input Schema

## `video_urls` (type: `array`):

Public video URLs, one per line: YouTube (videos and Shorts), TikTok, Instagram (Reels and posts), X (Twitter), Facebook, Snapchat (Spotlight, stories and highlights), Vimeo, Dailymotion, Loom, Rumble. For an Instagram carousel or a Snapchat highlight, add ?img_index=N to the URL to pick the video. Free Apify plan: runs analyze at most 3 videos. This limit comes from the free Apify plan, not from the Actor: any paid Apify plan removes it.

## `transcript` (type: `boolean`):

The words of the video, with the time of each sentence.

## `transcript_source` (type: `string`):

Automatic: the captions of the video when it has some (price per video), otherwise its speech is transcribed (price per minute). Captions only: a video without captions gets no transcript. Speech to text: always transcribed, even when there are captions, which is often more accurate. Each result says which one was used in transcript_source. Used only when the transcript is ticked.

## `scenes` (type: `boolean`):

Each shot with its start, its end and what it shows, plus OCR: the text on screen with its time (titles, prices, captions burned into the picture, slides, signs). Works without speech too. Price per minute, OCR included.

## `ai_analysis` (type: `string`):

Reads what is ticked above: the transcript, the scenes and their on-screen text, or both. Insights: summary, hook, key moments, products, call to action, audience and the answer to your question. Your own fields: the data you describe below, as structured JSON. Each value comes with the moment of the video it is taken from.

## `ai_instructions` (type: `string`):

With insights: a question asked of every video, for example: Is a discount code shown, and which one? With your own fields: what to extract, in plain words. The fields are then written for you when the schema below is left as it is, and saved as SCHEMA in the key-value store of the run. <a href='https://apify.com/invideoiq/ai-video-analysis#templates-to-copy' target='_blank' rel='noopener'>Templates to copy</a>

## `schema` (type: `object`):

Used when the AI analysis is set to Your own fields. The example is yours to change. <a href='https://apify.com/invideoiq/ai-video-analysis#how-to-write-your-schema' target='_blank' rel='noopener'>How to write your schema: rules and examples</a>. In short: at most 10 fields per level and 3 levels, one type per field (string, number, integer, boolean, array, object), and a description for each. It is checked before the first video: a schema with a mistake stops the run, says which field is wrong, and costs nothing. To have the fields written for you, describe them above instead.

## `ai_language` (type: `string`):

The language the AI analysis is written in. The transcript and the on-screen text stay in the language of the video.

## `dataset_id` (type: `string`):

Pick the dataset of a scraper run: the links of its videos are found and analyzed, in order, after the video URLs above. Example: search a keyword with TikTok Search Scraper, then pick its results here. Works with most TikTok, Instagram, YouTube, Facebook and X scrapers. <a href='https://apify.com/invideoiq/ai-video-analysis#analyze-the-results-of-a-video-scraper' target='_blank' rel='noopener'>Step by step</a>

## `max_dataset_videos` (type: `integer`):

How many videos of the dataset are analyzed, from the first one.

## Actor input object example

```json
{
  "video_urls": [
    "https://www.youtube.com/watch?v=4czjS9h4Fpg",
    "https://www.instagram.com/whitehouse/reel/DaV4I-BRqur/"
  ],
  "transcript": true,
  "transcript_source": "auto",
  "scenes": true,
  "ai_analysis": "none",
  "ai_instructions": "The products shown, with their price and the moment they appear",
  "schema": {
    "type": "object",
    "properties": {
      "product_name": {
        "type": "string",
        "description": "Name of the product shown"
      },
      "price": {
        "type": "number",
        "description": "Price shown or said, in dollars"
      },
      "claims": {
        "type": "array",
        "description": "What the video says about the product",
        "items": {
          "type": "string",
          "description": "One claim"
        }
      }
    }
  },
  "ai_language": "Spanish",
  "max_dataset_videos": 10
}
```

# Actor output Schema

## `results` (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 = {
    "video_urls": [
        "https://www.youtube.com/shorts/WhNzhnXO16c"
    ],
    "schema": {
        "type": "object",
        "properties": {
            "product_name": {
                "type": "string",
                "description": "Name of the product shown"
            },
            "price": {
                "type": "number",
                "description": "Price shown or said, in dollars"
            },
            "claims": {
                "type": "array",
                "description": "What the video says about the product",
                "items": {
                    "type": "string",
                    "description": "One claim"
                }
            }
        }
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("invideoiq/ai-video-analysis").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 = {
    "video_urls": ["https://www.youtube.com/shorts/WhNzhnXO16c"],
    "schema": {
        "type": "object",
        "properties": {
            "product_name": {
                "type": "string",
                "description": "Name of the product shown",
            },
            "price": {
                "type": "number",
                "description": "Price shown or said, in dollars",
            },
            "claims": {
                "type": "array",
                "description": "What the video says about the product",
                "items": {
                    "type": "string",
                    "description": "One claim",
                },
            },
        },
    },
}

# Run the Actor and wait for it to finish
run = client.actor("invideoiq/ai-video-analysis").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 '{
  "video_urls": [
    "https://www.youtube.com/shorts/WhNzhnXO16c"
  ],
  "schema": {
    "type": "object",
    "properties": {
      "product_name": {
        "type": "string",
        "description": "Name of the product shown"
      },
      "price": {
        "type": "number",
        "description": "Price shown or said, in dollars"
      },
      "claims": {
        "type": "array",
        "description": "What the video says about the product",
        "items": {
          "type": "string",
          "description": "One claim"
        }
      }
    }
  }
}' |
apify call invideoiq/ai-video-analysis --silent --output-dataset

```

## MCP server setup

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

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/Ymr6mTqTZWXcq66k1/builds/7Uwh9FKWdOc3OvDm9/openapi.json
