DEV Community

voiddo
voiddo

Posted on Originally published at voidd0.github.io

Insider Trades Scraper: how to get SEC EDGAR Form 4 by Ticker as JSON or CSV (Python, API, no code)

Pull clean, parsed Form 4 insider trades from SEC EDGAR by ticker.

This tutorial shows what the Actor v0iddo/sec-form4-insider-trades returns, how to run it on the Apify Store without code, and how to call it from Python and cURL.

What data you get

One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.

Field Label Type Example
ticker Ticker text AAPL
companyCik Company Cik number 320193
companyName Company Name text Apple Inc.
insiderName Insider Name text
insiderCik Insider Cik number
insiderRoles Insider Roles list
officerTitle Officer Title text
accessionNumber Accession Number text 0001140361-26-040540
filingDate Filing Date date 2026-10-22
periodOfReport Period Of Report date 2026-10-20
filingUrl Filing Url URL https://www.sec.gov/Archives/edgar/data/320193/000114036126040540/0...
xmlUrl Xml Url URL https://www.sec.gov/Archives/edgar/data/320193/000114036126040540/f...
transactionDate transactionDate text 2026-10-20
transactionCode transactionCode text S
transactionCodeLabel transactionCodeLabel text Open market sale
securityTitle securityTitle text Common Stock
shares shares number 2399
pricePerShare pricePerShare number 339.62
totalValueUsd totalValueUsd number 814748.38
acquiredOrDisposed acquiredOrDisposed text D
sharesOwnedAfterTransaction sharesOwnedAfterTransaction number 34795
isDerivative isDerivative true/false false

Real rows from a run of the Actor (fields that name people are left out):

[
  {
    "ticker": "AAPL",
    "companyCik": 320193,
    "companyName": "Apple Inc.",
    "accessionNumber": "0001140361-26-040540",
    "filingDate": "2026-10-22",
    "periodOfReport": "2026-10-20",
    "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126040540/0001140361-26-040540-index.htm",
    "xmlUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126040540/form4.xml",
    "transactionDate": "2026-10-20",
    "transactionCode": "S",
    "transactionCodeLabel": "Open market sale",
    "securityTitle": "Common Stock",
    "shares": 2399,
    "pricePerShare": 339.62,
    "totalValueUsd": 814748.38,
    "acquiredOrDisposed": "D",
    "sharesOwnedAfterTransaction": 34795,
    "isDerivative": false
  },
  {
    "ticker": "AAPL",
    "companyCik": 320193,
    "companyName": "Apple Inc.",
    "accessionNumber": "0001140361-26-040127",
    "filingDate": "2026-10-19",
    "periodOfReport": "2026-10-15",
    "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126040127/0001140361-26-040127-index.htm",
    "xmlUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126040127/form4.xml",
    "transactionDate": "2026-10-15",
    "transactionCode": "M",
    "transactionCodeLabel": "Exercise of derivative",
    "securityTitle": "Common Stock",
    "shares": 1714,
    "acquiredOrDisposed": "A",
    "sharesOwnedAfterTransaction": 40451,
    "isDerivative": false
  }
]
Enter fullscreen mode Exit fullscreen mode

No code: run it on the Apify Store

  1. Open the Insider Trades Scraper page on Apify.
  2. Fill in the input form. An example input is already filled in.
  3. Press Start, wait for the run to finish, and download the results as JSON, CSV or Excel from the Output tab.

The input that is pre-filled on the Actor page:

{
  "tickers": [
    "AAPL",
    "META"
  ]
}
Enter fullscreen mode Exit fullscreen mode

Ready-made examples

Saved inputs on Apify: run one as it is, or copy it and change the values.

Python (apify-client)

Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/sec-form4-insider-trades.

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {'tickers': ['AAPL', 'META']}

run = client.actor("v0iddo/sec-form4-insider-trades").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
Enter fullscreen mode Exit fullscreen mode

cURL

curl -X POST "https://api.apify.com/v2/acts/v0iddo~sec-form4-insider-trades/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tickers": ["AAPL", "META"]}'
Enter fullscreen mode Exit fullscreen mode

Price

$1.70 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.19 per 1,000.

FAQ

What data does the Insider Trades Scraper return?

Each result is one row in an Apify dataset. Fields include ticker, companyCik, companyName, insiderName, insiderCik, insiderRoles, officerTitle, accessionNumber, and more. The table above shows every field with an example value.

Can I use it without writing code?

Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.

How much does it cost?

$1.70 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.19 per 1,000. A new Apify account gets $5 of platform credit every month.

Links

Top comments (0)