Unified power-user entry point for edgarjure. Require as: (require '[edgar.api :as e])
Design principles:
Unified power-user entry point for edgarjure. Require as: (require '[edgar.api :as e]) Design principles: - Every function accepts ticker or CIK interchangeably - Keyword args throughout; no positional form/type args - Sensible defaults for taxonomy (us-gaap), unit (USD), form (10-K) - :concept accepts a string or a collection of strings - Functions that return datasets always return tech.ml.dataset, never seq-of-maps
(balance ticker-or-cik
&
{:keys [form shape as-of] :or {form "10-K" shape :long}})Return balance sheet as a long-format tech.ml.dataset. Options: :form - "10-K" (default) or "10-Q" :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, only filings where :filed <= as-of-date are used (point-in-time / look-ahead-safe mode).
Return balance sheet as a long-format tech.ml.dataset.
Options:
:form - "10-K" (default) or "10-Q"
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, only filings where :filed <= as-of-date are used
(point-in-time / look-ahead-safe mode).(cashflow ticker-or-cik
&
{:keys [form shape as-of] :or {form "10-K" shape :long}})Return cash flow statement as a long-format tech.ml.dataset. Options: :form - "10-K" (default) or "10-Q" :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, only filings where :filed <= as-of-date are used (point-in-time / look-ahead-safe mode).
Return cash flow statement as a long-format tech.ml.dataset.
Options:
:form - "10-K" (default) or "10-Q"
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, only filings where :filed <= as-of-date are used
(point-in-time / look-ahead-safe mode).(cik ticker-or-cik)Resolve a ticker to a zero-padded 10-digit CIK string, or normalise a CIK. (e/cik "AAPL") => "0000320193"
Resolve a ticker to a zero-padded 10-digit CIK string, or normalise a CIK. (e/cik "AAPL") => "0000320193"
(company ticker-or-cik)Return full SEC submissions metadata map for a company. Accepts ticker or CIK.
Return full SEC submissions metadata map for a company. Accepts ticker or CIK.
(company-metadata ticker-or-cik)Return a shaped metadata map for a company. Richer than (e/company ...). Extracts SIC, exchanges, addresses, fiscal year end, EIN, phone, website, former names, and more from the SEC submissions endpoint. Accepts ticker or CIK.
Example: (e/company-metadata "AAPL") ;=> {:cik "0000320193" :name "Apple Inc." :tickers ["AAPL"] ; :exchanges ["Nasdaq"] :sic "3571" ; :sic-description "Electronic Computers" ; :entity-type "operating" :category "Large accelerated filer" ; :state-of-inc "CA" :fiscal-year-end "0926" ; :ein "942404110" :phone "(408) 996-1010" ; :addresses {:business {:street1 ... :city ... :state ... :zip ...} ; :mailing {:street1 ... :city ... :state ... :zip ...}} ; :former-names []}
Return a shaped metadata map for a company. Richer than (e/company ...).
Extracts SIC, exchanges, addresses, fiscal year end, EIN, phone, website,
former names, and more from the SEC submissions endpoint.
Accepts ticker or CIK.
Example:
(e/company-metadata "AAPL")
;=> {:cik "0000320193" :name "Apple Inc." :tickers ["AAPL"]
; :exchanges ["Nasdaq"] :sic "3571"
; :sic-description "Electronic Computers"
; :entity-type "operating" :category "Large accelerated filer"
; :state-of-inc "CA" :fiscal-year-end "0926"
; :ein "942404110" :phone "(408) 996-1010"
; :addresses {:business {:street1 ... :city ... :state ... :zip ...}
; :mailing {:street1 ... :city ... :state ... :zip ...}}
; :former-names []}(company-name ticker-or-cik)Return the company name string for a ticker or CIK.
Return the company name string for a ticker or CIK.
(concepts ticker-or-cik)Return a dataset of all XBRL concepts available for a company. Columns: :taxonomy :concept :label :description Each row is one distinct concept — use this to discover what data is available. Example: (e/concepts "AAPL")
Return a dataset of all XBRL concepts available for a company. Columns: :taxonomy :concept :label :description Each row is one distinct concept — use this to discover what data is available. Example: (e/concepts "AAPL")
(daily-filings date & {:keys [form filter-fn]})Return a lazy seq of all filings submitted on a given date.
date — a java.time.LocalDate or a "YYYY-MM-DD" string. Options: :form — filter by form type e.g. "10-K" "8-K" "4" :filter-fn — arbitrary predicate applied to each result map
Lazily pages through the EFTS search-index (100 per page). Typical trading day: ~1,000–2,000 filings; busy days up to ~6,000.
Each result map has: :accessionNumber — dashed accession number (use with e/filing-by-accession) :form — form type string :filingDate — "YYYY-MM-DD" :cik — zero-padded 10-digit CIK (first filer) :companyName — display name (may include ticker in parens) :periodOfReport — "YYYY-MM-DD" or nil :items — vector of 8-K item strings (or empty)
Examples: ;; All filings on a date (e/daily-filings "2026-03-10")
;; Only 8-Ks (e/daily-filings "2026-03-10" :form "8-K")
;; 10-Ks filed by large-cap tech (filter by known CIKs) (e/daily-filings "2026-03-10" :form "10-K" :filter-fn #(= (:cik %) "0000320193"))
;; Works with java.time.LocalDate too (e/daily-filings (java.time.LocalDate/of 2026 3 10))
Return a lazy seq of all filings submitted on a given date.
date — a java.time.LocalDate or a "YYYY-MM-DD" string.
Options:
:form — filter by form type e.g. "10-K" "8-K" "4"
:filter-fn — arbitrary predicate applied to each result map
Lazily pages through the EFTS search-index (100 per page).
Typical trading day: ~1,000–2,000 filings; busy days up to ~6,000.
Each result map has:
:accessionNumber — dashed accession number (use with e/filing-by-accession)
:form — form type string
:filingDate — "YYYY-MM-DD"
:cik — zero-padded 10-digit CIK (first filer)
:companyName — display name (may include ticker in parens)
:periodOfReport — "YYYY-MM-DD" or nil
:items — vector of 8-K item strings (or empty)
Examples:
;; All filings on a date
(e/daily-filings "2026-03-10")
;; Only 8-Ks
(e/daily-filings "2026-03-10" :form "8-K")
;; 10-Ks filed by large-cap tech (filter by known CIKs)
(e/daily-filings "2026-03-10" :form "10-K"
:filter-fn #(= (:cik %) "0000320193"))
;; Works with java.time.LocalDate too
(e/daily-filings (java.time.LocalDate/of 2026 3 10))(exhibit filing-map exhibit-type)Return the first exhibit matching exhibit-type (e.g. "EX-21"). Returns nil if no matching exhibit is found.
Common exhibit types: "EX-21" — subsidiaries list "EX-23" — auditor consent "EX-31.1" — CEO Sarbanes-Oxley certification "EX-31.2" — CFO Sarbanes-Oxley certification "EX-32" — Section 906 certifications
Example: (def f (e/filing "AAPL" :form "10-K")) (def ex (e/exhibit f "EX-21")) (e/filing-document f (:name ex))
Return the first exhibit matching exhibit-type (e.g. "EX-21"). Returns nil if no matching exhibit is found. Common exhibit types: "EX-21" — subsidiaries list "EX-23" — auditor consent "EX-31.1" — CEO Sarbanes-Oxley certification "EX-31.2" — CFO Sarbanes-Oxley certification "EX-32" — Section 906 certifications Example: (def f (e/filing "AAPL" :form "10-K")) (def ex (e/exhibit f "EX-21")) (e/filing-document f (:name ex))
(exhibits filing-map)Return all exhibit entries from a filing's index as a seq of maps. Each map has :name :type :document :description :sequence. Exhibits have :type values beginning with "EX-" (e.g. "EX-21", "EX-31.1").
Example: (def f (e/filing "AAPL" :form "10-K")) (e/exhibits f) ;=> ({:type "EX-21" :name "aapl-20230930_g2.htm" :description "Subsidiaries" ...} ...)
Fetch an exhibit's content: (let [ex (e/exhibit f "EX-21")] (e/filing-document f (:name ex)))
Return all exhibit entries from a filing's index as a seq of maps.
Each map has :name :type :document :description :sequence.
Exhibits have :type values beginning with "EX-" (e.g. "EX-21", "EX-31.1").
Example:
(def f (e/filing "AAPL" :form "10-K"))
(e/exhibits f)
;=> ({:type "EX-21" :name "aapl-20230930_g2.htm" :description "Subsidiaries" ...} ...)
Fetch an exhibit's content:
(let [ex (e/exhibit f "EX-21")]
(e/filing-document f (:name ex)))(facts ticker-or-cik & {:keys [concept form]})Fetch XBRL company facts as a tech.ml.dataset. Options: :concept - string or collection of strings to filter concepts :form - "10-K" | "10-Q" (default: no filter) Example: (e/facts "AAPL") (e/facts "AAPL" :concept "Assets") (e/facts "AAPL" :concept ["Assets" "NetIncomeLoss"] :form "10-K")
Fetch XBRL company facts as a tech.ml.dataset. Options: :concept - string or collection of strings to filter concepts :form - "10-K" | "10-Q" (default: no filter) Example: (e/facts "AAPL") (e/facts "AAPL" :concept "Assets") (e/facts "AAPL" :concept ["Assets" "NetIncomeLoss"] :form "10-K")
(filing ticker-or-cik
&
{:keys [form n include-amends?]
:or {form "10-K" n 0 include-amends? false}})Return the latest filing of a given form type for a company. Options: :form - form type string (default "10-K") :n - return the nth latest (0-indexed, default 0) :include-amends? - include amended filings (default false)
Return the latest filing of a given form type for a company. Options: :form - form type string (default "10-K") :n - return the nth latest (0-indexed, default 0) :include-amends? - include amended filings (default false)
(filing-by-accession accession-number)Hydrate a filing map from an accession number string. Accepts dashed format: "XXXXXXXXXX-YY-ZZZZZZ" Returns a filing map ready for e/html, e/text, e/items, e/obj, etc. Example: (e/filing-by-accession "0000320193-23-000106")
Hydrate a filing map from an accession number string. Accepts dashed format: "XXXXXXXXXX-YY-ZZZZZZ" Returns a filing map ready for e/html, e/text, e/items, e/obj, etc. Example: (e/filing-by-accession "0000320193-23-000106")
(filings ticker-or-cik
&
{:keys [form start-date end-date limit include-amends?]
:or {include-amends? false}})Return a lazy seq of filing metadata maps for a company. Options: :form - form type string e.g. "10-K" "10-Q" "8-K" "4" :start-date - "YYYY-MM-DD" :end-date - "YYYY-MM-DD" :limit - max results :include-amends? - include amended filings e.g. 10-K/A (default false)
Return a lazy seq of filing metadata maps for a company. Options: :form - form type string e.g. "10-K" "10-Q" "8-K" "4" :start-date - "YYYY-MM-DD" :end-date - "YYYY-MM-DD" :limit - max results :include-amends? - include amended filings e.g. 10-K/A (default false)
(filings-dataset ticker-or-cik & opts)Return a filing index for a company as a tech.ml.dataset. Same options as e/filings.
Return a filing index for a company as a tech.ml.dataset. Same options as e/filings.
(financials ticker-or-cik
&
{:keys [form shape as-of] :or {form "10-K" shape :long}})Return all three financial statements for a company. Returns {:income ds :balance ds :cashflow ds} Options: :form - "10-K" (default) or "10-Q" :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). All three statements use point-in-time deduplication.
Return all three financial statements for a company.
Returns {:income ds :balance ds :cashflow ds}
Options:
:form - "10-K" (default) or "10-Q"
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
All three statements use point-in-time deduplication.(frame concept
period
&
{:keys [taxonomy unit] :or {taxonomy "us-gaap" unit "USD"}})Fetch cross-sectional data for a concept across all companies for a period. Returns a tech.ml.dataset sorted by :val descending. Required: concept - GAAP concept string e.g. "Assets" "NetIncomeLoss" period - frame string e.g. "CY2023Q4I" "CY2023" Options: :taxonomy - default "us-gaap" :unit - default "USD" Example: (e/frame "Assets" "CY2023Q4I") (e/frame "SharesOutstanding" "CY2023Q4I" :unit "shares")
Fetch cross-sectional data for a concept across all companies for a period. Returns a tech.ml.dataset sorted by :val descending. Required: concept - GAAP concept string e.g. "Assets" "NetIncomeLoss" period - frame string e.g. "CY2023Q4I" "CY2023" Options: :taxonomy - default "us-gaap" :unit - default "USD" Example: (e/frame "Assets" "CY2023Q4I") (e/frame "SharesOutstanding" "CY2023Q4I" :unit "shares")
(html filing-map)Fetch the primary HTML document of a filing as a string.
Fetch the primary HTML document of a filing as a string.
(income ticker-or-cik
&
{:keys [form shape as-of] :or {form "10-K" shape :long}})Return income statement as a long-format tech.ml.dataset. Options: :form - "10-K" (default) or "10-Q" :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, only filings where :filed <= as-of-date are used (point-in-time / look-ahead-safe mode).
Return income statement as a long-format tech.ml.dataset.
Options:
:form - "10-K" (default) or "10-Q"
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, only filings where :filed <= as-of-date are used
(point-in-time / look-ahead-safe mode).(init! name-and-email)Set the SEC User-Agent identity required for all HTTP requests. Must be called once before any other function. Example: (e/init! "Your Name your@email.com")
Set the SEC User-Agent identity required for all HTTP requests. Must be called once before any other function. Example: (e/init! "Your Name your@email.com")
(item filing-map item-id)Extract a single item section from a filing. Returns text string or nil. (e/item f "7") => MD&A text
Extract a single item section from a filing. Returns text string or nil. (e/item f "7") => MD&A text
(items filing-map & {:keys [only remove-tables?] :or {remove-tables? false}})Extract item sections from a filing as a map of item-id → text string. Options: :only - set of item ids to extract e.g. #{"7" "1A"} (default all) :remove-tables? - strip numeric tables before extraction (default false)
Extract item sections from a filing as a map of item-id → text string.
Options:
:only - set of item ids to extract e.g. #{"7" "1A"} (default all)
:remove-tables? - strip numeric tables before extraction (default false)(latest-effective-filing ticker-or-cik & {:keys [form] :or {form "10-K"}})Return the most recent effective filing for a company and form type. If an amendment (e.g. 10-K/A) is newer than the original, it is returned instead. Options: :form - form type string (default "10-K")
Return the most recent effective filing for a company and form type. If an amendment (e.g. 10-K/A) is newer than the original, it is returned instead. Options: :form - form type string (default "10-K")
(obj filing-map)Parse a filing into a structured form-specific map via filing-obj multimethod. Dispatches on :form. Requires form-specific parsers to be loaded, e.g.: (require '[edgar.forms.form4])
Parse a filing into a structured form-specific map via filing-obj multimethod. Dispatches on :form. Requires form-specific parsers to be loaded, e.g.: (require '[edgar.forms.form4])
(panel tickers & {:keys [concept form as-of] :or {form "10-K"}})Fetch XBRL facts for multiple companies and combine into a long-format dataset. Adds a :ticker column. Options: :concept - string or collection of strings (default all concepts) :form - "10-K" (default) or "10-Q" :as-of - "YYYY-MM-DD" string; point-in-time filter — excludes filings submitted after this date and deduplicates per [ticker concept end] keeping the most recently filed observation available at that date Example: (e/panel ["AAPL" "MSFT" "GOOG"] :concept ["Assets" "NetIncomeLoss"]) (e/panel ["AAPL" "MSFT"] :concept "Assets" :as-of "2022-01-01")
Fetch XBRL facts for multiple companies and combine into a long-format dataset.
Adds a :ticker column.
Options:
:concept - string or collection of strings (default all concepts)
:form - "10-K" (default) or "10-Q"
:as-of - "YYYY-MM-DD" string; point-in-time filter — excludes filings submitted
after this date and deduplicates per [ticker concept end] keeping the
most recently filed observation available at that date
Example:
(e/panel ["AAPL" "MSFT" "GOOG"] :concept ["Assets" "NetIncomeLoss"])
(e/panel ["AAPL" "MSFT"] :concept "Assets" :as-of "2022-01-01")(pivot ds)Pivot a long-format facts dataset to wide format. Rows = :end (period), columns = :concept, values = :val. Returns a tech.ml.dataset.
Pivot a long-format facts dataset to wide format. Rows = :end (period), columns = :concept, values = :val. Returns a tech.ml.dataset.
(save! filing-map dir)Download a filing's primary document to a directory. Returns the saved file path.
Download a filing's primary document to a directory. Returns the saved file path.
(save-all! filing-map dir)Download all documents in a filing to a directory. Returns a seq of saved file paths.
Download all documents in a filing to a directory. Returns a seq of saved file paths.
(search query & {:keys [limit] :or {limit 10}})Search EDGAR for companies matching a name query. Options: :limit - max results (default 10)
Search EDGAR for companies matching a name query. Options: :limit - max results (default 10)
(search-filings query
&
{:keys [forms start-date end-date limit] :or {limit 10}})Full-text search across EDGAR filings. Options: :forms - vector of form types e.g. ["10-K" "10-Q"] :start-date - "YYYY-MM-DD" :end-date - "YYYY-MM-DD" :limit - max results (default 10)
Full-text search across EDGAR filings. Options: :forms - vector of form types e.g. ["10-K" "10-Q"] :start-date - "YYYY-MM-DD" :end-date - "YYYY-MM-DD" :limit - max results (default 10)
(tables filing-map
&
{:keys [nth min-rows min-cols] :or {min-rows 2 min-cols 2}})Extract HTML tables from a filing as a seq of tech.ml.dataset objects.
Options: :nth — return only the nth table (0-indexed); returns a single dataset or nil :min-rows — only include tables with at least this many data rows (default 2) :min-cols — only include tables with at least this many columns (default 2)
Layout and navigation tables (single-column, <2 data rows) are filtered out. Column names come from the first substantive row; duplicates are suffixed _1, _2, etc. Numeric columns are auto-detected: commas stripped, parentheses → negative.
Examples: (def f (e/filing "AAPL" :form "10-K"))
;; All data tables (e/tables f)
;; Only substantial tables (e/tables f :min-rows 5)
;; Specific table by index (e/tables f :nth 0) (e/tables f :nth 2)
Extract HTML tables from a filing as a seq of tech.ml.dataset objects. Options: :nth — return only the nth table (0-indexed); returns a single dataset or nil :min-rows — only include tables with at least this many data rows (default 2) :min-cols — only include tables with at least this many columns (default 2) Layout and navigation tables (single-column, <2 data rows) are filtered out. Column names come from the first substantive row; duplicates are suffixed _1, _2, etc. Numeric columns are auto-detected: commas stripped, parentheses → negative. Examples: (def f (e/filing "AAPL" :form "10-K")) ;; All data tables (e/tables f) ;; Only substantial tables (e/tables f :min-rows 5) ;; Specific table by index (e/tables f :nth 0) (e/tables f :nth 2)
(text filing-map)Fetch the primary document of a filing as plain text (HTML stripped).
Fetch the primary document of a filing as plain text (HTML stripped).
(xbrl-docs filing-map)Return all XBRL-related document entries from a filing's index as a seq of maps. Covers EX-101.* linkbases: instance (.xml), schema (.xsd), calculation, label, presentation, and definition linkbases.
Example: (def f (e/filing "AAPL" :form "10-K")) (e/xbrl-docs f) ;=> ({:type "EX-101.SCH" :name "aapl-20230930.xsd" ...} ; {:type "EX-101.CAL" :name "aapl-20230930_cal.xml" ...} ...)
Return all XBRL-related document entries from a filing's index as a seq of maps.
Covers EX-101.* linkbases: instance (.xml), schema (.xsd), calculation,
label, presentation, and definition linkbases.
Example:
(def f (e/filing "AAPL" :form "10-K"))
(e/xbrl-docs f)
;=> ({:type "EX-101.SCH" :name "aapl-20230930.xsd" ...}
; {:type "EX-101.CAL" :name "aapl-20230930_cal.xml" ...} ...)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |