sec-daily-api
v0.4.1
Published
Official JavaScript and TypeScript SDK for the SEC Daily API — real-time EDGAR filings, insider transactions, and news.
Maintainers
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.
- 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-apiQuick 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,
});
// 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) |
| 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", "filingDateInEst"] |
Fieldsets:
| Fieldset | Fields included |
|---|---|
| minimal | id, formType, filingDateInEst, filingTimeInEst, cik, accessionNumber, periodOfReport, acceptanceDateTimeInEst |
| standard | All of minimal + linkToFilingDetail, linkToPrimaryDocument, linkToSubmissionTxt |
| full (default) | All fields including entity, documentFormatFiles, dataFiles, filers, publicDocumentCount, and more |
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):
{
"count": 1,
"filings": [
{
"id": "6442f28eb9af27ecdcc74ec712560b9632984a817b391f130361b7ee7aff0932",
"formType": "8-K",
"cik": "320193",
"accessionNumber": "0001140361-26-015711",
"filingDateInEst": "2026-04-20",
"filingDateInUtc": "2026-04-20",
"filingTimeInEst": "2026-04-20T17:29:51-0400",
"filingTimeInUtc": "2026-04-20T21:29:51Z",
"filingMonth": "2026-04",
"periodOfReport": "2026-04-17",
"items": "2.02, 9.01",
"publicDocumentCount": 4,
"acceptanceDateTimeInEst": "2026-04-20T17:28:33",
"acceptanceDateTimeInUtc": "2026-04-20T21:28:33Z",
"linkToFilingDetail": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/0001140361-26-015711-index.htm",
"linkToPrimaryDocument": "https://www.sec.gov/ix?doc=/Archives/edgar/data/320193/000114036126015711/ef20071035_8k.htm",
"linkToSubmissionTxt": "https://www.sec.gov/Archives/edgar/data/0000320193/000114036126015711/0001140361-26-015711.txt",
"documentFormatFiles": [
{
"description": "8-K",
"type": "8-K",
"size": "38605",
"seq": "1",
"url": "https://www.sec.gov/ix?doc=/Archives/edgar/data/320193/000114036126015711/ef20071035_8k.htm"
}
],
"dataFiles": [
{
"description": "XBRL TAXONOMY EXTENSION SCHEMA",
"type": "EX-101.SCH",
"size": "5320",
"seq": "2",
"url": "https://www.sec.gov/Archives/edgar/data/320193/000114036126015711/aapl-20260417.xsd"
}
],
"filers": [
{
"cik": "0000320193",
"name": "Apple Inc.",
"role": "FILER"
}
],
"entity": {
"cik": "320193",
"name": "Apple Inc.",
"ticker": "AAPL",
"exchange": "Nasdaq",
"sicCode": "3571",
"stateOfIncorporation": "CA",
"fiscalYearEnd": "0926"
}
}
],
"pagination": {
"hasMore": true,
"nextCursor": "eyJzdHJhdGVneSI6ImNpa19kYXRlX3JhbmdlIiwi..."
}
}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"
}
]
}TypeScript
Full TypeScript support is included. All request params and responses are typed.
import type {
Filing, FilingDocument, FilingFiler, FilingEntity, FilingMarkdown,
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.4.0] - 2026-06-03
- Added
getFiling(id)— fetch a single filing by id, returnsFiling | null - Added
getFilingByAccession(accessionNumber)— fetch a single filing by SEC accession number, returnsFiling | null - Added
getNewsItem(id)— fetch a single news item by id, returnsNewsItem | null - Added
accessionNumbertoGetFilingsParams
[0.3.0] - 2026-05-10
- Added cursor-based pagination to
getFilings()— response now includespagination: { hasMore, nextCursor } - Added
cursorparam toGetFilingsParamsto fetch subsequent pages - Renamed
startDate/endDatetofilingDateStart/filingDateEnd(old names still accepted by the API) - Added 429 and 504 retry with exponential backoff (up to 3 attempts, respects
Retry-Afterheader) - Added client-side input validation for date format, CIK format, and inverted date ranges
- Expanded
Filingtype 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,NewsResponsetypes
[0.2.0] - 2026-05-05
- Added
getEntity({ ticker })andgetEntity({ cik })— look up a company or fund, returnsEntity | null - Expanded
Entitytype 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()andgetNews()
Resources
- API Reference: secdailyapi.com/docs
- Data Coverage: secdailyapi.com/data
- Pricing: secdailyapi.com/pricing
- Status: secdailyapi.com/status
- Support: secdailyapi.com
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.
