Insider Trading API: What to Look For and How SecFeed Works
What an insider trading API should return, including the fields most skip, with a real request against SEC Forms 3, 4 and 5 data.
- An insider trading API turns SEC Forms 3, 4 and 5 into structured rows instead of individual XML filings you would otherwise parse yourself.
- Form 4 is due within 2 business days of a transaction, so a usable feed needs to ingest filings close to real time, not on a batch delay.
- Since April 1, 2023, bona fide gifts are reported on Form 4, not Form 5, and every Form 4/5 carries a checkbox for whether the trade followed a Rule 10b5-1 plan.
- A complete API response includes the transaction code, price, shares, ownership type (direct or indirect) and footnotes, not just the headline buy or sell.
An insider trading API takes SEC Forms 3, 4 and 5, the filings that officers, directors and 10% owners submit when their ownership changes, and returns them as structured data: ticker, transaction code, shares, price, and the details that are easy to miss if you only look at the trade. This guide covers what those forms actually contain, what changed in 2023, and how to query them.
What counts as an insider trading filing
Section 16(a) of the Securities Exchange Act of 1934 requires three forms from anyone who is an officer, director, or beneficial owner of more than 10% of a registered class of equity securities:
| Form | What it reports | Deadline |
|---|---|---|
| Form 3 | Initial statement of beneficial ownership, filed on becoming an insider | Within 10 days of becoming an officer, director or 10% owner (by the effective date of the registration statement for a new issuer) |
| Form 4 | Changes in ownership: purchases, sales, grants, exercises, gifts | Before the end of the 2nd business day after the transaction is executed |
| Form 5 | Annual catch-all for exempt transactions and anything not timely reported on Form 4 | Within 45 days after the issuer's fiscal year end |
See SEC Form 4 explained for a walkthrough of the transaction codes (P for purchase, S for sale, A for grant or award, M for option exercise, and the rest), and insider trading definition for how this reporting regime relates to the separate, broader concept of illegal insider trading.
What changed in 2023
Two changes from the SEC's 2022 Rule 10b5-1 release (Release No. 33-11138) affect what a current insider trading dataset needs to carry, with compliance required for forms filed on or after April 1, 2023:
- Gifts moved to Form 4. Before the change, a bona fide gift of securities could be reported immediately on Form 4 or deferred to the next Form 5. Since April 1, 2023, gifts must be reported on Form 4 within 2 business days, the same as a sale or purchase.
- A mandatory Rule 10b5-1 checkbox. Every Form 4 and Form 5 now includes a checkbox disclosing whether the reported transaction was made under a Rule 10b5-1 trading plan, the pre-arranged trading plan insiders use as an affirmative defense against insider trading liability. A feed that does not carry this flag cannot tell you whether a sale was scheduled months in advance or decided that week.
Get this data as clean JSON
SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading. 125 free calls to start.
Fields a complete API response needs
A transaction code and a share count tell you less than it looks like. A usable insider trading API should also return:
- Ownership type: direct or indirect (held through a trust, LLC or family member), since indirect holdings change the practical read of a filing.
- Price per share and shares owned following the transaction, not just shares transacted.
- Footnotes: Form 4 footnotes routinely explain things the structured fields do not, such as why a price is a weighted average across multiple trades.
- The Rule 10b5-1 flag, for the reason above.
- Filer role (officer, director, 10% owner, or a combination), since the same transaction code means something different for a CFO than for a passive 10% holder.
Querying insider trading data
SecFeed's insider trading API parses every Form 3, 4 and 5 into rows with these fields. For example, to find open-market purchases (code P) over $100,000:
curl "https://secfeedapi.com/v1/insider-trading?code=P&minValue=100000&size=10" \
-H "Authorization: Bearer YOUR_API_KEY"
A row looks like this:
{
"ticker": "EXMPL",
"cik": "0000320193",
"owner": "EXAMPLE INSIDER",
"role": "officer",
"code": "P",
"shares": 5000,
"pricePerShare": 42.10,
"sharesOwnedFollowing": 125000,
"ownershipType": "D",
"is10b5_1": false,
"filedAt": "2026-09-15"
}
In Python, with the SecFeed SDK:
from secfeed import Client
sf = Client("YOUR_API_KEY")
trades = sf.insider_trading(ticker="EXMPL", code="S")
plan_trades = [t for t in trades if t.get("is10b5_1")]
print(f"{len(plan_trades)} of {len(trades)} sales followed a 10b5-1 plan")
To follow every transaction, filing and footnote for one company over time, see the insider trading analysis tutorial. Companies also disclose their internal insider trading policy as Exhibit 19 to their 10-K, which is a useful cross-check on what trading windows and pre-clearance rules apply to the insiders you are tracking. Form 144, the notice a seller files before an unregistered sale under Rule 144, often precedes a large insider sale by a few days; see Form 144 explained for how the two forms relate. For the SEC's own free API and where it stops short of returning structured rows, see the SEC EDGAR API guide.
Timing: why real time matters
Because Form 4 is due within 2 business days of execution, not at month end, an insider trading feed that updates on a weekly or monthly batch is already stale by the time most of its filings would have been useful for monitoring. A feed that ingests filings as EDGAR publishes them (SecFeed's ingestion runs within about a second of EDGAR's own publication) is closer to what a real-time use case, such as alerting on a cluster of buys, actually needs.
Frequently asked questions
What is an insider trading API?
It is an API that returns SEC Forms 3, 4 and 5 (the filings officers, directors and 10% owners submit when their ownership of a company's stock changes) as structured JSON rows, instead of requiring you to download and parse each form's XML individually.
Is insider trading data free?
The underlying filings are free public records on SEC EDGAR. A paid API like SecFeed charges for parsing them into consistent fields, serving them with query filters (by ticker, transaction code, date range, value), and keeping history searchable, not for data the SEC withholds.
How current is insider trading API data?
Because Form 4 must be filed within 2 business days of a transaction under Section 16(a), a current dataset should reflect new filings within a similar window, ideally faster. SecFeed ingests new filings close to real time rather than on a scheduled batch.
Does a Form 4 filing mean something illegal happened?
No. Forms 3, 4 and 5 are routine ownership disclosures required of insiders, not evidence of wrongdoing. Illegal insider trading is a separate legal concept involving trades made on material nonpublic information, and it is not what these forms report.
What is the Rule 10b5-1 checkbox on Form 4?
Since April 1, 2023, every Form 4 and Form 5 includes a checkbox the filer marks if the reported transaction was executed under a Rule 10b5-1 trading plan, a pre-arranged schedule set up in advance. It lets you distinguish a scheduled, plan-driven trade from a discretionary one.
Get this data as clean JSON
SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading. 125 free calls to start.
For information only, not investment advice. Data from public SEC filings; verify important figures on SEC.gov. See our AI Disclosure.