Skip to main content
This endpoint powers Supadata’s AI video analysis API — use AI to turn any supported video into structured JSON matching your own prompt or schema.

Quick Start

Request

Response (HTTP 202)

The extract endpoint always returns a job ID for asynchronous processing. Use the job ID to poll for results.

Job Result

Specification

Endpoint

POST https://api.supadata.ai/v1/extract Each request requires an x-api-key header with your API key available after signing up. Get your API key here.

Request Body

At least one of prompt or schema must be provided. You can also provide both for maximum control over the output.
The /extract endpoint uses AI to analyze video content (what is seen and heard in the video). It does not retrieve transcripts, titles, descriptions, or platform metrics. For those, use the dedicated Transcript or Metadata endpoints.

Schema

The schema parameter accepts a JSON Schema object that defines the expected structure of the extracted data. This is useful for building pipelines that need consistent, predictable output formats.

How it works

  • Prompt only: When only prompt is provided, the AI automatically generates a JSON Schema based on the prompt. The generated schema is returned in the schema field of the response, so you can reuse it for future requests to get consistent outputs.
    With prompt-only mode, the response structure (key names, nesting, and types) may vary between calls since the AI generates the schema dynamically. To ensure a consistent output format across requests, provide an explicit schema.
  • Schema only: When only schema is provided, the AI extracts data structured exactly according to the schema.
  • Both prompt and schema: The schema defines the output structure, while the prompt guides what content to extract. This gives you maximum control over the extraction.

Example with schema

Start with just a prompt to let the AI generate a schema, then reuse the returned schema in subsequent requests for consistent outputs across multiple videos.

Schema Examples

Copy any of these schemas and use them directly in your requests.
Extract cooking recipes with ingredients, steps and nutritional info.
Extract timestamped chapters and sections from a video.
Extract main points, takeaways and action items from educational or business content.
Extract workout routines with exercises, sets, reps and rest periods.
Extract step-by-step repair or DIY instructions from tutorial videos.
Extract practical tips and life hacks from advice videos.
Extract structured product review data from review videos.

Response Format

The API always returns HTTP 202 with a job ID for asynchronous processing.

Getting Job Results

Poll for results using the job ID endpoint:

Response

Job Status Values

Poll the job status endpoint until the status is either “completed” or “failed”. The data field will contain the extracted data when status is “completed”, or the error field will contain error details when status is “failed”.

Polling Guidelines

  • Polling interval: We recommend polling every 1 second
  • Job expiry: Job results are available for 1 hour after completion. After that, the endpoint will return a 404 Not Found error. Make sure to retrieve and store results promptly after the job completes.

Error Codes

The API returns HTTP status codes and error codes. See this page for more details.

Supported URL Formats

url parameter supports the following:
  • YouTube video URL, e.g. https://www.youtube.com/watch?v=1234567890
  • TikTok video URL, e.g. https://www.tiktok.com/@username/video/1234567890
  • X (Twitter) video URL, e.g. https://x.com/username/status/1234567890
  • Instagram video URL, e.g. https://instagram.com/reel/1234567890/
  • Facebook video URL, e.g.https://www.facebook.com/reel/682865820350105/
  • Publicly accessible file URL, e.g. https://bucket.s3.eu-north-1.amazonaws.com/file.mp4

Video Accessibility

Only publicly accessible videos can be processed. Videos that require authentication or have restricted access will return errors:
  • Login-required videos - Videos that require signing in
  • Membership/subscriber-only videos - Content behind paywalls
  • Private videos - Videos not publicly listed
  • Age-restricted videos - Content with age verification requirements
  • Heavily geoblocked videos - Videos available only in specific countries
To verify if a video is accessible, try opening it in a browser incognito/private window without signing in. If you can watch the video, it can be processed.
If the video is not accessible, the API will return:
  • 404 Not Found - Video does not exist or is private
  • 403 Forbidden - Video requires authentication or is restricted

File Support

When url is a file URL, the endpoint supports the following file formats:
  • MP4
  • WEBM
  • MP3
  • FLAC
  • MPEG
  • M4A
  • OGG
  • WAV
The maximum file size is 200 MB. Videos longer than 55 minutes are not supported.

Latency

Extraction always involves AI processing and returns a job ID (HTTP 202) for asynchronous handling. Processing time is correlated with video duration - the longer the video, the longer the extraction takes.
Consider this latency when implementing time-outs and UX in your project. Always implement the asynchronous polling pattern to retrieve results.

Pricing

  • 1 extraction minute = 5 credits (minimum 5 credits per request)
No credits are charged for checking extraction job status.