SecioEx.ExtractorApi (secio_ex v0.1.3)

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 (required): Your SEC API key
    • :type (optional): Return format, either :text or :html (default: :text)
    • :force_filing_type (optional): Force the filing type, must be one of "10-K", "10-Q", or "8-K"

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 and forced filing type
iex> SecioEx.ExtractorApi.extract(
  "https://www.sec.gov/.../example.htm",
  "1-1",
  api_key: "your_api_key",
  type: "html",
  force_filing_type: "8-K"
)
{:ok, "<html>Filing 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).