How to Track Insider Trades with ChatGPT and Claude
Corporate insiders report their holdings and their trades on three SEC forms: Form 3, the initial statement of beneficial ownership, Form 4, the statement of changes in beneficial ownership, and Form 5, the annual statement covering transactions exempt from Form 4 or missed when due. Form 4 is due before the end of the second business day following the execution date of the transaction under Rule 16a-3(g), which makes it the fastest ownership disclosure filed on EDGAR. Connecting ChatGPT or Claude to the SEC-API.io MCP server gives the assistant direct query access to those filings, so a screen returns a table of transactions rather than a list of documents to open. This post covers what the data contains, how to connect the assistant, four prompts that produce a usable screen, and how to read the result.
On this page:
- What insider trading data covers
- Forms 3, 4 and 5
- Who counts as an insider under Section 16
- Transaction codes that matter
- Section 16 filings, Schedules 13D and 13G, and Form 144
- Connecting the assistant
- Claude
- ChatGPT plugin and Codex
- Worked prompts
- Screen a date range for open market purchases
- Follow one company's insiders over twelve months
- Check whether a sale ran under a Rule 10b5-1 plan
- Pull one insider's history across every issuer
- How to read insider trading data
- Plan sales are scheduled in advance
- Award, exercise and withholding transactions
- Joint filings double count one economic actor
- Screen on transaction code and insider count
- Transaction date and filing date are different fields
- Filing deadlines and data freshness
- Filing deadlines by form
- What the lag means for a screen
- Downloading the screen as Excel, CSV or a chart
- State the format in the prompt
- Specify the chart
- FAQ
- Related reading
What insider trading data covers
Forms 3, 4 and 5
Form 3 is filed within 10 days of becoming an insider, or by the effective date of the registration statement when a company first registers a class of equity securities. It is a position statement and reports no transaction. Form 4 reports a change in beneficial ownership and carries the transaction detail: the transaction date, the transaction code, the number of shares, the price, the number of shares beneficially owned following the reported transaction, and whether the holding is direct or indirect. Form 5 is filed within 45 days after the issuer's fiscal year end and reports transactions that were exempt from Form 4 reporting or that should have been reported earlier.
Every Form 4 has two tables. Table I covers non derivative securities, which is ordinary common stock. Table II covers derivative securities: options, restricted stock units, warrants and convertible instruments, each with its exercise price, exercisable date and expiration date. A single option exercise followed by a same day sale appears in both tables.
Who counts as an insider under Section 16
Section 16 of the Securities Exchange Act of 1934 applies to three groups at a company with a class of equity securities registered under Section 12: officers, directors, and any beneficial owner of more than 10 percent of that registered class. The relationship is declared by checkbox on the face of every Form 3, 4 and 5, and one reporting person can tick more than one box. Employees below officer level, consultants and ordinary shareholders file nothing under Section 16.
Transaction codes that matter
The transaction code is the field that separates a decision from an administrative event. Six codes account for most of the volume.
| Code | Meaning | Reflects a decision to buy or sell |
|---|---|---|
| P | Open market or private purchase | Yes |
| S | Open market or private sale | Yes, subject to whether it ran under a Rule 10b5-1 plan |
| A | Grant, award or other acquisition from the issuer | No |
| M | Exercise or conversion of a derivative security | No |
| F | Securities withheld by the issuer to pay the exercise price or tax liability | No |
| G | Bona fide gift | No |
Codes P and S are the discretionary categories, because the insider chose the timing and the size. Codes A, M and F follow from compensation arrangements: an award vests on a schedule set at grant, an option is exercised before it expires, and shares are withheld at a rate set by the tax withholding obligation. Code G moves shares without a sale price. A screen that counts all six codes as buying and selling produces a signal dominated by payroll mechanics.
Section 16 filings, Schedules 13D and 13G, and Form 144
Schedules 13D and 13G are filed by any person who acquires beneficial ownership of more than 5 percent of a class of registered voting equity securities. Those filers are frequently institutions with no board seat and no officer role, so a 13G filer is not an insider under Section 16, and a Section 16 insider holding 2 percent of the stock files no Schedule 13D or 13G. The two datasets answer different questions: Section 16 reports what the people running the company did with their own shares, Schedules 13D and 13G report who has accumulated a stake large enough to matter to control.
Form 144 is a third dataset again. It is the notice of a proposed sale of restricted or control securities under Rule 144, filed by an affiliate at or before the time the sell order is placed with the broker. It states an intention to sell up to a stated number of shares. The Form 4 filed afterwards reports what actually executed, at what price and on what date. A Form 144 with no matching Form 4 means the proposed sale was reduced or not carried out.
Field by field detail on each of the three insider forms is in Where to find insider trades in Forms 3, 4 and 5, and the 5 percent stake disclosures are covered in Guide to corporate ownership structures.
Connecting the assistant
Claude
The SEC-API.io MCP server is a remote HTTP server at https://api.sec-api.io/mcp?apiKey=YOUR_API_KEY, so there is nothing to install. In Claude, open Settings, then Connectors, then Add custom connector, paste the URL, leave the OAuth fields empty, and click Add then Connect. Turn the connector on for a conversation with the plus button below the message field. Full instructions, including the Claude Code command, are in How to access SEC financial data in Claude.
ChatGPT plugin and Codex
In ChatGPT the SEC-API.io connection is a plugin. ChatGPT on the web adds it at account or workspace level under Settings, then Security and login, then Developer mode, and the plugin itself is created from the Plugins page with Authentication set to No Auth. The ChatGPT desktop app, the Codex CLI and the IDE extension read ~/.codex/config.toml instead, where the entry is a [mcp_servers.sec-api] table with a url key. The steps with screenshots are in How to access SEC financial data in ChatGPT. A free API key is issued at https://sec-api.io/signup, and setup takes 2 to 5 minutes in either client.
Worked prompts
The four prompts below run in ChatGPT or Claude once the connector is on. Each prompt is followed by the output of a run against the filings, with the dates of the run stated.
Screen a date range for open market purchases
Screen every Form 4 filed between 24 August 2026 and 31 August 2026 for a
transaction with code P. Group the results by issuer CIK, count the distinct
reporting persons per issuer, and rank issuers by that count. Drop any issuer
with only one purchasing insider. Return issuer name, CIK, ticker, number of
distinct insiders, number of Form 4 filings, total shares purchased and the
first and last purchase date in the window.What comes back:
- One row per issuer, ranked by the count of distinct reporting persons rather than by dollar value
- The count of Form 4 filings alongside the insider count, so an issuer where three insiders filed nine times is distinguishable from one where nine insiders filed once
- Ticker and CIK on each row, with the CIK carrying the grouping, because one issuer can appear under two ticker symbols across a quarter
- An illustrative top row of the shape "7 distinct insiders, 11 filings, 214,000 shares, 12 June to 28 August"
- A tail of single insider issuers removed by the filter, which is usually the majority of the raw result set
The answer is built from Form 4 Table I transactions carrying code P in the stated window. Adding "and where the reporting person ticked officer or director" removes purchases by more than 10 percent holders, which are often institutional accumulations rather than management buying.
Run over the Form 4 filings received between 24 and 31 August 2026, the screen returned 579 code P transactions at 222 issuers, of which 47 issuers had more than one purchasing insider. The top of that ranking:
| Issuer | Ticker | CIK | Insiders | Form 4 filings | Shares | Value | First purchase | Last purchase |
|---|---|---|---|---|---|---|---|---|
| Biomerica | BMRA | 73290 | 5 | 5 | 98,750 | $158,000 | 20 Aug 2026 | 26 Aug 2026 |
| Dick's Sporting Goods | DKS | 1089063 | 4 | 4 | 28,650 | $3,722,303 | 26 Aug 2026 | 27 Aug 2026 |
| Ameresco | AMRC | 1488139 | 4 | 5 | 31,325 | $672,021 | 21 Aug 2026 | 27 Aug 2026 |
| Amrize | AMRZ | 2035989 | 4 | 4 | 9,155 | $407,704 | 25 Aug 2026 | 27 Aug 2026 |
| BioVie | BIVI | 1580149 | 4 | 4 | 23,280 | $49,118 | 27 Aug 2026 | 28 Aug 2026 |
| Odysight.ai | ODYS | 1577445 | 3 | 3 | 1,203,125 | $3,850,000 | 20 Aug 2026 | 20 Aug 2026 |
| Comscore | SCOR | 1158172 | 3 | 3 | 47,000 | $246,830 | 20 Aug 2026 | 28 Aug 2026 |
| CarParts.com | PRTS | 1378950 | 3 | 3 | 34,326 | $236,358 | 20 Aug 2026 | 28 Aug 2026 |
The first row shows what the transaction code alone does not tell you. All five Biomerica purchases were made at exactly $1.60, and the footnote on each filing states that the shares were bought in a private placement under a securities purchase agreement dated 20 August 2026. Code P covers private purchases as well as open market purchases, so the top rank of this screen is a financing round that directors and officers took part in. Adding "and exclude any transaction whose footnote describes a private placement or a securities purchase agreement" to the prompt removes it.
The Dick's Sporting Goods rows are purchases by four directors within two days:
| Insider | Role | Date | Shares | Price |
|---|---|---|---|---|
| Mark J. Barrenechea | Director | 27 Aug 2026 | 17,000 | $130.72 |
| William J. Colombo | Director | 26 Aug 2026 | 5,000 | $128.72 |
| William J. Colombo | Director | 27 Aug 2026 | 1,100 | $129.00 |
| Robert W. Eddy | Director | 26 Aug 2026 | 4,000 | $128.695 |
| Sandeep Mathrani | Director | 26 Aug 2026 | 1,550 | $128.892 |
Purchase dates also fall outside the filing window. The Comscore and CarParts.com rows include transactions dated 20 August that reached EDGAR a week later, which is the gap between transaction date and filing date described below.
Follow one company's insiders over twelve months
Pull every Form 4 filed for Costco Wholesale over the last 12 months. Split
the transactions into two groups: open market transactions with code P or S,
and plan or award driven transactions with codes A, M and F. For each group
give the transaction count, the number of distinct insiders, the total shares
and the date of the most recent transaction. List every code P purchase
individually with the insider name, role, date, shares and price.What comes back:
- Two blocks with matching columns, so the discretionary activity is readable separately from the compensation activity
- A code P list that is frequently empty at a large company over a twelve month window, which is a result rather than a failed query
- Code S rows with the reporting person's role attached, separating officer sales from director sales
- Code M and code F rows appearing as pairs on the same date, which is the standard option exercise followed by tax withholding
- Shares owned following each transaction, which shows whether a seller reduced a position or trimmed a fraction of it
The answer is built from Forms 4 and 5 filed with Costco Wholesale as the issuer, using Table I for the share transactions and Table II for the option and unit legs.
Run on 17 September 2026 over the preceding 12 months, Costco insiders filed 45 Forms 4 and 5 Forms 3, with 89 transactions and no Form 5:
| Group | Transactions | Distinct insiders | Shares | Most recent transaction |
|---|---|---|---|---|
| Open market, codes P and S | 14 | 10 | 20,490.688 | 23 Jun 2026 |
| Plan or award driven, codes A, M and F | 66 | 22 | 87,654.876 | 10 Sep 2026 |
The code P list is empty. No Costco insider bought a share on the open market in those 12 months, so the open market group consists of code S sales alone. The plan and award group splits into 21 code A grants of 63,345 shares and 45 code F withholdings of 24,309.876 shares, with no code M option exercises. Eight bona fide gifts under code G and one discretionary transaction under code I sit outside both groups.
The five largest sales:
| Insider | Role | Date | Shares | Price | Shares owned after |
|---|---|---|---|---|---|
| Russell D. Miller | Sr. Executive Vice President | 29 Sep 2025 | 3,381 | $915.00 | 9,740 |
| Claudine Adamo | Executive Vice President | 22 Oct 2025 | 2,700 | $935.68 | 6,851.197 |
| William Richard Wilcox | Executive Vice President | 7 Nov 2025 | 2,400 | $930.13 | 2,000 |
| Javier Polit | Executive Vice President | 29 Dec 2025 | 2,049 | $867.2054 | 10,747.897 |
| Caton Frates | Executive Vice President | 29 Sep 2025 | 1,540 | $910.02 | 9,283.694 |
None of the 89 transactions carries the Rule 10b5-1 checkbox, which is the absence of an assertion on the form rather than evidence that no plan existed.
Check whether a sale ran under a Rule 10b5-1 plan
For the 10 most recent Form 4 filings reporting a code S sale by an officer
of Marriott International, report for each one whether the transaction was
marked as made under a Rule 10b5-1 trading plan, the plan adoption date if it
is disclosed, the transaction date, the filing date, the shares sold, the
reported price and the shares held afterwards. Quote any footnote that
describes the plan.What comes back:
- A yes or no per filing taken from the checkbox on the face of the form, not inferred from the price or the size
- The plan adoption date where the filer discloses it, which the SEC's amendments to Rule 10b5-1 require to be given by footnote
- The footnote text itself, which often names the plan date and states that the sale was made to satisfy tax obligations or to diversify
- Filings with no checkbox and no footnote, which are sales the filer did not attribute to a plan
- The gap in days between transaction date and filing date on every row
The answer is built from the Form 4 header, the Table I code S rows and the footnote block. Filings made before the checkbox was added to the form disclose plan participation in a footnote if at all, so an absent checkbox on an older filing is not evidence that no plan existed.
The 10 most recent officer sales, run on 17 September 2026:
| Insider | Title | Transaction | Filed | Days | Shares | Price | Owned after | 10b5-1 box |
|---|---|---|---|---|---|---|---|---|
| Peggy Roe | EVP and Chief Customer Officer | 18 May 2026 | 19 May 2026 | 1 | 3,000 | $361.56 | 19,827 | No |
| Yibing Mao | President, Greater China | 13 May 2026 | 14 May 2026 | 1 | 4,816 | $347.72 | 27,398 | No |
| Rajeev Menon | President, APEC | 19 Feb 2026 | 20 Feb 2026 | 1 | 3,492 | $354.00 | 6,000 | No |
| Drew Pinto | EVP, Chief Revenue and Technology Officer | 17 Feb 2026 | 19 Feb 2026 | 2 | 4,000 | $359.814 | 8,221 | No |
| Anthony Capuano | President and CEO | 17 Feb 2026 | 19 Feb 2026 | 2 | 4,788, 16,610 and 41,602 | $360.0052, $358.4686 and $359.4338 | 113,617 | No |
| William P. Brown | Group President, US and Canada | 18 Feb 2026 | 19 Feb 2026 | 1 | 9,456 | $358.2511 | 11,000 | No |
| Benjamin T. Breland | CHRO and EVP, Global Operations Services | 18 Feb 2026 | 19 Feb 2026 | 1 | 2,000 | $358.0301 | 26,398.6153 | No |
| Rajeev Menon | President, APEC | 18 Feb 2026 | 19 Feb 2026 | 1 | 6,333 | $356.6101 | 9,492 | No |
| Rena Hozore Reiss | EVP and General Counsel | 13 Feb 2026 | 17 Feb 2026 | 4 | 2,512 | $357.00 | 33,487 | No |
| Felitia Lee | Controller and Chief Accounting Officer | 15 Dec 2025 | 16 Dec 2025 | 1 | 528 and 1,089 | $308.00 and $305.00 | 4,892.834 | No |
None of the 10 filings ticks the Rule 10b5-1 box, and no footnote names a plan or a plan adoption date. The footnotes that are present disclose weighted average sale prices, tax withholding on vesting units, and the terms of stock appreciation rights. Seven of the 10 sales fall in the week of 13 to 19 February 2026, the period that follows the annual vesting date and the fourth quarter results.
Pull one insider's history across every issuer
Pull the full Form 3, 4 and 5 history for Alex Gorsky, reporting owner CIK
1453149, across every issuer
they file for. Group by issuer, state the declared relationship to each one,
and list each transaction with its date, code, shares, price and shares held
afterwards. Flag any issuer where a Form 3 was filed but no subsequent
Form 4.What comes back:
- One group per issuer, keyed on the reporting person CIK rather than on the name, so a name spelled differently across filings still resolves to one person
- The relationship checkboxes per issuer, which differ when the same person is a director at one company and an officer at another
- Form 3 rows showing the opening position at the date the reporting obligation began
- Transaction rows in date order within each issuer, with derivative legs separated from share legs
- Issuers with a Form 3 and no Form 4, meaning the position has not changed since the obligation started
The answer is built from Forms 3, 4 and 5 filed by one reporting person CIK across all issuers, rather than from the filings of any single company.
Run on 17 September 2026, the history for Alex Gorsky covers 106 filings at four issuers between January 2009 and July 2026:
| Issuer | Ticker | Declared relationship | Filings | First filing | Last filing |
|---|---|---|---|---|---|
| Johnson & Johnson | JNJ | Officer, then Director and Officer as Chairman and CEO, then Director | 31 | 9 Jan 2009 | 18 Jan 2023 |
| IBM | IBM | Director | 50 | 5 Sep 2014 | 2 Jul 2026 |
| Apple | AAPL | Director | 12 | 12 Nov 2021 | 26 Feb 2026 |
| JPMorgan Chase | JPM | Director | 13 | 22 Jul 2022 | 22 Jan 2026 |
The relationship changes over time at Johnson & Johnson on the same reporting person CIK: member of the executive committee, then Chairman and CEO, then director. Every issuer has a Form 3 followed by Form 4 activity, so the flag for a Form 3 with no later Form 4 returns nothing.
One code P purchase appears in the whole history:
| Issuer | Date | Code | Shares | Price | Shares owned after |
|---|---|---|---|---|---|
| IBM | 9 Nov 2020 | P | 4,232 | $117.855 | 4,232 |
The remaining rows are compensation mechanics. At Johnson & Johnson on 17 January 2023 he exercised options over 547,692 shares at $72.54 under code M and returned 366,610 shares under code F at $173.43 to cover the exercise price and the tax, leaving 766,583.671 shares. The IBM rows are quarterly code A deferrals of director fees into promised fee shares, the Apple rows are annual restricted stock units vesting under code M against grants under code A, and the JPMorgan rows are quarterly code A grants. A screen that counted codes A and M as buying would report this person as a steady buyer of four stocks.
How to read insider trading data
Plan sales are scheduled in advance
A sale made under a Rule 10b5-1 trading plan was set up before the trade date, under a contract, instruction or written plan adopted when the insider was not aware of material nonpublic information. The execution date reflects the schedule in the plan rather than a view formed that week. Treat a plan sale as a weak signal about the insider's current opinion, and check the checkbox and the footnote before reading anything into the timing.
Award, exercise and withholding transactions
Code M is the exercise of a derivative security that was granted years earlier and often expires shortly after the exercise date. Code F is shares handed back to the issuer to cover the exercise price or the tax liability triggered by a vesting event, at a rate the insider does not choose. Code A is the grant itself. All three change the share count in the filing without expressing an opinion about the price.
Joint filings double count one economic actor
Co filers on a single Form 4, for example a fund and its general partner, each report the same underlying shares. Counting reporting persons naively then records two insiders for one economic decision. Collapse co filers on a shared filing before counting distinct insiders, and check whether an entity and an individual on the same filing describe the same holding.
Screen on transaction code and insider count
Aggregate dollar volume is dominated by a small number of large sales, most of them plan driven, and by option exercises that pass through the totals twice. The count of distinct insiders buying on code P within a window is the field that separates a single executive topping up a holding from several officers and directors buying in the same period.
Transaction date and filing date are different fields
Form 4 carries both. The transaction date is the execution date of the trade, the filing date is when the form reached EDGAR, and Rule 16a-3(g) allows up to the end of the second business day between them. A screen run on filing date over a window includes trades executed before that window opened, and a screen run on transaction date misses trades executed inside the window that have not been filed yet. State which date the screen uses in the prompt.
Filing deadlines and data freshness
Filing deadlines by form
| Form | Deadline | Rule |
|---|---|---|
| Form 4 | End of the second business day following the execution date | Rule 16a-3(g) |
| Form 144 | At or before the time the sell order is placed with the broker | Rule 144 |
| Schedule 13D | Five business days after crossing 5 percent | Rule 13d-1 |
| Schedule 13G | Five business days for passive filers, 45 days after quarter end for qualified institutional filers | Rule 13d-1 |
| Form 13F | 45 days after quarter end | Rule 13f-1 |
What the lag means for a screen
Form 4 is the only one of these filed within days of the transaction, which is why insider screens run on a rolling window of days or weeks. Form 13F reports positions as of a quarter end date up to 45 days before the filing, so a holding disclosed on the deadline may already be sold and a 13F comparison describes the past quarter rather than the current one. Mixing the two datasets in one screen without stating the as of date for each produces a table where the rows are not contemporaneous.
Downloading the screen as Excel, CSV or a chart
State the format in the prompt
The assistant returns prose unless the prompt names something else. Append the format to any of the prompts above: an Excel file, a CSV, a PDF, a Markdown table, or a chart as an image. For an insider screen the useful default is one row per transaction with issuer, CIK, reporting person, role, date, code, shares, price and shares held afterwards, which keeps the file sortable and filterable after it is delivered.
Specify the chart
A chart specification needs the chart type, the series and the axis. For a twelve month insider history, a workable instruction is a stacked column chart of shares by month, with code P and code S in one colour pair and codes A, M and F in another, on a zero anchored axis, labelled with the transaction count per month. More worked examples with their output and underlying data are in the Financial Analysis Prompt Library.
FAQ
Can AI track insider trading in real time?
It tracks the disclosure, not the trade. The earliest public record of an insider transaction is the Form 4, due before the end of the second business day after execution under Rule 16a-3(g). Connected to the SEC-API.io MCP server, the assistant queries filings that are available within 300 milliseconds of publication on EDGAR, so the limit on timeliness is the filing deadline rather than the data pipeline.
Which transaction code shows that an insider actually bought shares?
Code P, an open market or private purchase. Code A is a grant from the issuer and code M is the exercise of a previously granted derivative security, and neither involves buying stock at a price the insider chose. A screen that treats A and M as purchases reports compensation events as buying.
What is the difference between Form 4 and Form 144?
Form 144 is a notice of a proposed sale of restricted or control securities, filed at or before the sell order is placed, and it states a maximum number of shares the affiliate may sell. Form 4 reports the transaction that executed, with the date, the code, the share count and the price. A Form 144 can be filed and never followed by a matching sale.
Does a Rule 10b5-1 plan sale mean the insider is bearish?
The plan was adopted before the sale date, so the execution timing was set in advance. Form 4 carries a checkbox indicating that a reported transaction was made under a contract, instruction or written plan intended to satisfy Rule 10b5-1(c), and the plan adoption date is disclosed by footnote. Read plan sales separately from unplanned code S sales.
Do I need a CIK to run an insider screen?
No. A ticker or a company name is enough, and the assistant resolves it to the issuer CIK. Give a CIK when several registrants share a name, and note that the screen itself should group on CIK, because one issuer can file under more than one ticker symbol over a period.
Why do two insiders appear to report the same shares?
Co filers on a joint Form 4, such as an investment entity and the individual who controls it, each report the same underlying holding. That is one economic actor across two reporting persons. Collapse joint filings before counting distinct insiders.
How far back does the insider data go?
The SEC-API.io database covers EDGAR filings from 1993 to today. Electronic filing of Section 16 reports became mandatory on 30 June 2003, so machine readable coverage of Forms 3, 4 and 5 is dense from mid 2003 onward and sparse before that date.
Can the screen come back as an Excel file?
Yes, if the prompt asks for it. The same applies to CSV, PDF and charts. Naming the columns in the prompt controls the layout of the file rather than leaving it to the assistant.
Which assistants can query this data?
Any assistant that supports the Model Context Protocol, including Claude, Claude Code, ChatGPT, the Codex CLI and Gemini. The server is remote and read only against SEC data, so the same endpoint works across all of them.
Related reading
The insider forms themselves
- Where to find insider trades in Forms 3, 4 and 5: the three forms field by field, including the derivative table and the footnote block.
- Guide to corporate ownership structures: Schedules 13D and 13G and Form 13F, and how 5 percent stakes differ from Section 16 holdings.
Setup and prompts
- How to access SEC financial data in Claude: the connector setup for Claude and Claude Code.
- How to access SEC financial data in ChatGPT: developer mode, the Plugins page and the Codex configuration file.
- How to analyze stocks with AI: the full workflow, with insider trades as one step.
- Financial Analysis Prompt Library: prompts with their output and the data behind them.
Data and API reference
- SEC-API.io MCP server documentation: the endpoint, the 49 tools and the client setup instructions.
- API documentation: the REST endpoints behind the MCP tools, including the insider trading dataset.
- Get a free API key.
Educational content about accessing and analysing SEC filing data. Not investment advice, legal advice, or a recommendation to buy or sell any security.
Last updated: 14 September 2026