/** * SEC EDGAR SDK — typed API client for SEC EDGAR data. * * Standalone — no MCP server required. Usage: * * import { getCompanyByCik, getCompanyFacts, searchEdgar } from "us-gov-open-data-mcp/sdk/sec"; * * No API key required. Must include User-Agent with contact info. * Rate limit: 10 requests/second. */ /** Sec Company. */ export interface SecCompany { cik: string; name: string; tickers: string[]; exchanges: string[]; sic: string; sicDescription: string; stateOfIncorporation: string; entityType: string; category: string; fiscalYearEnd: string; formerNames: { name: string; from: string; to: string; }[]; filings: { recent: { form: string[]; filingDate: string[]; primaryDocDescription: string[]; accessionNumber: string[]; }; }; } /** Sec Filing. */ export interface SecFiling { form: string; date: string; description: string; accessionNumber: string; } /** Sec Company Facts. */ export interface SecCompanyFacts { cik: number; entityName: string; facts: { "us-gaap"?: Record; [namespace: string]: Record | undefined; }; } /** Sec Xbrl Concept. */ export interface SecXbrlConcept { label?: string; description?: string; units: Record; } /** Sec Xbrl Observation. */ export interface SecXbrlObservation { start?: string; end?: string; val: number; accn: string; fy: number; fp: string; form: string; filed: string; frame?: string; } /** Sec Search Result. */ export interface SecSearchResult { total: number; hits: { names: string[]; form: string; date: string; description: string; }[]; } /** A single XBRL concept's full time series for one company (companyconcept API). */ export interface SecCompanyConcept { cik: number; entityName: string; taxonomy: string; tag: string; label: string; description: string; unit: string; annual: SecXbrlObservation[]; quarterly: SecXbrlObservation[]; } /** One company's value for a concept in a reporting frame (frames API). */ export interface SecFrameDatum { accn: string; cik: number; entityName: string; loc: string | null; start?: string; end: string; val: number; } /** One XBRL concept across all reporting companies for a single period (frames API). */ export interface SecFrame { taxonomy: string; tag: string; label: string; description: string; unit: string; period: string; count: number; data: SecFrameDatum[]; } /** SEC XBRL financial concept codes to human-readable labels. */ export declare const xbrlConcepts: { readonly Revenues: "Total revenue"; readonly RevenueFromContractWithCustomerExcludingAssessedTax: "Revenue from contracts (ASC 606)"; readonly NetIncomeLoss: "Net income (loss)"; readonly OperatingIncomeLoss: "Operating income"; readonly GrossProfit: "Gross profit"; readonly Assets: "Total assets"; readonly Liabilities: "Total liabilities"; readonly StockholdersEquity: "Total stockholders equity"; readonly CashAndCashEquivalentsAtCarryingValue: "Cash and cash equivalents"; readonly LongTermDebt: "Long-term debt"; readonly EarningsPerShareBasic: "Basic earnings per share"; readonly EarningsPerShareDiluted: "Diluted earnings per share"; readonly CommonStockSharesOutstanding: "Common shares outstanding"; readonly Goodwill: "Goodwill"; readonly ResearchAndDevelopmentExpense: "R&D expense"; readonly SellingGeneralAndAdministrativeExpense: "SG&A expense"; readonly InterestExpense: "Interest expense"; readonly IncomeTaxExpenseBenefit: "Income tax expense"; }; /** Look up a company by CIK number. */ export declare function getCompanyByCik(cik: string): Promise; /** Get company financial facts (XBRL data). */ export declare function getCompanyFacts(cik: string): Promise; /** Full-text search across EDGAR filings. */ export declare function searchEdgar(query: string, opts?: { forms?: string; startDate?: string; endDate?: string; }): Promise; /** * Extract a specific XBRL concept from company facts. * Traverses facts["us-gaap"][concept].units.USD */ export declare function extractConceptData(facts: SecCompanyFacts, concept: string): { concept: string; label: string; description: string; unit: string; annual: SecXbrlObservation[]; quarterly: SecXbrlObservation[]; } | null; /** * Get a summary of key financial metrics from company facts. */ export declare function summarizeFinancials(facts: SecCompanyFacts): { entityName: string; totalMetrics: number; keyMetrics: { concept: string; label: string; value: number | null; unit: string | null; period: string | null; }[]; }; /** * Get the full reported time series of a single XBRL concept for one company * (companyconcept API). Smaller and faster than getCompanyFacts when you only * need one metric, and includes the `frame` field linking to the frames API. */ export declare function getCompanyConcept(cik: string, tag: string, taxonomy?: string): Promise; /** * Get a single XBRL concept reported by every company for one calendar period * (frames API) — the basis for cross-company comparison and screening. * * Period formats: * - "CY2023" annual (calendar year, duration concept like Revenues) * - "CY2023Q1" quarterly duration * - "CY2023Q1I" instantaneous / point-in-time (balance-sheet concepts like Assets) * * Units: "USD" (default), "shares", "USD-per-shares" (e.g. EarningsPerShareBasic). */ export declare function getFrame(opts: { tag: string; period: string; taxonomy?: string; unit?: string; }): Promise; /** Clear cached responses from both clients. */ export declare function clearCache(): void; /** A company or person known to EDGAR. */ export interface EdgarEntity { cik: string; name: string; tickers: string[]; } /** * Find companies by ticker or name using EDGAR's entity search (the same * index as the EDGAR search box). Works without SEC_CONTACT_EMAIL. */ export declare function lookupCompanies(text: string, limit?: number): Promise; /** A CIK from a CIK, ticker ("AAPL", "BRK-B") or company name. */ export declare function resolveCik(input: string): Promise; /** An insider ownership filing (Form 3, 4 or 5) about a company. */ export interface InsiderFiling { form: string; filedDate: string; /** Date of the earliest reported transaction (period of report). */ transactionDate: string | null; insider: string | null; insiderCik: string | null; accessionNumber: string; /** EDGAR filing index page. */ url: string; } /** * Insider ownership filings where the company is the issuer: Form 4 * (changes in ownership) by default, or 3/5. Newest first, from EDGAR * full-text search. The transaction details are in the linked filing. */ export declare function getInsiderFilings(issuerCik: string, opts?: { forms?: string; startDate?: string; endDate?: string; limit?: number; }): Promise<{ total: number; filings: InsiderFiling[]; }>; //# sourceMappingURL=sdk.d.ts.map