Skip to main content

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.
Only need a handful of videos? You can download them one by one from the dashboard instead of running a script: open the position, click into any completed interview, and use the Download video button in the bottom-left corner. This works fine for a few interviews, but it’s a manual, one-video-at-a-time process — for anything bigger, one of the scripts below is much faster.

The script

Pick the tab that matches what you need to export — both require Node.js 18+ (for native fetch).
Downloads every completed interview video for one position, given its position ID. The script:
  1. 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).
  2. For each completed interview, fetches the stepExecutions and pulls the signed video url from each latestAnswer, skipping steps with a deleted or missing answer.
  3. Streams each video to disk under hireflix_videos/, named FirstName_LastName__01_QuestionTitle.mp4 — the two-digit prefix keeps answers in question order per candidate.
Save this as 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, type Terminal, press Enter.
  • Windows: press the Start key, type Command Prompt (or PowerShell), press Enter.
Then move into the folder where you saved the script — for example, if you saved it on your Desktop:
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 a hireflix_videos/ folder created next to the script, one file per answered question:
Video urls are signed and expire after 14 days. Both scripts always fetch a fresh URL right before downloading, so that’s not an issue when you run them — but don’t cache or reuse URLs from a previous run.
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.