When to use this
Use this when you need to archive or export interview videos in bulk — for example, backing up interviews before a retention window closes, moving recordings into your own storage, or running an analysis over a full set of answers. It combines queries already covered in this section — listing interviews for a position and fetching interview results — into a script that walks every completed interview and saves each answer video to disk.The script
Pick the tab that matches what you need to export — both require Node.js 18+ (for nativefetch).
- Single Position
- Whole Account
Downloads every completed interview video for one position, given its position ID. The script:
- Fetches every interview for the position, paginating automatically 100 at a time until it’s collected them all, and skips any still
pending(candidate hasn’t completed it yet). - For each completed interview, fetches the
stepExecutionsand pulls the signed videourlfrom eachlatestAnswer, skipping steps with a deleted or missing answer. - Streams each video to disk under
hireflix_videos/, namedFirstName_LastName__01_QuestionTitle.mp4— the two-digit prefix keeps answers in question order per candidate.
download_videos.js.download_videos.js
1
Create the script file
Never run a script before? Open a plain-text editor — not Word or Google Docs, since those add hidden formatting that breaks the file. A free option that works on Mac and Windows is VS Code; Notepad (Windows) or TextEdit (Mac, switch to Format → Make Plain Text first) also work.Copy the full script above, paste it into a new file, and save it as
download_videos.js in a folder you’ll remember, e.g. your Desktop. Make sure your editor doesn’t silently add .txt to the filename — on Windows, pick All Files in the save dialog’s file-type dropdown; on Mac, TextEdit adds .txt unless you type the full name including .js yourself.2
Open a terminal
The terminal (or command line) is where you’ll type the commands in the remaining steps.
- Mac: press
Cmd + Space, typeTerminal, press Enter. - Windows: press the Start key, type
Command Prompt(orPowerShell), press Enter.
3
Check your Node.js version
Native
fetch requires Node 18+. Confirm with:4
Set your API key
Export your Hireflix API key as an environment variable:
5
Run the script
Pass the ID of the position you want to export as an argument (see fetching positions for how to find it):The script logs each file as it downloads and prints
Done. when finished.Output
Videos are saved to ahireflix_videos/ folder created next to the script, one file per answered question:For every position it processes, the script paginates through all of its interviews (100 per request, looping on
lastCursor until a page comes back empty) — it isn’t capped at the first 100 candidates. The first request for each position must send lastCursor: "" (not null) — an explicit null causes the API to scope the result set incorrectly.Running the whole-account version can mean a lot of requests and large downloads, so it’s also worth checking your data retention / GDPR policy before archiving candidate video off-platform.Learn next?
Let’s learn how to create and use webhooks.

