Skip to main content
POST
Extract structured data from online video
Extract structured data from an online video’s transcript using a custom schema you define.

Overview

The extraction endpoint lets you pull structured, typed data from any video transcript by providing a JSON schema describing the fields you need. This is ideal for building automated pipelines that need consistent, machine-readable output from video content.

How It Works

  1. Provide a video_url and a schema defining the fields to extract
  2. VidNavigator fetches the platform transcript when available
  3. For supported non-YouTube sources, it can auto-transcribe audio when no transcript exists
  4. VidNavigator runs AI extraction against your schema
  5. You receive structured JSON matching your schema definition, plus video_info

Schema Rules

  • Each field must have type and description
  • Supported types: String, Number, Boolean, Integer, Object, Array, Enum
  • Maximum 10 root-level fields
  • Maximum 3 nesting levels
You can also send the request body as YAML by setting Content-Type to application/x-yaml or text/yaml.

Automatic Transcription

The transcribe parameter controls whether VidNavigator should automatically fall back to speech-to-text when a transcript is not available.
  • transcribe=true by default
  • applies to non-YouTube videos only
  • useful for platforms like Instagram, TikTok, Facebook, X, and similar sources
  • YouTube extraction relies on platform captions and does not support speech-to-text fallback through this endpoint
If you set transcribe=false, the request will fail when no transcript is available instead of triggering speech-to-text processing.

Example Usage

Basic Extraction

With Extraction Guidance

Use what_to_extract to provide additional context to the AI about what to focus on:
cURL

Disable Auto-Transcription

Use transcribe=false when you want extraction to run only if a platform transcript already exists:
cURL

Response Example

The usage field is only included when include_usage=true in the request. video_info is included in the response metadata.

Billing

  • AI extraction consumes analysis_request units in blocks of 15,000 total tokens
  • Formula: ceil(total_tokens / 15000)
  • Examples:
    • 14,000 tokens -> 1 analysis_request unit
    • 17,000 tokens -> 2 analysis_request units
    • 31,000 tokens -> 3 analysis_request units
  • If transcribe=true triggers speech-to-text fallback, speech-to-text is charged separately as transcription_hour usage based on video/audio duration
  • Failed requests are not charged
  • Set include_usage: true to receive a usage block with the per-charge breakdown (the analysis_request entry carries a nested tokens object)

Use Cases

Data Pipelines

Build automated pipelines that extract consistent structured data from video content at scale

Content Cataloging

Automatically tag and categorize videos with custom taxonomies

Market Research

Extract product mentions, sentiment, and competitive insights from video reviews

Compliance Monitoring

Pull specific compliance-relevant data points from training or policy videos

Authorizations

X-API-Key
string
header
required

API key authentication. Include your VidNavigator API key in the X-API-Key header.

Body

video_url
string<uri>
required

URL of the video to extract data from

Example:

"https://youtube.com/watch?v=dQw4w9WgXcQ"

schema
object
required

Custom extraction schema defining the fields to extract. Max 10 root-level fields, max 3 nesting levels. Each field must have type and description.

Example:
what_to_extract
string

Optional guidance for what to extract from the transcript

Example:

"Extract the main topics and any product names mentioned"

transcribe
boolean
default:true

When true, automatically transcribes the video audio if no platform transcript is available. Applies to non-YouTube videos only (Instagram, TikTok, Facebook, X, etc.). Uses speech-to-text credits based on video duration.

include_usage
boolean
default:false

When true, includes token usage statistics in the response

Response

Data extracted successfully

status
enum<string>
Available options:
success
data
object

Extracted data matching the provided schema. The shape of this object mirrors the input schema fields.

video_info
object

Video metadata (title, channel, duration, views, etc.). Only present for /extract/video requests.

file_info
object

File metadata (name, size, type, duration, etc.). Only present for /extract/file requests.

usage
object

Per-call billing + LLM token usage. Only present when include_usage=true. For /extract/*, the block carries the credit-charge fields (charges, total_credits, credits_remaining_after, waived) AND the LLM token fields (prompt_tokens, completion_tokens, total_tokens) in a single object.