await.
npm package
vidnavigator 2.1.0 on the npm registry.GitHub repository
Source code, issues and changelog.
This page documents version 2.1.0. Coming from 1.x? See Upgrading from 1.x.
Installation
fetch). The only runtime dependencies are axios and form-data. Full TypeScript types ship with the package.
Initialization
Get your API key in the Developer Dashboard.Configuration
axiosConfig.timeout limits each HTTP request. How long the SDK waits for a background job is set per call with timeoutMs (see Background jobs).
Supported platforms
Transcript = fast extraction of the platform’s own captions. Transcribe = speech-to-text by AI models, for when captions are unavailable.
Transcripts
Captions from any platform
getTranscript auto-detects the platform from the URL. Instagram has no captions, so use transcribe for it.
video_url, language, metadata_only, fallback_to_metadata, transcript_text (full transcript as one string), include_usage.
getYouTubeTranscript() still works but is deprecated: it forwards to getTranscript() and logs a warning.Speech-to-text
vn.transcribe() runs speech-to-text as a background job and resolves with the result, whatever the video length.
getTranscript (captions, fast) or transcribe (speech-to-text).
Instagram carousels
Select one video by index, or transcribe every video in the post:AI analysis
Get a summary, the people, places and key subjects, and a direct answer to a natural-language question.query is optional.
Structured extraction
Define a schema and get back structured data extracted from any video or file transcript. See the Data Extraction guide for schema design tips.From an online video
extractVideoData() runs as a background job, so videos of any length work. With transcribe: true (the default), a video without captions is transcribed first. The result has the extracted data, the video’s video_info (a VideoInfo), and usage when requested. vn.extractVideo() and job.result() on vn.extractVideo.submit() return the same shape.
video_info on extraction results requires 2.1.0. In 2.0.0 it is always undefined.From an uploaded file
From a schema file
For larger schemas, pass a JSON or YAML file. It is sent as multipart form-data.type and description. Supported types are String, Number, Boolean, Integer, Object, Array and Enum. Array fields need items, Object fields list sub-fields in properties (up to 10), and Enum fields list allowed values in enum. At most 10 top-level fields and 3 levels of nesting. An invalid schema is rejected with a BadRequestError before anything runs.
Tweet claim analysis
Pass a tweet ID (not the full URL). Attached media of any length is transcribed, so this also runs as a background job.Background jobs
Transcription, structured extraction, tweet analysis and TikTok scraping run as background jobs on VidNavigator. The SDK always uses the async endpoints, so video length is never a problem. Each operation comes in two shapes:The 1.x methods
transcribeVideo(), extractVideoData() and getTweetStatement() still work with the same arguments. They are now wrappers around the operations above.Start many at once
.submit() returns a Job right away. Each job has a task_id, status() (checks once), result() (waits, then returns the result) and wait() (waits, then returns the final task without throwing on failure):
Come back later
A job keeps running even if your process stops waiting, and its result stays available for 1 hour after it finishes. Keep thetask_id and reattach with .resume():
Timeouts
The one-liners andresult() wait up to 30 minutes by default, then throw a TaskTimeoutError that carries the task_id. The job is not lost:
Waiting options
Waiting options
Pass these to the one-liner or to
result() / wait():Job members
Job members
Result types
Result types
transcribe → same shape as transcribeVideo(); extractVideo → { data, video_info, usage? }; tweetStatement → TweetStatement; tiktokProfile / tiktokSearch → the completed task with every page of videos / results.Failures
When a job fails,result() and the one-liners throw the same error class as any other API error (for example NotFoundError for a missing video), built from the job’s error details and carrying the task_id. wait() returns the failed task instead, with task.error set.
When a job can’t start, submitting throws right away and no job is created:
InsufficientCreditsError(402): not enough credits. A job can also run out of credits while it runs;result()then throws the same error, so handle it in both places.TooManyActiveJobsError(429): too many of your jobs are already running. Wait for some to finish and retry.
Large batches
Your account can only run a limited number of jobs at once, soPromise.all over hundreds of URLs will hit TooManyActiveJobsError. Keep a fixed number in flight:
Progress and restarts
task_id as soon as you submit, so a crash or deploy doesn’t lose the work:
Webhooks
Passwebhook_url to any job operation (transcription, extraction, tweet analysis, TikTok profile and search), or set an account-wide default in Studio → API. A per-job webhook_url overrides the default, and webhook_url: '' turns it off for one job. Webhooks are optional: waiting with result() works the same either way and remains the source of truth.
constructWebhookEvent(), passing the raw request body:
event.data.resultholds the raw result for transcription, extraction and tweet events, unless it was over 256 KB (result_truncated: true). For TikTok events it is only a summary.resume(task_id).result()always gets the full parsed result.- For
extract_video.completedevents,event.data.video_infoholds the raw video metadata. It is sent even when the result was truncated. verifyWebhookSignature(rawBody, signatureHeader, secret)returnstrueorfalseinstead of throwing.- Deliveries older than 5 minutes are rejected by default. Change this with
{ toleranceSeconds };0turns the check off. (await job.refresh()).webhookshows the delivery status:{ status, attempts, response_status, last_error, delivered_at }.
TikTok
Profile scraping
vn.tiktokProfile() scrapes a public profile in the background and returns the finished task with every matching video (the SDK fetches all result pages for you):
max_posts, after_datetime, before_datetime, min_likes, max_likes, webhook_url. Datetimes accept YYYY-MM-DD or full ISO strings with a timezone.
To read the results one page at a time, or grab them as a single JSON file, submit the job and use the page-level method:
Keyword search
vn.tiktokSearch() works the same way and returns the finished task with every result:
- Without
sort_by, results come back newest first. Withoutpublished_within, anafter_datetimemore than 24 hours ago picks the smallest window that covers it. parallel_search_slices(2to4) runs several search chains in parallel to go past TikTok’s single-chain limit (about 115 to 140 items). Billing grows with the number of slices.- Other filters:
after_datetime,before_datetime,min_likes,max_likes,min_views,max_views,webhook_url. Page through results withgetTikTokSearch(task_id, { cursor, limit }).
Search
Search YouTube
use_enhanced_search (default true), start_year, end_year, duration.
searchVideos() still works but is deprecated: it forwards to searchYouTube() and logs a warning.Search your uploaded files
Files
Supported formats: mp4, webm, mov, avi, wmv, flv, mkv, m4a, mp3, mpeg, mpga, wav.Upload and analyze
Upload without waiting
Withoutwait_for_completion, the upload returns right away (status: 'accepted') while the file is processed. Check on it with getFile():
Manage files
Namespaces
Usage and billing
Per-call usage
Passinclude_usage: true to getTranscript, analyzeVideo, analyzeFile, extractVideoData, extractFileData, searchYouTube or searchFiles to receive a usage block describing what the request cost. For background jobs, pass it in the options: vn.transcribe(url, { include_usage: true }). A failed job has all its charges reverted.
standard_request, residential_request, transcription_hour, analysis_request, search_request, scene_analysis_hour. See Usage & Costs.
Account usage
vn.healthCheck() returns the API status and needs no authentication.
Error handling
Every API error is mapped to a specific class, all extendingVidNavigatorError:
Every error exposes
status_code, error_code, error_message and details, and errors raised while waiting for a job also have task_id. See Errors for every API error code.
TypeScript models
All API responses are parsed into typed classes with staticfromJSON() constructors.
Videos, files and analysis
Videos, files and analysis
Search and namespaces
Search and namespaces
Jobs and TikTok
Jobs and TikTok
Usage
Usage
What’s new in 2.1.0
video_infoon extraction:extractVideoData(),vn.extractVideo()andjob.result()onvn.extractVideo.submit()now return the video’s metadata asvideo_info. The task snapshot fromjob.refresh()/job.wait()has it too, andextract_video.completedwebhook events carry it inevent.data.video_info.
Upgrading from 1.x
Transcription, structured extraction and tweet analysis now always run as background jobs, so they work on videos of any length. Existing calls keep working with the same arguments, with these differences:getTweetStatement()no longer returnsstatement_query, which was never part of the documented API.searchVideos()andgetYouTubeTranscript()are deprecated in favor ofsearchYouTube()andgetTranscript().
vn.transcribe, vn.extractVideo, vn.tweetStatement, vn.tiktokProfile and vn.tiktokSearch, each with .submit() and .resume(), plus the webhook signature helpers and the InsufficientCreditsError, TooManyActiveJobsError and TaskTimeoutError classes.
Resources
npm
Package page and release history.
GitHub
Source code and issue tracker.
Python SDK
The same API for Python.
API Reference
Every endpoint, parameter and response field.

