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

seedr-js

v1.1.0

Published

Unofficial Seedr API for Node.js

Readme

seedr-js

Unofficial Node.JS API Wrapper for seedr.cc

NPM Version GitHub Release Date visitors

Index

Setup

Install seedr-js via npm using your favorite package manager.

npm i seedr-js

Quick Start

To use the API, Authentication is required with Seedr, any of the methods can be used as needed afterwards, refer to the complete list of available methods below.

import { Seedr } from 'seedr-js';

Authentication

There are two flows to get the access token.

  • Login with username/password.
  • Authorizing with device code.

Token refresh is handled automatically.

Persistence

Authentication state can be stored by save() and load() methods implemented from interface IStore

A local file save implementation is already provided as FilePersistence export, which is demonstrated below.

[!WARNING]
FilePersistence saves everything in plain-JSON without encryption, take extra care saving in a secure location.

import { Seedr, FilePersistence } from 'seedr-js';

const AUTH_STATE_PATH = './auth_state.json';

// Immediately saves any Auth State changes.
const auth_state = new FilePersistence(AUTH_STATE_PATH);
const seedr = new Seedr(auth_state);

// ... use as needed

Login with Username and Password

Can be used without persistence too (uses NoPersistence by default)

import { Seedr } from 'seedr-js';

// Auth State is not saved.
const seedr = new Seedr();

await seedr.auth.loginOAuth('username/email', 'password');

// ... use as needed

Authorizing Device

This flow requires persistence.

[!WARNING]
Authentication with device code grants long validity tokens (1 year), extra care is needed to prevent compromise.

import { Seedr, FilePersistence } from 'seedr-js';

const auth_state = new FilePersistence('./auth_state.json');
const seedr = new Seedr(auth_state);

await seedr.auth.obtainDeviceCode();

// delay / stop until the Code is Authorized in Seedr Devices for the first time.

// ... use as needed

Examples

import { Seedr, FilePersistence } from 'seedr-js';

const auth_state = new FilePersistence('./auth_state.json');
const seedr = new Seedr(auth_state);

// // Assuming previously authenticated.
// await seedr.auth.loginOAuth('username/email', 'password')

// Account Info
let response1 = await seedr.getAccountInfo();
console.log(response1);

// Adding Torrent
let response2 = await seedr.addTorrentMagnet('magnet-uri');
console.log(response2);

// List Folder Contents
// Without top-level await.
seedr.list().then((response3) => {
  console.log(response3);
});

[!TIP]
Separate variables are used to assign returned types from the functions, which will help with auto-complete / Intellisense.

Documentation

This package provides extensive Typescript and JSDoc support, configure your IDE for better experience with completions / Intellisense.

A brief list of all methods is provided below for reference. (assuming seedr is an instance of Seedr class)

Auth

  • seedr.auth.loginOAuth(username?, password?)
  • seedr.auth.refreshTokenOAuth()
  • seedr.auth.obtainDeviceCode()
  • seedr.auth.refreshTokenXBMC()
  • seedr.auth.getAccessToken()

Resource

  • seedr.addTorrentMagnet(torrent_magnet, folder_id?)
  • seedr.addTorrentURL(torrent_url, folder_id?
  • seedr.addTorrentFile(torrent_file)
  • seedr.addTorrentFromWishlist(wishlist_id, folder_id?)
  • seedr.addTorrent(options)
  • seedr.scanPage(url)
  • seedr.list(content_type?, id?)
  • seedr.searchFiles(search_query)
  • seedr.fetchFile(folder_file_id)
  • seedr.addFolder(name)
  • seedr.renameFolder(id, rename_to)
  • seedr.renameFile(id, rename_to)
  • seedr.delete(ids: {folder: [], file: [], torrent: []})
  • seedr.deleteAll()
  • seedr.getWishlist()
  • seedr.deleteWishlistItem(id)
  • seedr.clearWishlist()
  • seedr.testToken()
  • seedr.getDevices()
  • seedr.getAccountInfo()
  • seedr.getUsage()

Contributing

Contributions are welcome.

  1. Fork and Clone the Project
  2. Create a branch. (eg. feat/new fix/issue)
  3. Make your changes.
  4. Commit and Push to your branch.
  5. Open a Pull Request.

API Source

[!WARNING]
API is subject to availability from Seedr, you might want to check out premium Rest-APIs offerings from Seedr if you require guaranteed access in production.

There are several projects previously developed for the same purpose, this refers to them a lot.