0.0.2 • Public • Published


What is nzbget-nodejs?

It's a simple NZBGet JSON-RPC (API)[] wrapper for node.js

It currently supports, using JSON-RPC methods with and without parameters:

  • version
  • status
  • history
  • append
  • appendURL (convenience method)

This was tested on NZBGet 14.1. Let us know if you've tested it on other versions with success.


npm install nzbget-nodejs --save



This uses a generic_handling function to handle the response but you'll want to customize that.

var nzbget = require('nzbget-nodejs');
var my_ng = new nzbget({
  host: "",
  port: 6789,
  username: 'admin',
  password: 'mypassword',
var generic_handling= function(err, res){
    if (err) {
    } else {

These three methods are pretty straightforward, they take no parameters and return a string or an object.


append needs at least a URL. Supposedly you can also put the entire NZB file in the Content but I haven't tested that. These are the parameters:

  • NZBFilename - name of nzb-file. Server uses the name to build destination directory. This name can contain full path or only filename. This works when empty, not sure what it's used for otherwise.
  • Content - content of nzb-file encoded with Base64 or URL to fetch nzb-file from. required
  • Category - category for nzb-file. Can be empty string.
  • Priority - priority for nzb-file. 0 for "normal priority", positive values for high priority and negative values for low priority. Downloads with priorities equal to or greater than 900 are downloaded and post-processed even if the program is in paused state (force mode). Default priorities are: -100 (very low), -50 (low), 0 (normal), 50 (high), 100 (very high), 900 (force). Default is 0.
  • AddToTop - true if the file should be added to the top of the download queue or "False" if to the end. false is default
  • AddPaused - true if the file should be added in paused state. false is default
  • DupeKey - "" by default
  • DupeScore - 0 by default
  • DupeMode -- "Force by default"
var appendOptions =
  Content: "",
  Category: "Open Source"

appendURL is provided for convenience, using the defaults above:

my_ng.appendURL("","Open Source",generic_handling);


No tests currently available.


In lieu of a formal styleguide, take care to maintain the existing coding style. Submit Pull Request to support additional methods. Log issues if you run into trouble.

Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.0.1 Initial release


  • Support additional methods
  • Provide a choice between receiving an Object or String in the handler, instead of a JSON document. This might become the default

Package Sidebar


npm i nzbget-nodejs

Weekly Downloads






Last publish


  • edasque