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

nyaa.si-client

v1.0.8

Published

<div align="center">

Readme

Nyaa.si

license-info stars-infoa

Last-Comitt Comitts Year reposize-info

SourceForge Languages

📃 | Description

This project uses Puppeteer to perform web scraping on the anime torrent site nyaa.si. It is important to note that this project has no official affiliation with nyaa.si, and its use is entirely at your own risk. Keep in mind that web scraping can be considered illegal depending on the context and how it is applied. We recommend caution and a commitment to avoiding piracy practices. Support anime studios ethically!

📥 | Installation

Installing this package is as easy as using it. Just run:

npm i nyaa.si-client

❓ | How to use

import { Client, Filters, RunTimes, Scraper } from 'nyaa.si-client'

// if you are programming in communjs use this around the code
// (async () => {
    // code
// })()

const client = new Client({
  runTime: RunTimes.Cheerio,
  /**
   * This will allow you to load 5 pages simultaneously
   */
  concurrentJobs: 5,

  /**
   * @default 3000
   */
  timeout: 3000
  // runTime: RunTimes.Puppeteer,
  // showNavigator: true,
})

client.on('listening', (job) => console.log(`Job: ${job.id} is available for new tasks`))
client.on('reserved', (job) => console.log(`Job: ${job.id} is processing a task`))

/**
 * You can use these functions to do the setup manually, other than the dynamic initialize:
 * 
 * client.setupCheerio()
 * await client.setupPuppeteer()
 */
await client.initialize()

const scraper = new Scraper({
  client,
  /**
   *  This carries additional information such as:
   *  description, submitter, information, files, comments
   *  
   *  But it results in 75 requests per page, so I don't recommend using it!
   *  @default false
  */
  loadAdditionalInfo: false, // true | { comments: true... },
  /**
   * How many pages will be loaded for web scraping, each page has 75 torrents
   * 
   * @default 1
   */
  pagesToLoad: 2,
})

/**
 * Scraping page 1 and 2
 */
const extract = await scraper.search('re: zero', {
  filter: {
    category: 'anime',
    filter: Filters.NoFilter
  },
  page: 1
})

console.log(extract.getData())
/*
{
  "type": "list",
  "metadata": {
    "hasPreviousPage": true,
    "hasNextPage": true,
    "current": 2,
    "total": 14,
    "timestamp": 1736376348958,
    "timeTaken": 109.094,
    "nextPageLink": "https://nyaa.si/?f=0&c=1_0&q=re%3A+zero&p=3",
    "nextPage": 3
  },
  "count": 150,
  "torrents": [
    {
      "id": 1917004,
      "hash": "9dc1ff3ab137795503c91fdaeadfead6d44530e2",
      "category": "Anime - English-translated",
      "name": "Re ZERO Starting Life in Another World...",
      "links": {
        "magnet": "magnet:?xt=urn:btih:...",
        "page": "/view/1917004",
        "torrent": "/download/1917004.torrent"
      },
      "size": "199.8 MiB",
      "timestamp": 1735741923,
      "stats": {
        "seeders": 22,
        "leechers": 4,
        "downloaded": 224
      },
      "details": {
        "type": "details",
        "submitter": {
          "name": "varyg1001",
          "url": "https://nyaa.si/user/varyg1001"
        },
        "information": "https://myanimelist.net/anime/54857",
        "files": [
          {
            "type": "file",
            "fileName": "Re.ZERO.Starting.Life.in.Another.World.S03E08.The.Person.Ill.Fall.for.Someday.1080p.BILI.WEB-DL.AAC2.0.H.264-VARYG.mkv ",
            "readableSize": "199.8 MiB",
            "sizeInBytes": 209505484.8
          }
        ]
      }
    },
    // more 149...
  ]
}
*/

// const details = await scraper.details('https://nyaa.si/view/1919038')
// console.log(details)

await extract.addNextPage() // Add page 3 to the current data
await extract.addNextPage(2) // Add pages 4 and 5

const extractOnly = await extract.getNextPage() // Returns only page 6
console.log(extractOnly)