Quickstart: extract structured data from video
Extract structured data from video with one POST, then poll the job and read typed rows. Copy-paste examples in Node, Python and cURL.
Before you start
You need a key from the dashboard and a video whose captions are public. New accounts start with 3,000 credits. A video costs 10 credits per started minute, so that covers about 300 minutes of video, or 23 runs of the 13-minute example below.
no_captions and costs nothing.1. Submit a video
A schema is a list of columns, each with a name and a plain-language description. The description is the instruction, so write it the way you would brief a person.
Request body
name, a type and, to steer the extraction, a description. A type ending in [], such as string[], holds a list of values.false.403 plan_limit.2. Read the job
Extraction is asynchronous, so the submit call answered 202 Accepted with an id rather than rows. A single video usually settles in under a minute. Poll every eight seconds or so. Every call counts against your plan’s per-minute limit, which is 10 on Free and includes the submit, and a 429 tells you how long to wait in Retry-After. On a paid plan you can pass a webhook_url and skip polling entirely.
Each video’s rows stays null until every video in the job has settled, so polling is free and destroys nothing.
3. Handle the four outcomes
A video in a job settles as done or failed, and these are the outcomes you will meet most. The rest of the failure codes are on error codes. A failed HTTP call is a different thing: retry that with the same idempotency key.
doneRows are ready and charged. Fetch once and store.
no_captionsNothing to read. Not charged, and retrying will not help.
captions_fetch_failedThe caption fetch failed upstream. Not charged, and worth resubmitting.
insufficient_creditsOnce the video's length was known, the balance could not pay for it. Top up or raise the hard cap, then resubmit.