API reference/Submit a job

POST /v1

Submit an extraction job with POST /v1: request fields for 1–200 videos, an inline or saved schema, an optional webhook, the response and every error.

Request

One call submits anything from a single video to two hundred. videos is always a list, so growing from one to many changes the length of an array rather than the endpoint you call.

Field
Type
Required
Description
videosstring[]yesOne to 200 entries, each a full URL or a bare video ID. Over 200 is refused with batch_too_large and nothing is queued.
schemaarrayyesOne entry per column. Each needs a name and may set a type — one of verbatim-string, string, number, integer, boolean, date or enum (which also takes options). A type ending in [], such as string[], holds a list of values — not on the first column, and not on an enum. A description is optional and steers the extraction; without one the column name is used. Without a type, the first column is verbatim-string and the rest are string. Up to 12 columns, and the same schema runs against every video in the call. The older object form, { columns, multiple, max_rows }, is still accepted.
schema.templateobjectnoWritten as schema: { template, descriptions }: a typed JSON template in place of the column list, with a descriptions object giving one description per field. Nested objects and nested lists are refused. See /docs/guides/writing-a-schema.
multiplebooleannoDefaults to false. True returns an array of rows per video.
max_rowsintegernoWith multiple, keeps at most this many rows per video and drops the rest. 1 to 500.
schema_idstringnoA saved schema, instead of an inline one. Optionally with schema_version; the latest is used otherwise.
webhook_urlstringnoHTTPS endpoint told as each video and then the whole job settles, so you need not poll. Paid plans only. The URL is registered as a webhook endpoint on first use — see webhook payloads.

Send an Idempotency-Key header to make a retry of this call safe.

Response

202 · accepted
{
"job_id": "8f2c1e40-91a3-4b7e",
"status": "queued",
"videos": 2,
"items": [
{
"url": "https://youtu.be/dQ8x2Kp",
"video_id": "dQ8x2Kp",
"status": "queued"
},
{
"url": "https://youtu.be/kJQP7kiw5Fk",
"video_id": "kJQP7kiw5Fk",
"status": "queued"
}
]
}

Extraction runs on a queue, so this answers 202 Accepted with an id rather than with rows. videos is how many were queued and items lists them. Read the job to collect the rows, or register a webhook_url and be told when there is something to collect.

Errors

400 invalid_request for a malformed body or a schema that fails validation, and 400 batch_too_large for more than 200 videos, with the message 200 video limit per batch exceeded. 401 for a bad key. 402 insufficient_credits when the workspace is out of credits. 403 plan_limit for a webhook_url on Free, and 403 forbidden for a closed workspace. 404 schema_not_found for an unknown schema_id. 409 for an Idempotency-Key reused with a different body. 429 over the per-minute limit. The full list is on error codes.

NOTE
A video with no captions is not an error here. The call succeeds, and that video fails later with no_captions — costing nothing, while the rest of the job carries on.
Was this page useful?Tell us what was missing