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

@plosson/vt-js

v0.2.0

Published

Unofficial TypeScript/Bun client library for the VirusTotal API v3 (port of vt-py)

Readme

@plosson/vt-js

Unofficial TypeScript/Bun client library for the VirusTotal API v3.

This is an independent port of VirusTotal's official Python library vt-py. It is not affiliated with, endorsed by, or sponsored by VirusTotal.

With this library you can interact with the VirusTotal REST API v3 to scan files and URLs, look up information about files, URLs, domains and IPs, run Intelligence searches, iterate collections, and consume real-time feeds.

Differences from vt-py

This is a faithful port, with a few deliberate, idiomatic adaptations:

  • Async-only. JavaScript cannot block on a promise, so every operation returns a Promise. There is no synchronous flavor (vt-py's make_sync).
  • Method names are camelCase (getObject, scanFilePrivate, toDict). Data attribute names from the API are preserved as-is (e.g. last_analysis_date).
  • Iterators are async iterables — use for await ... of.
  • Dynamic objects use a Proxy, preserving obj.sha256 access, transparent date coercion (*_dateDate), and change tracking for patchObject.

Installation

bun add @plosson/vt-js
# or
npm install @plosson/vt-js

Usage

import { Client, urlId, FeedType } from "@plosson/vt-js";

const client = new Client(process.env.VT_API_KEY!, { agent: "my-app" });

// Look up a file by hash (SHA-256, SHA-1 or MD5).
const file = await client.getObject("/files/{}", {
  pathArgs: ["275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"],
});
console.log(file.type, file.id);
console.log(file.last_analysis_date); // a Date instance

// Look up a domain, IP or URL.
await client.getObject("/domains/{}", { pathArgs: ["google.com"] });
await client.getObject("/ip_addresses/{}", { pathArgs: ["8.8.8.8"] });
await client.getObject("/urls/{}", { pathArgs: [urlId("http://www.google.com/")] });

// Iterate a collection (async).
for await (const comment of client.iterator("/files/{}/comments", {
  pathArgs: [file.id!],
  limit: 10,
})) {
  console.log(comment.text);
}

// VT Intelligence search (premium).
for await (const match of client.iterator("/intelligence/search", {
  params: { query: "type:peexe positives:5+" },
  limit: 20,
})) {
  console.log(match.id);
}

// Scan a file or URL.
const analysis = await client.scanFile(Bun.file("./sample.bin"), {
  waitForCompletion: true,
});
console.log(analysis.get("stats"));

// Consume a real-time feed.
for await (const obj of client.feed(FeedType.FILES)) {
  console.log(obj.id);
}

Development

bun install
bun test          # offline tests (live tests skip without VT_API_KEY)
bun run typecheck
bun run build     # emits dist/ (bundled JS + .d.ts)

To run the live integration tests, copy .env.example to .env and set VT_API_KEY.

License

Apache-2.0. See NOTICE for attribution.