Get Alerts for New SEC Filings

Build SEC filing alerts from EDGAR's free feeds: a declared User-Agent, one cron job, and Magpie for the fetch. Every command here ran against sec.gov.

MMotherlode Lab9 min read
Magpie title card: Get Alerts for New SEC Filings

Apple filed an 8-K/A at 4:30:35pm ET on September 1, 2026; the SEC emailed nobody, and EDGAR has no notify button to fix that. The services that sell SEC filing alerts charge monthly for what three free endpoints already give away. Every command in this guide ran against sec.gov on October 31, 2026, and the whole setup costs one cron entry.

The pieces: a per-company Atom feed you can filter by form type, a JSON dump of a company’s last 1,000 filings, and a full-text search API that covers filings since 2001. Fetch, diff, notify. You need three tools: Magpie for the fetch, jq for the JSON, and any cron.

The rules EDGAR sets first

Two rules govern all three endpoints, and both come from SEC’s own pages:

  1. Declare your traffic. Requests need a User-Agent like Jane Doe [email protected]: your name and a real contact. Undeclared clients get served a block page titled “Your Request Originates from an Undeclared Automated Tool”. That page loads with a 200 status, which is its own trap; more on that in Step 2.
  2. Stay under 10 requests per second. The block page states the ceiling: “no more than 10 requests per second, regardless of the number of machines used”. A monitor checking every 5 minutes is roughly 288 requests a day. Nowhere near the limit.

That’s the whole compliance burden. No API key, no account, no terms-gate.

The three free surfaces

Surface URL shape Best for Format
Company filing feed browse-edgar?...&output=atom One company, filtered by form type, near-real-time Atom XML
Submissions dump data.sec.gov/submissions/CIK##########.json One company, every form including Form 4 JSON
Full-text search efts.sec.gov/LATEST/search-index?q=... Keywords across all filers since 2001 JSON

The Atom feed is the alert surface for most people: it carries only the form types you ask for, and its <updated> timestamps are acceptance times, so a poll every few minutes trails the filing by minutes. The submissions dump is the everything-firehose for one company. Full-text search answers a different question (“who mentioned anything about data brokers this week”), and Step 4 wires it up.

Step 1: Build your company feed URL

The feed endpoint accepts a ticker or a CIK. This one is Apple’s 8-K feed, and it worked as written:

https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=aapl&type=8-K&dateb=&owner=include&count=10&output=atom

CIK=aapl accepts the ticker symbol or the 10-digit padded CIK. type= filters by form. count= sets how many entries come back. Swap in your company and your form of interest: type=10-K for annual reports, type=4 for insider trades, type=8-K for the surprise box.

One verified gotcha: the type filter matches by prefix. I fetched Apple with type=10 and got 10-Qs and 10-Ks in the same feed; the first eight entries alone held six quarterlies and two annuals. So type=10 means “10-anything” and will double your noise. type=10-K is precise and, helpfully, still catches amendments like 10-K/A, which you almost always want to see anyway.

Step 2: Fetch with a declared User-Agent

Here’s the failure mode, caught on my first attempt. I pointed Magpie v0.1.32 at the feed with its default User-Agent and got back exit code 0 and a page that parsed perfectly. The page was SEC block text:

title: "SEC.gov | Your Request Originates from an Undeclared Automated Tool"

No error, no 403, no crash. A scraper that trusts exit codes would store that stub as if it were data. Always check the title of what you fetched from sec.gov; the block page announces itself.

The fix is one flag. Magpie’s scrape accepts raw headers, and --page-format raw writes the exact response body to a file, no cleaning, no JSON envelope:

magpie scrape "https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=aapl&type=8-K&dateb=&owner=include&count=10&output=atom" \
  --header "User-Agent: Jane Doe [email protected]" \
  --page-format raw --out today.atom

The file is the untouched Atom XML. Each filing is one <entry> block with the fields an alert actually needs:

<entry>
  <content type="text/xml">
    <accession-number>0001140361-26-035325</accession-number>
    <filing-date>2026-09-01</filing-date>
    <filing-href>https://www.sec.gov/Archives/edgar/data/320193/000114036126035325/0001140361-26-035325-index.htm</filing-href>
    <filing-type>8-K/A</filing-type>
    <items-desc>item 5.02</items-desc>
  </content>
  <title>8-K/A [Amend]  - Current report</title>
  <updated>2026-09-01T16:30:35-04:00</updated>
</entry>

Real block from the live feed, trimmed. That entry is Apple’s September 8-K/A amendment, the Item 5.02 officer-departure filing, accepted at 4:30:35pm ET.

Step 3: Turn the feed into an SEC filing alert

The script below is the whole monitor. It fetches, guards against the stub, reduces the feed to three lines per filing, and POSTs the diff when anything new lands:

#!/usr/bin/env bash
set -euo pipefail

UA="Jane Doe [email protected]"   # your name and real email — SEC asks for this
FEED="https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=aapl&type=8-K&dateb=&owner=include&count=10&output=atom"
HOOK="${SEC_HOOK:-https://ntfy.sh/my-private-topic}"
DIR="$HOME/.sec-alerts/apple-8k"

mkdir -p "$DIR" && cd "$DIR"
magpie scrape "$FEED" --header "User-Agent: $UA" --page-format raw --out new.atom

if grep -q "Undeclared Automated Tool" new.atom; then
  echo "SEC block page — check your User-Agent" >&2
  exit 1
fi

grep -E "<filing-date>|<filing-type>|<filing-href>" new.atom | sed 's/^[[:space:]]*//' > new.txt

if [[ ! -f old.txt ]]; then
  mv new.txt old.txt                        # first run: store the baseline, alert on nothing
elif ! cmp -s old.txt new.txt; then
  diff -u old.txt new.txt | curl -s --data-binary @- "$HOOK"
  mv new.txt old.txt
fi

Save it, chmod +x it, run it once by hand (that’s the baseline), and put it in cron:

*/5 * * * * $HOME/.sec-alerts/apple-8k/check.sh >> $HOME/.sec-alerts/apple-8k/check.log 2>&1

Five-minute polling trails a filing by at most five minutes plus delivery, which beats every free tier of the hosted page-watchers and costs EDGAR 288 polite requests a day. The webhook payload is a unified diff, so a new filing reads like this:

+++ new.txt
+<filing-date>2026-11-02</filing-date>
+<filing-href>https://www.sec.gov/Archives/edgar/data/320193/...-index.htm</filing-href>
+<filing-type>8-K</filing-type>

(Expected shape: a real diff waits for a real filing, but every line above comes straight from the feed’s grammar.) Point SEC_HOOK at ntfy for a phone push, a Slack incoming webhook, or your own receiver. If you want the richer item-level filtering pattern (seen-sets, URL extraction, dedupe), the same design is walked through line by line in the RSS feed monitor guide.

Why not magpie watch?

It’s the obvious tool and the wrong one here. Watch polls, snapshots, and diffs, which is exactly this article’s loop, but it has no way to send a custom User-Agent. Its flags are --every, --once, --render, --lang, and --webhook; there is no --header anywhere, and no profile support either.

I verified what happens anyway, with two single-shot checks against Apple’s feed using the default User-Agent. The first stored the block page as the baseline and exited silently. Thirty-nine seconds later, the second fired:

changed=true old=9f2821e9… new=d41513dd…
- 0.a570e731.1793456586.a03d0ae
+ 0.a570e731.1793456625.a043606

That’s the block page’s rotating Akamai Reference ID. It changes on every request, so watch would report a “change” on every single check, forever, and the diff would never contain a filing. A false alarm machine with a perfect uptime record.

One more finding for completeness: magpie scrape --render browser does get the real feed; the headless browser’s request clears SEC’s filter. I’m not going to recommend it. SEC explicitly asks automated traffic to declare itself, this is a free government API, and the workaround buys you an undisclosed-scraping habit for zero benefit over a --header flag that already exists. Declare your traffic; it’s one line.

Watch remains the right tool on ordinary feeds, which is most of them; that’s the RSS feed monitor guide. EDGAR just isn’t one.

Step 4: Keyword alerts across every filer

The company feed answers “did Apple file?” Full-text search answers “did anyone file something mentioning X?” That covers “alert me when a competitor files a patent-adjacent 8-K” and “tell me when anybody writes ‘data broker’ into a filing”. The endpoint is keyless and takes the same declared User-Agent:

curl -s -H "User-Agent: Jane Doe [email protected]" \
  "https://efts.sec.gov/LATEST/search-index?q=%22data%20broker%22&dateRange=custom&startdt=2026-10-27&enddt=2026-10-31" \
| jq -r '.hits.hits[]._source | "\(.file_date)  \(.form)  \(.display_names[0])"'

My run on October 31 returned exactly one filing:

2026-10-30  PREM14A  Priority Technology Holdings, Inc.  (PRTH, PRTHU)  (CIK 0001653558)

A preliminary merger proxy, filed the day before, containing the phrase “data broker”. Quote multi-word queries (%22...%22) or you’ll get the OR-everything expansion. SEC’s search page describes the corpus as “the full text of electronic filings since 2001”, so this is deep coverage, not a recent-filing-only index. For a keyword alert, wrap the same query in a daily cron with startdt/enddt set to yesterday, and jq’s output goes straight into your notification. The corpus here is regulatory; the same cron-plus-diff pattern also drives Hacker News alerts when the corpus is social.

Step 5: The everything-feed for one company

The submissions API is one GET that returns a company’s 1,000 most recent filings, every form type included: the Form 4 insider trades the browse feed makes you query separately are in here. The CIK must be 10-digit padded:

curl -s -H "User-Agent: Jane Doe [email protected]" \
  "https://data.sec.gov/submissions/CIK0000320193.json" \
| jq -r '.filings.recent | [.filingDate, .form, .accessionNumber] | transpose[] | @tsv' | head -3
2026-10-29    4    0001140361-26-041201
2026-10-22    4    0001140361-26-040540
2026-10-19    4    0001140361-26-040127

Real output, trimmed to three rows: Apple’s three most recent filings as of October 31 were all Form 4s, the newest filed October 29. The record also carries primaryDocument (the actual file path), items, and a company header with tickers and exchange. Because this endpoint changes on any filing, it suits an “everything this company touches” alert. Run the same diff pattern against it and you’ve got the insider-trading flow for free. EDGAR is the polite end of finance data; the wider alternative-data toolkit lives in the finance scraping guide.

What this setup won’t do

  • No push. This polls on a schedule. Minutes of lag, not seconds. If you need sub-minute alerts on filings, nothing keyless and free offers that, and most people don’t need it.
  • No history alerts. The feed serves recent entries, and the submissions dump stops at 1,000 filings. Alerting on old filings isn’t a thing; use full-text search with a wide date range instead.
  • One diff per check, not per filing. Three filings landing between polls is one webhook whose diff holds all three. The receiver in the RSS monitor guide splits them.
  • No convenience. If you won’t run a cron, KFilings sends free email alerts for registrants and filing types you pick (built by a law professor, no affiliation), and generic page-watchers like Visualping or PageCrawl will watch EDGAR pages on paid tiers, the same job the free pattern in competitor website monitoring does. BamSEC covers the professional end. All of them are polling EDGAR’s surfaces on your behalf.

FAQ

Are SEC filing alerts free? Yes. All three EDGAR endpoints are keyless, and the only requirements are a declared User-Agent and staying under 10 requests per second. The script above costs nothing to run, and Magpie’s CLI is free to download with no per-run metering in the terminal.

How fast do the alerts arrive? The feed’s <updated> timestamp is the SEC’s acceptance time for the filing. With a 5-minute cron, your worst-case lag is five minutes plus webhook delivery. That’s faster than daily-digest services and free.

Does EDGAR have RSS feeds? Yes: the per-company output=atom feed is the RSS. The full-text search API stays JSON though: I tested appending output=atom to the search endpoint and got the plain JSON response back, unchanged.

Will the SEC block my monitor? Not at 288 requests a day. The published ceiling is 10 requests per second; a 5-minute cron runs thousands of times below it. If you ever see the “Undeclared Automated Tool” page, the cause is almost always the User-Agent, not the volume.

Can I watch multiple companies? Loop the script over a list of feed URLs with sleep 2 between fetches. Two-second spacing keeps you far under the rate ceiling and turns 20 companies into a 40-second pass per check.

Stop renting credits.

One flat price, your machine, your keys.

Download free for Windows, macOS and Linux

Windows · macOS · Linux $49/mo flat, cancel anytime