npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

autorecordlive

v1.0.0

Published

Official Node.js SDK for AutoRecordLive — cloud TikTok and Douyin live stream recording API

Readme

autorecordlive

Official Node.js SDK for AutoRecordLive — the cloud TikTok Live Recorder that automatically detects and records live streams, even when you're offline.

npm License: MIT

What is AutoRecordLive?

AutoRecordLive is a cloud-based TikTok Live Recorder. Add a TikTok or Douyin channel once, and AutoRecordLive monitors it around the clock — starting the recording the moment the creator goes live. No device needs to stay running. No screen recording. No missed streams.

This SDK lets you integrate TikTok live stream recording into your own applications, automation pipelines, and workflows using the AutoRecordLive API.

Installation

npm install autorecordlive
# or
yarn add autorecordlive
# or
pnpm add autorecordlive

Requires Node.js 18 or later (uses the built-in fetch API).

Quick start

Get your API key from app.autorecordlive.com/settings/api.

import { AutoRecordLive } from 'autorecordlive';

const client = new AutoRecordLive({
  apiKey: process.env.AUTORECORDLIVE_API_KEY!,
});

// Add a TikTok channel — recording starts automatically when the creator goes live
const channel = await client.addChannel({
  platform: 'tiktok',
  url: 'https://www.tiktok.com/@username/live',
});

console.log(`Monitoring ${channel.name} (${channel.status})`);

API

new AutoRecordLive(options)

| Option | Type | Required | Description | |--------|------|----------|-------------| | apiKey | string | ✅ | Your AutoRecordLive API key | | baseUrl | string | — | Override the API base URL (for testing) |


Channels

addChannel(options)Promise<Channel>

Add a TikTok or Douyin channel for automatic recording. AutoRecordLive begins monitoring immediately.

const channel = await client.addChannel({
  platform: 'tiktok',
  url: 'https://www.tiktok.com/@username/live',
  name: 'My Creator',       // optional label
});

listChannels()Promise<Channel[]>

List all channels currently being monitored.

const channels = await client.listChannels();
channels.forEach(c => console.log(c.name, c.status));

getChannel(id)Promise<Channel>

Get a channel by ID.

removeChannel(id)Promise<void>

Stop monitoring a channel. Existing recordings are not deleted.


Recordings

listRecordings(options?)Promise<PaginatedResult<Recording>>

List recordings, with optional filters.

// All ready recordings for a specific channel
const { data, total } = await client.listRecordings({
  channel_id: channel.id,
  status: 'ready',
  limit: 20,
});

data.forEach(r => {
  console.log(`Recording from ${r.started_at} — ${r.duration}s`);
  if (r.download_url) console.log('Download:', r.download_url);
});

getRecording(id)Promise<Recording>

Get a single recording. When status is 'ready', download_url contains a signed link valid for 24 hours.

const recording = await client.getRecording('rec_abc123');

if (recording.status === 'ready' && recording.download_url) {
  // Signed URL — valid 24h
  console.log('Download MP4:', recording.download_url);
}

Types

interface Channel {
  id: string;
  platform: 'tiktok' | 'douyin';
  url: string;
  name: string;
  status: 'monitoring' | 'recording' | 'paused';
  created_at: string;
  updated_at: string;
}

interface Recording {
  id: string;
  channel_id: string;
  platform: 'tiktok' | 'douyin';
  started_at: string;
  ended_at: string | null;
  duration: number | null;          // seconds
  status: 'processing' | 'ready' | 'failed';
  download_url: string | null;      // signed URL, valid 24h
  size_bytes: number | null;
}

Error handling

All API errors throw AutoRecordLiveError with .status (HTTP status code) and optional .code.

import { AutoRecordLive, AutoRecordLiveError } from 'autorecordlive';

try {
  const channel = await client.addChannel({ platform: 'tiktok', url: '...' });
} catch (err) {
  if (err instanceof AutoRecordLiveError) {
    console.error(`API error ${err.status}: ${err.message}`);
  }
}

Example: webhook-triggered download

import { AutoRecordLive } from 'autorecordlive';

const client = new AutoRecordLive({ apiKey: process.env.AUTORECORDLIVE_API_KEY! });

// Called when AutoRecordLive sends a webhook for a finished recording
async function onRecordingReady(recordingId: string) {
  const recording = await client.getRecording(recordingId);

  if (recording.status === 'ready' && recording.download_url) {
    console.log(`Recording ready: ${recording.download_url}`);
    console.log(`Duration: ${recording.duration}s`);
    console.log(`Size: ${((recording.size_bytes ?? 0) / 1e6).toFixed(1)} MB`);
  }
}

Links

License

MIT © AutoRecordLive