DEV Community

Jaroslav Šmarda
Jaroslav Šmarda

Posted on

Free, Unrestricted, and Almost as Easy: Reading SEC Filings with a Prompt

Python for programmers, prompts for data analysts.

Every article in this series has leaned on one server: EODHD. But the underlying numbers — revenue, profit, shares outstanding — don't originate there. They come from a company's own filings to the SEC, published for free, for anyone, the moment they're submitted.

So here's a natural question: could we skip the middleman entirely, and just ask the source?

Turns out, mostly yes.

New here? The Setup covers everything you need before your first prompt.

Ask the source directly
🟧 PROMPT

Fetch data.sec.gov/api/xbrl/companyfacts/CIK0001018724.json for Amazon and tell me their most recent annual revenue.

Amazon's CIK (Central Index Key) is 1018724 — padded to 10 digits for the URL. Fetching that page returns a single JSON document containing every financial fact Amazon has disclosed to the SEC since it started filing electronically: shares outstanding, accounts payable, revenue, and hundreds more, each as a full time series stretching back years.

No login, no API key, no special header required to read it — the page opened on the first request.

No MCP server. No Docker. Not even a signup. The exact same government database that powers every "10-K" citation you've ever seen in a finance article is sitting behind a plain URL, and Claude can just fetch it — the same way it's fetched news articles and pricing pages throughout this series.

Pull a real number
🟧 PROMPT

From that data, what was Amazon's most recent quarterly accounts receivable balance?

The most recent figure in the file: $88.09 billion, for the quarter ending June 30, 2026, filed August 1, 2026. The same concept — "AccountsReceivableNetCurrent" — stretches back to 2008, so you can trace the exact same line item across nearly two decades in one file.

That's the pattern for anything company-wide: revenue, cash, debt, shares outstanding — one concept name, one flat time series, every quarter and every year a company has filed, going back as far as their electronic records exist. No parsing a PDF, no scraping a table out of a press release. It's already structured, and it's already sitting there.

Ask for the one thing it can't give you
🟧 PROMPT

From that same file, break out Amazon's revenue by segment — AWS, North America, and International.

Looking through the file, revenue is there — but only as one number per period, the company-wide total. There's no "AWS revenue" or "North America revenue" concept in this list. The segment breakdown genuinely exists in Amazon's 10-K — it's just not in this particular document.

That's the wall. Everything company-wide — one number per concept, per quarter, forever — comes through cleanly. But a segment split isn't a company-wide fact; it's a number tied to which part of the business it belongs to, and that extra dimension doesn't travel through this endpoint. The data hasn't vanished. It's just filed under a different door than the one we just walked through.

A word of honesty
Two things worth being precise about, and they cut in opposite directions.

First, the good news is real: anything company-wide — revenue, cash, debt, shares outstanding, hundreds of concepts — comes through a plain URL, no signup, no key, no rate-limit dance. That's rarer than it sounds; most financial APIs gate at least some of this behind a paid tier. SEC EDGAR doesn't, because it's not a product — it's a public record.

Second, "no MCP server needed" only holds for exactly this kind of question — one concept, one company, over time. The moment you want something structurally different, like a segment split, you've left the territory this endpoint covers. That's not a flaw in the API; it's a reminder that "free and unrestricted" and "covers everything you might want" are different promises, and this only makes the first one.

So: a genuinely good tool for the numbers a company reports about itself as a whole — and a dead end, at least here, for the numbers it reports about its parts. As always: not investment advice.

Final Thoughts
This one sits outside the main numbered series — a detour to check something the series has leaned on all along without ever looking directly at it: the government record every EODHD number ultimately traces back to.

Two prompts got us company-wide facts going back nearly two decades, no setup beyond a URL. A third hit a wall the moment we asked for something structural instead of company-wide.

So here's where this leaves things: SEC EDGAR is as open as data gets — free, unrestricted, no key, no rate-limit dance — and it will answer almost any question about a company as a whole. Ask about its parts, and you've asked a different kind of question than this endpoint was built to answer. That's not a flaw to work around. It's the shape of the thing, worth knowing before you go looking for it.

Top comments (0)