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

sec-daily-api

v0.5.1

Published

Official JavaScript and TypeScript SDK for the SEC Daily API — real-time EDGAR filings, insider transactions, and news.

Readme

SEC Daily API — Node.js SDK

Official JavaScript and TypeScript SDK for the SEC Daily API — real-time EDGAR filings and news.

Using Claude, Cursor, ChatGPT, or another AI assistant? Use the sec-daily-mcp package instead — it connects your AI tool directly to the SEC Daily API with no code required.

Using Python? See the sec-daily-api Python SDK on PyPI.

  • 7.9M+ filings indexed — 10-K, 10-Q, 8-K, 13D/G, Form 3/4/5, S-1, and more
  • 122K+ companies, funds, and insiders covered
  • Detailed entity metadata — SIC codes, addresses, former names, fiscal year, and more
  • Coverage from January 2015 to today, updated in near real-time
  • Clean, structured JSON responses

Installation

npm install sec-daily-api

Quick Start

import { SecDailyAPI } from "sec-daily-api";

const client = new SecDailyAPI({
  apiKey: process.env['SEC_DAILY_API_KEY'], // This is the default and can be omitted
});

// Look up an entity by ticker or CIK
const entity = await client.getEntity({ ticker: "AAPL" });
console.log(entity?.name, entity?.sicDescription, entity?.exchange);
// "Apple Inc."  "Electronic Computers"  "Nasdaq"

// Get recent 10-K and 10-Q filings for Apple
const { filings, pagination } = await client.getFilings({
  ticker: "AAPL",
  formTypes: ["10-K", "10-Q"],
  limit: 10,
});

for (const filing of filings) {
  // acceptanceDateTime is absent for most filings before 2025
  console.log(filing.filingDate, filing.formType, filing.acceptanceDateTime ?? "-");
}

// Fetch the next page if there are more results
if (pagination.hasMore) {
  const next = await client.getFilings({
    ticker: "AAPL",
    formTypes: ["10-K", "10-Q"],
    limit: 10,
    cursor: pagination.nextCursor,
  });
}

// Get latest SEC news
const { news } = await client.getNews({ limit: 5 });

Get your API key at secdailyapi.com.


API Reference

For the full reference including all parameters, response schemas, and plan limits, see secdailyapi.com/docs.

new SecDailyAPI(options)

| Option | Type | Required | Description | |---|---|---|---| | apiKey | string | Yes | Your SEC Daily API key. Defaults to process.env['SEC_DAILY_API_KEY'] |


getEntity(params)

Look up a company or fund by ticker or CIK. Returns null if not found.

// By ticker (case-insensitive)
const entity = await client.getEntity({ ticker: "aapl" });

// By CIK
const entity = await client.getEntity({ cik: "320193" });

| Parameter | Type | Description | |---|---|---| | ticker | string | Ticker symbol (case-insensitive) | | cik | string | SEC CIK number |

Exactly one of ticker or cik is required.

Sample response:

{
  "cik": "320193",
  "name": "Apple Inc.",
  "ticker": "AAPL",
  "exchange": "Nasdaq",
  "entityType": "operating",
  "category": "Large accelerated filer",
  "sicCode": "3571",
  "sicDescription": "Electronic Computers",
  "stateOfIncorporation": "CA",
  "fiscalYearEnd": "0926",
  "irsNumber": "942404110",
  "phone": "(408) 996-1010",
  "businessAddress": {
    "street1": "ONE APPLE PARK WAY",
    "city": "CUPERTINO",
    "stateOrCountry": "CA",
    "stateOrCountryDescription": "CA",
    "zipCode": "95014"
  },
  "mailAddress": {
    "street1": "ONE APPLE PARK WAY",
    "city": "CUPERTINO",
    "stateOrCountry": "CA",
    "stateOrCountryDescription": "CA",
    "zipCode": "95014"
  },
  "formerNames": [
    { "name": "APPLE COMPUTER INC", "from": "1994-01-26T05:00:00.000Z", "to": "2007-01-04T05:00:00.000Z" }
  ]
}

getFilings(params?)

Retrieve SEC filings from EDGAR.

const { filings, count, pagination } = await client.getFilings({
  ticker: "MSFT",
  formTypes: ["8-K"],
  filingDateStart: "2024-01-01",
  filingDateEnd: "2024-12-31",
  limit: 50,
});

| Parameter | Type | Description | |---|---|---| | ticker | string | Company ticker symbol | | cik | string | SEC CIK number | | formTypes | string \| string[] | Filter by form type(s), e.g. ["10-K", "10-Q"] | | filingDate | string | Single date filter (YYYY-MM-DD), on SEC's official filing date | | filingDateStart | string | Start of date range (YYYY-MM-DD) | | filingDateEnd | string | End of date range (YYYY-MM-DD) | | limit | number | Max results per page (1–1000, default 200) | | cursor | string | Cursor from a previous response to fetch the next page | | fieldset | "minimal" \| "standard" \| "full" | Field subset to return (default: full) | | fields | string \| string[] | Custom fields to return, e.g. ["id", "formType", "filingDate", "acceptanceDateTime", "filingIndexUrl"] |

Fieldsets:

| Fieldset | Fields included | |---|---| | minimal | id, formType, filingDate, acceptanceDateTime, cik, companyName, accessionNumber, periodOfReport | | standard | All of minimal + filingIndexUrl, submissionTextUrl, primaryDocumentUrl | | full (default) | All fields including entity, entities, formFamily, documentFormatFiles, dataFiles, documentTypes, publicDocumentCount, and more |

Each fieldset also still includes the deprecated names its fields replace (see Deprecated fields).

Note: minimal and standard skip entity enrichment — significantly faster for bulk queries.

Pagination

getFilings returns a pagination object with hasMore and nextCursor. Pass nextCursor back as cursor to fetch the next page. All other params must be repeated.

let cursor: string | undefined;

do {
  const res = await client.getFilings({ ticker: "AAPL", limit: 100, cursor });
  process(res.filings);
  cursor = res.pagination.nextCursor;
} while (res.pagination.hasMore);

Sample response (fieldset=full, shortened; the deprecated fields are left out):

{
  "count": 1,
  "filings": [
    {
      "id": "6442f28eb9af27ecdcc74ec712560b9632984a817b391f130361b7ee7aff0932",
      "accessionNumber": "0001140361-26-015711",
      "formType": "8-K",
      "formFamily": "8-K",
      "isAmendment": false,
      "filingDate": "2026-04-20",
      "acceptanceDateTime": "2026-04-20T21:29:51Z",
      "periodOfReport": "2026-04-17",
      "cik": "320193",
      "companyName": "Apple Inc.",
      "entities": [
        { "cik": "320193", "name": "Apple Inc.", "role": "Filer" }
      ],
      "items": "5.02",
      "primaryDocument": "ef20071035_8k.htm",
      "documentTypes": ["8-K", "GRAPHIC"],
      "filingIndexUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/0001140361-26-015711-index.htm",
      "submissionTextUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/0001140361-26-015711.txt",
      "primaryDocumentUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/ef20071035_8k.htm",
      "documentFormatFiles": [
        {
          "seq": "1",
          "description": "8-K",
          "url": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/ef20071035_8k.htm",
          "type": "8-K",
          "size": "38605"
        }
      ],
      "entity": {
        "cik": "320193",
        "name": "Apple Inc.",
        "ticker": "AAPL",
        "exchange": "Nasdaq",
        "sicCode": "3571",
        "stateOfIncorporation": "CA",
        "fiscalYearEnd": "0926"
      }
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "eyJzdHJhdGVneSI6ImNpa19kYXRlX3JhbmdlIiwi..."
  }
}

Filing fields

Every field except id, cik, formType and filingDate is optional. The main ones:

| Field | Description | |---|---| | id, accessionNumber | Our filing id and SEC's accession number | | formType, formFamily, isAmendment | SEC's exact form name ("10-K/A"); the family that groups its variants (10-K, 10-K405 and 10-K/A are all "10-K"); whether it is an amendment | | filingDate | SEC's official filing date, YYYY-MM-DD (Eastern by definition). An evening filing can be dated the next business day | | acceptanceDateTime | When SEC accepted the filing, ISO 8601 UTC ending in Z, from SEC's filing header. Absent when the header has no acceptance time (most filings before 2025) | | periodOfReport, effectivenessDate | Period the filing reports on; effectiveness date | | cik, companyName | The main company and its name at filing time | | entities | Every party: { cik, name, role }[], at most 100 (entitiesTruncated is true beyond that). role is SEC's header role: "Filer", "Issuer", "Subject", "Reporting Owner", "Filed by" | | items | 8-K items as a string, e.g. "2.02, 9.01" | | filingIndexUrl, submissionTextUrl, primaryDocumentUrl | Links to the filing's index page, complete submission text file, and primary document on SEC.gov | | primaryDocument, primaryDocDescription | The primary document's path inside the filing folder (e.g. "aapl-20250927.htm") and description | | documentFormatFiles, dataFiles | Documents and data files with url, type, description, size, seq; at most 1,000 (documentsTruncated is true beyond that) | | documentTypes, publicDocumentCount, size | Document types (e.g. ["8-K", "EX-99.1"]), public document count, bytes in the whole submission | | otherFormTypes, groupMembers, fundSeries | The other form name on a combined filing; 13D/G group members; fund series and classes | | act, fileNumber, filmNumber, coreType, isXBRL, isInlineXBRL, isXBRLNumeric | SEC's submission fields | | textChars | Length of the stored text, when there is some | | entity, markdown, summary | Company profile, filing text, AI summary |

Deprecated fields

These are still returned for now and stay in the Filing type (marked @deprecated), but will be removed in a later API version. Move to the new names:

| Deprecated | Use instead | |---|---| | filingDateInEst | filingDate | | filingMonth | filingDate.slice(0, 7) | | filingDateInUtc | acceptanceDateTime?.slice(0, 10), or filingDate | | filingTimeInEst, filingTimeInUtc, acceptanceDateTimeInEst, acceptanceDateTimeInUtc | acceptanceDateTime | | linkToFilingDetail, linkToFiling | filingIndexUrl | | linkToSubmissionTxt, linkToTxt | submissionTextUrl | | linkToPrimaryDocument | primaryDocumentUrl | | filers | entities | | linksToDocuments | documentFormatFiles[].url |

Note: when SEC's header has no acceptance time, filingTimeInEst and filingTimeInUtc show a made-up noon Eastern placeholder, while acceptanceDateTime is absent. Check for undefined before using it.


getNews(params?)

Retrieve SEC-related news.

const { news, count } = await client.getNews({
  startDate: "2024-01-01",
  endDate: "2024-01-31",
  limit: 20,
});

| Parameter | Type | Description | |---|---|---| | newsType | string | Filter by news category | | startDate | string | Start of date range (YYYY-MM-DD) | | endDate | string | End of date range (YYYY-MM-DD) | | limit | number | Max results to return | | fieldset | "minimal" \| "standard" \| "full" | Field subset to return (default: full) |

Sample response:

{
  "count": 1,
  "news": [
    {
      "id": "fa70432545234148ac61ca4721cea65048b3d6c33684f48a361ae976d34e50e5",
      "newsType": "PressReleases",
      "title": "SEC and CFTC Jointly Propose Amendments to Reduce Private Fund Reporting Burdens",
      "description": "The Securities and Exchange Commission (SEC) and the Commodity Futures Trading Commission (CFTC) jointly proposed amendments...",
      "link": "https://www.sec.gov/newsroom/press-releases/2026-40-sec-cftc-jointly-propose-amendments-reduce-private-fund-reporting-burdens",
      "publishedDateInEst": "2026-04-20T10:45:00-0400",
      "publishedDateInUtc": "2026-04-20T14:45:00Z",
      "recordedTimeInUTC": "2026-04-20T15:00:25Z"
    }
  ]
}

Dates and times

A filing carries two times, and they answer different questions:

  • filingDate (YYYY-MM-DD) is SEC's official filing date. It is an Eastern date by definition, so don't convert it to another time zone. A filing accepted after about 5:30 pm ET is dated the next business day. Filter and group by this field.
  • acceptanceDateTime is the exact moment SEC accepted the filing, in UTC ("2026-04-20T21:29:51Z"). It is absent for most filings before 2025, because SEC's header has no acceptance time for them.

To show the acceptance time in a time zone, use the helpers:

import { acceptedAt, acceptedAtIn } from "sec-daily-api";

acceptedAt(filing);                      // Date (an instant), or undefined
acceptedAtIn(filing);                    // "2026-04-20T17:29:51-04:00" (Eastern, SEC's own time)
acceptedAtIn(filing, "Europe/London");   // "2026-04-20T22:29:51+01:00"
acceptedAtIn(filing, "Asia/Tokyo");      // "2026-04-21T06:29:51+09:00"

Both return undefined when the filing has no acceptanceDateTime; fall back to filingDate for the day. Daylight saving is applied for the filing's own date. An unknown time zone name throws a RangeError.

Or format it yourself with Intl, which takes any IANA time zone:

const when = acceptedAt(filing);
when?.toLocaleString("en-US", { timeZone: "America/Chicago", timeZoneName: "short" });
// "4/20/2026, 4:29:51 PM CDT"

TypeScript

Full TypeScript support is included. All request params and responses are typed.

import type {
  Filing, FilingDocument, FilingParty, FilingEntity, FilingMarkdown, FundSeries, FundClass,
  Entity, EntityAddress, EntityFormerName,
  NewsItem, Pagination,
  GetFilingsParams, GetEntityParams, GetNewsParams,
  FilingsResponse, NewsResponse,
} from "sec-daily-api";

Error Handling

When the API returns a non-success status code, an error is thrown with the status and message:

try {
  const { filings } = await client.getFilings({ ticker: "AAPL" });
} catch (err) {
  if (err instanceof Error) {
    console.error(err.message); // e.g. "SecDaily API error 401: Unauthorized"
  }
}

| Status Code | Meaning | |---|---| | 400 | Invalid parameters (bad date format, invalid CIK, inverted date range, limit out of range) | | 401 | Invalid or missing API key | | 403 | Plan does not include this endpoint or requested date range exceeds plan limit | | 429 | Rate limit exceeded — retried automatically up to 3 times with backoff | | 504 | Request timed out — retried automatically up to 3 times | | 500 | Server error |

The SDK validates date format (YYYY-MM-DD), numeric CIK, and date range order before making any network request, so many errors are caught immediately without a round trip.


Changelog

[0.5.1] - 2026-11-06

  • Added acceptedAt(filing) and acceptedAtIn(filing, timeZone?) to read a filing's acceptance time as a Date, or as local ISO 8601 time in any IANA time zone (Eastern by default); see Dates and times

[0.5.0] - 2026-11-05

  • Filing types the API's new field names: filingDate, acceptanceDateTime, filingIndexUrl, submissionTextUrl, primaryDocumentUrl, entities, plus companyName, formFamily, isAmendment, documentTypes, size, fundSeries and more
  • The old names (filingDateInEst, filingTimeInEst, linkToFilingDetail, filers, ...) are still returned and typed, now marked @deprecated; see Deprecated fields
  • acceptanceDateTime is absent when SEC has no acceptance time (most filings before 2025); the old filingTime* fields showed a noon Eastern placeholder
  • New exported types: FilingParty (FilingFiler is now a deprecated alias), FundSeries, FundClass

[0.4.0] - 2026-06-03

  • Added getFiling(id) — fetch a single filing by id, returns Filing | null
  • Added getFilingByAccession(accessionNumber) — fetch a single filing by SEC accession number, returns Filing | null
  • Added getNewsItem(id) — fetch a single news item by id, returns NewsItem | null
  • Added accessionNumber to GetFilingsParams

[0.3.0] - 2026-05-10

  • Added cursor-based pagination to getFilings() — response now includes pagination: { hasMore, nextCursor }
  • Added cursor param to GetFilingsParams to fetch subsequent pages
  • Renamed startDate/endDate to filingDateStart/filingDateEnd (old names still accepted by the API)
  • Added 429 and 504 retry with exponential backoff (up to 3 attempts, respects Retry-After header)
  • Added client-side input validation for date format, CIK format, and inverted date ranges
  • Expanded Filing type with all fields: accessionNumber, periodOfReport, acceptanceDateTimeInEst/Utc, publicDocumentCount, items, all link fields, documentFormatFiles, dataFiles, filers, markdown, summary
  • Added new exported types: FilingDocument, FilingFiler, FilingEntity, FilingMarkdown
  • Exported Pagination, GetFilingsParams, GetEntityParams, GetNewsParams, FilingsResponse, NewsResponse types

[0.2.0] - 2026-05-05

  • Added getEntity({ ticker }) and getEntity({ cik }) — look up a company or fund, returns Entity | null
  • Expanded Entity type with all known fields: exchange, SIC code, addresses, former names, and more
  • Ticker input is normalized to uppercase automatically

[0.1.0] - 2026-04-26

  • Initial release: getFilings() and getNews()

Resources


Requirements

  • Node.js 20 LTS or later
  • TypeScript 4.7 or later (if using TypeScript)

Legal Disclaimer

The data provided through this SDK is for informational purposes only and does not constitute investment advice, financial advice, trading advice, or any other type of advice. GoodTech LLC makes no representations as to the accuracy, completeness, or timeliness of the data. You are solely responsible for your use of the data. Past filings and transactions do not predict future performance. Always consult a qualified financial professional before making investment decisions.


Licensed under the Apache 2.0 License. Copyright 2026 Goodtech LLC.