Blog · 2026-10-23

OpenInsider API: Get Its Insider Trading Data as JSON

OpenInsider API: Get Its Insider Trading Data as JSON
Same Rapport Therapeutics Form 4s, two routes: scraped HTML strings on the left, parsed JSON on the right.

I think OpenInsider is the best free insider trading site on the web. It also has no API.

So if you want its data in code, you have two real choices: scrape the HTML tables, or pull the same SEC Form 4 filings as JSON from an OpenInsider API alternative. I tested both on the same trades on October 23, 2026. Every dollar value matched. Share counts, ownership and cluster totals sometimes didn't, and each mismatch had a specific cause.

Key takeaway: OpenInsider has no API. You can scrape its tables with about 10 lines of Python, or pull the same SEC Form 4 data as JSON. On the same trades every dollar value matched, but OpenInsider merges multi-line trades, can combine direct and indirect ownership, and adds price returns a Form 4 API does not have.

Does OpenInsider have an API?

No. OpenInsider has no official API and no documented JSON endpoint. Every "OpenInsider API" you find is one of three things: a scraper that reads its HTML tables, a hosted scraper you pay per record (one Apify actor charges from $50 per 1,000 Form 4 records), or an API that parses the same SEC Form 4 filings OpenInsider itself reads.

OpenInsider doesn't own the data. Every row on it comes from a Form 4, the filing a company insider must send the SEC within two business days of a trade.

So "OpenInsider API" really means "insider trading API with OpenInsider's views." Pick your route based on which views you need.

Here are the four routes, and I'll test the first and last:

  1. Scrape openinsider.com yourself
  2. Pay for a hosted scraper, like the Apify OpenInsider actor
  3. Parse the Form 4 XML straight from SEC EDGAR
  4. Call a Form 4 API that already parsed it

How do you scrape OpenInsider with Python?

You can scrape OpenInsider with about 10 lines of Python: request the screener URL with your filters as query parameters, then hand the HTML to pandas. The data sits in a table with the class "tinytable". I ran this on October 23, 2026 for Rapport Therapeutics (RAPP) and got five insider buys back in about a second.

Here's the exact script:

from io import StringIO
import pandas as pd
import requests

url = "http://openinsider.com/screener"
params = {"s": "RAPP", "xp": 1, "fd": 30, "cnt": 100}       # ticker, buys only, last 30 days
html = requests.get(url, params=params, headers={"User-Agent": "Mozilla/5.0"}, timeout=30).text
table = pd.read_html(StringIO(html), attrs={"class": "tinytable"})[0]
table.columns = [c.replace("\xa0", " ") for c in table.columns]
print(table[["Trade Date", "Insider Name", "Price", "Qty", "Value"]].head())

It works. The screener takes parameters like s (ticker), xp (purchases only), fd (filing date window in days) and vl (minimum value in thousands).

But look at what comes back.

Price is the string "$27.08". Value is "+$99,636".

Column names carry non-breaking spaces, too. You'll write a cleanup step before any of it is usable.

And it's fragile. The day OpenInsider changes a column, your parser breaks quietly.

There's a ready-made version on GitHub, sd3v/openinsiderdata, that saves to CSV with requests and BeautifulSoup. OpenInsider's robots.txt only blocks three SEO crawlers, but it's a free site run on its own budget. Keep your request rate low.

How do you get Form 4 insider trades as JSON?

To get Form 4 insider trades as JSON, call an API that parses SEC ownership filings for you. One request to /v1/insider/RAPP on Edgrapi returned the same RAPP buys in 1.6 seconds as 9.5 KB of JSON, with numbers as numbers, each trade's transaction code, and a flag for 10b5-1 trading plans. It costs 5 credits per call.

Same trades, no cleanup:

import requests

r = requests.get("https://api.edgrapi.com/v1/insider/RAPP",
                 headers={"X-API-Key": "YOUR_KEY"},
                 params={"limit": 10}, timeout=60)
for f in r.json()["filings"]:
    for t in f["transactions"]:
        if t["code"] == "P":
            print(t["date"], f["owner"], t["price_per_share"], t["shares"], t["value"])

The output starts like this:

2026-10-22 Silva Paul M 27.075 3680 99636.0
2026-10-22 Young Wendy B. 26.39 3789 99991.71
2026-10-22 PAUL STEVEN M 27.28 35714 974277.92

The other option is free: parse the XML from EDGAR yourself.

That's real work.

You handle derivative and non-derivative tables, footnotes, amendments, and the SEC's limit of 10 requests per second. It's doable. It's also a long tail of edge cases before it gets boring.

Which OpenInsider API route should you pick?

Pick by what you're building. Scraping OpenInsider is free and gives you its extra columns, like price returns, but breaks when the layout changes. A hosted scraper saves the code but bills per record. Raw EDGAR XML is free and complete but slow to build. A Form 4 API is the fastest to ship and gives clean numbers, but it lacks OpenInsider's return columns.

Here's how the four compare:

RouteCostOutputBreaks whenOpenInsider extras (returns, industry)
Scrape openinsider.comFreeHTML stringsLayout changesYes
Hosted scraper (Apify)From $50 per 1,000 recordsJSONUpstream site changesDepends on actor
Parse SEC EDGAR XMLFreeRaw XMLRarely, but you own every edge caseNo
Edgrapi /v1/insider5 credits per callParsed JSONRarelyNo

OpenInsider still wins on filtering. Its screener filters by role (CEO, CFO, director, 10% owner), by price and by industry in one URL. With an API you filter by relationship and officer_title in your own code.

My take: scrape if it's a weekend project and you want the returns columns. Use an API if anything downstream depends on it, like a bot, an alert, or an AI agent.

If you're comparing finished trackers rather than data routes, I covered that in OpenInsider alternatives.

Four ways to get OpenInsider data in code
Cost, output and failure mode for each route, checked October 23, 2026.

How do OpenInsider's columns map to API fields?

Most OpenInsider columns map one-to-one to fields in a parsed Form 4. Filing date, trade date, insider name, title, trade type, price, quantity and value all exist in the API response. Two columns don't: OpenInsider's 1d, 1w, 1m and 6m price returns and its industry label come from market data, not from the Form 4, so a Form 4 API won't return them.

Here's the map I used:

OpenInsider columnEdgrapi fieldNotes
Filing DatefiledDate only, no time
Trade Datetransactions[].dateOne per transaction line
Insider NameownerAs filed, often "LAST FIRST"
Titleofficer_title, relationshipRelationship is a list: director, officer, 10% owner
Trade Typecode, code_label, signal"P" becomes "Open-market purchase", signal "buy"
Priceprice_per_shareNumber, not a string
QtysharesNumber
Ownedshares_owned_after plus holdingsSee the next section
Delta OwnNot returnedCompute it from shares and shares owned after
ValuevalueNumber
1d, 1w, 1m, 6mNot returnedNeeds price data

One field OpenInsider doesn't show at all: plan_10b5_1. It's true when the trade ran under a pre-set 10b5-1 plan, which mostly means the trade wasn't a fresh decision.

OpenInsider columns mapped to API fields
Eight columns map straight across. Owned and Delta Own take one step. Price returns need market data.

Where do OpenInsider and the API disagree?

On the same RAPP filings, OpenInsider and the API agreed on every dollar value. They disagreed in two places, and neither is an error. OpenInsider merges an insider's multiple trade lines into one row at an average price. And in the case I checked, its "Owned" column added direct and indirect holdings together, while a Form 4 reports them on separate lines.

Take director John Maraganore.

OpenInsider shows one buy: 9,411 shares at $26.45, worth $248,891. The API returns the two lines he actually filed: 8,239 shares at $26.3799 and 1,172 shares at $26.9173. Same total.

Then director Steven Paul.

OpenInsider says he owned 555,022 shares after his buy. The API says 77,380.

That looked like a bug, so I opened the filing.

He bought 35,714 shares through Paul Capital Strategy III Fund, which then held 77,380. He also holds 477,642 shares directly. Add them and you get 555,022.

So if you're rebuilding OpenInsider's "Owned" column from an API, add shares_owned_after to the direct holdings row. One gap: the transaction rows don't carry the direct-or-indirect flag. The holdings rows do.

OpenInsider's Delta Own column is easy to rebuild. It's the shares bought divided by the shares held before the trade:

delta_own = t["shares"] / (t["shares_owned_after"] - t["shares"])

For CFO Troy Ignelzi, that's 5,500 divided by 10,000, or 55%. OpenInsider shows +55%.

Why OpenInsider's Owned number differs from the Form 4
Both numbers are right. OpenInsider combined two lines the Form 4 keeps apart.

Can you get OpenInsider's cluster buys from an API?

Yes. Edgrapi's /v1/insider/clusters returns companies where several insiders made open-market buys inside a window, with each buyer and amount. On October 23, 2026, it matched OpenInsider's RAPP cluster exactly: 5 insiders, $1,566,347. It also matched ACCV, PRHI and CRAFX to the dollar. Totals differ on some names because the windows are counted differently.

The call:

import requests

r = requests.get("https://api.edgrapi.com/v1/insider/clusters",
                 headers={"X-API-Key": "YOUR_KEY"},
                 params={"days": 15, "min_insiders": 3}, timeout=60)
for c in r.json()["clusters"]:
    print(c["ticker"], c["insider_count"], "insiders", round(c["total_value"]))

That run returned five clusters. HEICO led with 8 insiders and $1,400,595. RAPP came second.

HEICO wasn't anywhere in OpenInsider's top 100 cluster list. I checked one of the eight HEICO filings on EDGAR: a real code P purchase, 795 shares at $220.3043.

And Bluerock Private Real Estate Fund (BPRE) showed $32,812,834 on OpenInsider but $19,792,695 in the 15-day API window and $28,821,708 in the 30-day window.

The windows explain it. The API groups buys by when it saw the filing, and it keeps 30 days of buys. So days above 30 returns the same as 30.

Two more things to know before you build on it:

Cluster buys compared between OpenInsider and the API
Exact matches where the windows line up, and two cases where they don't.

Which insider trades are actually worth tracking?

Track open-market purchases, code P, and mostly ignore the rest. On October 22, 2026, the SEC received 507 Form 4 filings. Only 82 of them, about 16%, contained an open-market purchase. Research backs the filter: a 2010 NBER paper by Cohen, Malloy and Pomorski found routine insider trades carry almost no signal, while opportunistic ones earned 82 basis points a month.

I counted that day myself, every Form 4 in the SEC's daily index.

148 of the 507 contained a sale. And 89 of those filings ticked the Rule 10b5-1 box, which means the sale ran on a schedule set months earlier.

The research is in Decoding Inside Information. Routine trades, ones that repeat in the same month year after year, make up over half of all insider trades.

Clusters are the other filter. A 2019 study by Alldredge and Blank in the Journal of Financial Research found clustered insider purchases were followed by abnormal returns above 2% the next month.

But code P has a trap.

The biggest cluster in my 30-day API pull was Taiwan Semiconductor: 30 officers, only $121,467 total. Every filing is coded P. The footnote says the shares were bought by the company's Employee Stock Purchase Plan administrator.

That's a payroll deduction, and it says nothing about what management thinks of the stock. Read the footnotes, or filter out small identical buys.

None of this is investment advice. It's how to clean the data before you decide anything.

Form 4 transaction codes filed on October 22, 2026
Every Form 4 in the SEC daily index for one day. Most are grants, sales and tax withholding.

How do you get alerted on new insider buys without scraping OpenInsider?

Use a webhook instead of polling. Edgrapi's /v1/webhooks takes an https URL, up to 50 tickers and the event type "insider", then POSTs each new Form 4 for those tickers to your server, signed with HMAC-SHA256. Scraping OpenInsider for alerts means re-downloading pages on a timer and diffing them yourself, which is the part that breaks.

This is the request I sent on October 23, 2026:

import requests

r = requests.post("https://api.edgrapi.com/v1/webhooks",
                  headers={"X-API-Key": "YOUR_KEY"},
                  json={"url": "https://your-server.com/hook",
                        "tickers": ["RAPP", "HEI"],
                        "events": ["insider"]})
print(r.json()["webhook"]["id"])

It came back active, with a signing secret that's shown once. Save it.

Two caveats. New filings fire from the moment you register; old ones aren't replayed.

And I pointed my test at example.com, which rejects POSTs, so the test delivery reported false. Point yours at a real endpoint and run /v1/webhooks/{id}/test before you trust it.

Can an AI agent read insider trades directly?

Yes. The same data is exposed as an MCP tool called get_insider, so Claude or any MCP client can ask for a ticker's Form 4s, the market-wide buy feed or cluster buys in plain language. I called it with ticker="clusters" and got the HEICO cluster back first, the same as the REST call.

That's the cleanest way to stop an agent from scraping OpenInsider in a loop. The tool description also tells the model that code P is the only own-money buy, so it's less likely to read a stock grant as a bullish signal.

What does an OpenInsider API cost?

Scraping OpenInsider costs nothing but your time and maintenance. Hosted scrapers bill per record, from $50 per 1,000 Form 4 records on one Apify actor. On Edgrapi, an insider call costs 5 credits: the free tier's 50 credits cover 10 calls, and the $10 Starter plan's 10,000 monthly credits cover 2,000. Empty results are free.

One per-ticker call returns up to 100 recent filings, not one record. So a watchlist of 50 tickers checked once a day is 250 credits a day.

If you'd rather not subscribe, credit packs start at 5,000 for $7 and don't expire.

Raw EDGAR is free too. You just pay in engineering hours instead.

And if you only want to look, not code, the free Insider Buy Radar and cluster buys page show the same feeds without a key.

Start with one ticker you already watch

Run the scraper and the API call on the same ticker, side by side, and diff the results. If the extra columns matter more to you, keep scraping. If clean numbers matter more, get a free Edgrapi key and spend the 10 free insider calls on your watchlist.

Frequently asked questions

Does OpenInsider have an official API?

No. OpenInsider has no official API and no API keys. Its data comes from SEC Form 4 filings, so you can scrape its HTML tables, pay a hosted scraper, parse Form 4 XML from SEC EDGAR yourself, or use a Form 4 API. On October 23, 2026, one hosted scraper on Apify started at $50 per 1,000 records.

Is it legal to scrape OpenInsider?

OpenInsider's robots.txt only blocks three SEO crawlers, and the underlying Form 4 data is public SEC record. That's not legal advice, and the site is free and run on a small budget, so scrape politely: cache results and keep request rates low. If you need it daily in production, pulling the same Form 4 data from an API removes the question.

How do I export OpenInsider data to CSV?

Run the screener with your filters, read the "tinytable" HTML table with pandas.read_html, clean the dollar strings, and call to_csv. The open-source sd3v/openinsiderdata project on GitHub does this with requests and BeautifulSoup. An API route skips the cleanup because prices, quantities and values already come back as numbers.

Why doesn't OpenInsider's "Owned" number match the Form 4?

In the filing I checked, OpenInsider added direct and indirect holdings into one "Owned" figure. A Form 4 reports them on separate lines. For Rapport director Steven Paul, OpenInsider showed 555,022 shares, while the transaction line said 77,380 held through a fund. The other 477,642 shares were held directly. Both are correct.

Which Form 4 transaction codes are real insider buys?

Only code P is an open-market purchase with the insider's own money. Code A is a grant, M an option exercise, F shares withheld for tax, and S a sale. On October 22, 2026, 82 of 507 Form 4 filings contained a code P trade. Even then, check footnotes: some P trades are employee stock purchase plan buys.

How fast do insider trades show up on OpenInsider or an API?

Insiders must file Form 4 within two business days of a trade, so any source lags the trade itself by up to two business days. The gap after filing depends on the source. Edgrapi's market-wide feed scans the SEC's live Form 4 feed every five minutes and keeps the last 24 hours of buys.

Get a free API key