Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FilingWire examples

Runnable examples for the FilingWire SEC EDGAR APIs, in curl, Python and JavaScript.

Everything here uses plain HTTP with no SDK, so it doubles as documentation for any language. If you want a Python client with pagination and typed errors built in, that is filingwire (pip install filingwire).

The two APIs

Risk API Every event-bearing 8-K, classified daily: bankruptcy, restructuring and layoffs, delisting risk, M&A, executive departures and appointments, debt acceleration, restatements, auditor changes, cyber incidents, contract changes.
Funding API Every Form D private-market fundraising filing, parsed from the filing XML: issuer, amount sold, sector, state, investor count, minimum investment.

Every record carries a source_url pointing at the filing on sec.gov.

Get a key

Free, no card, about a minute: https://filingwire.io/free One key reads both products, 1,000 requests a month.

export FILINGWIRE_API_KEY="fw_live_..."

Send it as the X-API-Key header on every request. (If you subscribed on RapidAPI instead, your key goes through their proxy as X-RapidAPI-Key.)

The examples

What it answers
curl/critical-events.sh What material events were filed this week?
curl/company-by-ticker.sh What has this ticker filed recently?
curl/large-raises.sh Who raised the most money lately?
curl/sector-filings.sh Who raised money in my sector this month?
python/critical_events.py The same, formatted for a terminal
python/portfolio_watch.py Any material events across my list of tickers?
python/funding_to_csv.py A "who just raised" CSV for a sales team
python/pagination.py How do I walk a large result set safely?
python/quota_and_retries.py How do I handle 429 and track my quota?
javascript/critical-events.mjs Node, no dependencies
javascript/portfolio-watch.mjs Node, no dependencies
notebooks/explore-8k-events.ipynb Pull events into pandas and look at the shape of the data

Running them

# curl
bash curl/critical-events.sh

# Python (requests only)
pip install -r python/requirements.txt
python python/critical_events.py

# JavaScript (Node 18+, no dependencies)
node javascript/critical-events.mjs

The response envelope

Every list endpoint returns the same shape:

{
  "items": [ ... ],
  "page": 1,
  "page_size": 50,
  "returned": 50,
  "total": 1234,
  "has_more": true
}

Paginate with page and page_size (max 100). An ingest pass inserts at the top of the newest-first list, so rows can shift while you walk. Pinning a date range helps but is not sufficient on its own, because rows arrive backdated: EDGAR publishes day D's index on D+1, so a row stored today can carry a filed_at from days ago and land inside a window you pinned before it existed. Dedupe on accession_number. See python/pagination.py, which measures the drift both ways.

Worth knowing before you build on it

  • Freshness is daily, not real-time. EDGAR publishes its index daily. Form D is checked several times a day.
  • The 8-K event type comes from the filing's own item codes on about 95% of records. The exception is a filing whose only item is the 8.01 catch-all, where a model classifies it or the row stays other.
  • Severity is a model-assigned triage score, not investment, legal or compliance advice.
  • About a third of events carry event_type: "other". On a 400-row sample that is dividends, NAV notices, shareholder meetings and buybacks, not hidden distress. Filtering to the named types means not seeing those rows.
  • Form D has no ticker field (only about 4% of Form D issuers have one), and pooled investment funds are excluded.
  • No personal data in any structured field. The one exception is the 8-K summary, which quotes the filing, so an executive-departure summary can name the executive who left. That text is verbatim from a public SEC filing.
  • On the free tier, list endpoints return the most recent 30 days. Single-company and single-filing lookups return full history on every plan, including free.
  • Live coverage figures and last ingest: /risks/v1/meta and /funding/v1/meta.

Reference

License

MIT. Use these however you like.

About

Runnable examples for the FilingWire SEC EDGAR APIs (Form D funding, classified 8-K risk events) in curl, Python and JavaScript.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages