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 🙏

© 2025 – Pkg Stats / Ryan Hefner

earningsfeed

v0.1.0

Published

Official Node.js SDK for the Earnings Feed API - SEC filings, insider transactions, and institutional holdings

Readme

Earnings Feed Node.js SDK

npm

Official Node.js client for the Earnings Feed API — SEC filings, insider transactions, and institutional holdings.

Installation

npm install earningsfeed

Quick Start

import { EarningsFeed } from "earningsfeed";

const client = new EarningsFeed("your_api_key");

// Get recent 10-K and 10-Q filings
const filings = await client.filings.list({ forms: ["10-K", "10-Q"], limit: 10 });
for (const filing of filings.items) {
  console.log(`${filing.formType}: ${filing.companyName} - ${filing.title}`);
}

// Get a company profile
const apple = await client.companies.get(320193);
console.log(`${apple.name} (${apple.primaryTicker})`);

Features

  • TypeScript — Full type definitions included
  • Async iterators — Auto-pagination with for await...of
  • Zero dependencies — Uses native fetch (Node 18+)
  • ESM + CommonJS — Works with any module system

Usage

SEC Filings

// List filings with filters
const filings = await client.filings.list({
  ticker: "AAPL",
  forms: ["10-K", "10-Q", "8-K"],
  status: "final",
  limit: 25,
});

// Iterate through all filings (auto-pagination)
for await (const filing of client.filings.iter({ ticker: "AAPL", forms: "8-K" })) {
  console.log(filing.title);
}

// Get filing details with documents
const detail = await client.filings.get("0000320193-24-000123");
for (const doc of detail.documents) {
  console.log(`${doc.docType}: ${doc.filename}`);
}

Insider Transactions

// Recent insider purchases
const purchases = await client.insider.list({
  ticker: "AAPL",
  direction: "buy",
  codes: ["P"], // Open market purchases
  limit: 50,
});

for (const txn of purchases.items) {
  console.log(`${txn.personName}: ${txn.shares} shares @ $${txn.pricePerShare}`);
}

// Large sales across all companies
for await (const txn of client.insider.iter({ direction: "sell", minValue: 1_000_000 })) {
  console.log(`${txn.companyName}: $${txn.transactionValue?.toLocaleString()}`);
}

Institutional Holdings (13F)

// Who owns Apple?
const holdings = await client.institutional.list({
  ticker: "AAPL",
  minValue: 1_000_000_000, // $1B+ positions
});

for (const h of holdings.items) {
  console.log(`${h.managerName}: ${h.shares.toLocaleString()} shares ($${h.value.toLocaleString()})`);
}

// Track a specific fund
for await (const h of client.institutional.iter({ managerCik: 1067983 })) { // Berkshire
  console.log(`${h.issuerName}: ${h.shares.toLocaleString()} shares`);
}

Companies

// Get company profile
const company = await client.companies.get(320193);
console.log(company.name);
console.log(`Ticker: ${company.primaryTicker}`);
console.log(`Industry: ${company.sicCodes[0]?.description}`);

// Search companies
const results = await client.companies.search({ q: "software", state: "CA", limit: 10 });
for (const company of results.items) {
  console.log(`${company.name} (${company.ticker})`);
}

Error Handling

import {
  EarningsFeed,
  AuthenticationError,
  RateLimitError,
  NotFoundError,
} from "earningsfeed";

const client = new EarningsFeed("your_api_key");

try {
  const filing = await client.filings.get("invalid-accession");
} catch (e) {
  if (e instanceof NotFoundError) {
    console.log("Filing not found");
  } else if (e instanceof RateLimitError) {
    console.log(`Rate limited. Resets at: ${e.resetAt}`);
  } else if (e instanceof AuthenticationError) {
    console.log("Invalid API key");
  }
}

API Reference

Full API documentation: earningsfeed.com/api/docs

License

MIT