SecioEx.ExtractorApi (secio_ex v0.1.2)

A way to look for specific sec filing fields in 10-k, 10-q, and 8-k filings.

Summary

Functions

Determines the filing type (10-K, 10-Q, or 8-K) from the URL.

Extracts a section from an SEC filing.

Validates that the requested item is valid for the filing type.

Validates the return type (text or html).

Functions

determine_filing_type(url)

Determines the filing type (10-K, 10-Q, or 8-K) from the URL.

extract(url, item, opts \\ [])

Extracts a section from an SEC filing.

Parameters

  • url: URL of the SEC filing
  • item: Section item to extract
  • opts: Additional options including :api_key and :type

Examples

# Extract Risk Factors (Item 1A) from a 10-K filing
iex> SecioEx.ExtractorApi.extract(
  "https://www.sec.gov/.../tsla-10k_20201231.htm",
  "1A",
  api_key: "your_api_key"
)
{:ok, "Risk Factors content..."}

# Extract with HTML formatting
iex> SecioEx.ExtractorApi.extract(
  "https://www.sec.gov/.../aapl-20210327.htm",
  "8",
  api_key: "your_api_key",
  type: "html"
)
{:ok, "<html>Financial Statements content...</html>"}

validate_item(filing_type, item)

Validates that the requested item is valid for the filing type.

validate_return_type(type)

Validates the return type (text or html).