Get insider trades
curl --request GET \
--url https://api.financialdatasets.ai/insider-trades \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/insider-trades"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/insider-trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/insider-trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/insider-trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/insider-trades")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/insider-trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"insider_trades": [
{
"ticker": "<string>",
"issuer": "<string>",
"name": "<string>",
"title": "<string>",
"is_board_director": true,
"form_type": "<string>",
"filing_date": "2023-12-25",
"report_period": "2023-12-25",
"transaction_date": "2023-12-25",
"transaction_code": "<string>",
"transaction_type": "<string>",
"transaction_shares": 123,
"transaction_price_per_share": 123,
"transaction_value": 123,
"shares_owned_before_transaction": 123,
"shares_owned_after_transaction": 123,
"security_title": "<string>"
}
],
"next_page_url": "<string>"
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}Datasets
Insider Trading API (SEC Form 4)
SEC Form 4 insider trades for 8,200+ US stocks: buys and sells by officers and directors, with 15+ years of history, updated within 10 seconds.
GET
/
insider-trades
Get insider trades
curl --request GET \
--url https://api.financialdatasets.ai/insider-trades \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/insider-trades"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/insider-trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/insider-trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/insider-trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/insider-trades")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/insider-trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"insider_trades": [
{
"ticker": "<string>",
"issuer": "<string>",
"name": "<string>",
"title": "<string>",
"is_board_director": true,
"form_type": "<string>",
"filing_date": "2023-12-25",
"report_period": "2023-12-25",
"transaction_date": "2023-12-25",
"transaction_code": "<string>",
"transaction_type": "<string>",
"transaction_shares": 123,
"transaction_price_per_share": 123,
"transaction_value": 123,
"shares_owned_before_transaction": 123,
"shares_owned_after_transaction": 123,
"security_title": "<string>"
}
],
"next_page_url": "<string>"
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}Overview
The Financial Datasets insider trades API returns the stock buys and sales that public company insiders, such as CEOs, CFOs, and directors, report to the SEC on Form 4 and Form 5. It covers 8,200+ US tickers with 15+ years of history, updated within 10 seconds. Every trade is parsed directly from SEC EDGAR (data provenance). You can call it as a REST endpoint with an API key, or from Claude, ChatGPT, Cursor, and other AI apps through the MCP server, or pay per request with x402. Pricing starts at $20. In addition to the stock buys and sales, you can also access the current ownership stakes of insiders. For early news of a planned sale, see the insider sale notices API: an insider files a Form 144 notice with the sell order, before the Form 4 that reports the trade. This data is useful for understanding the sentiment of company insiders. For example, you can answer questions like:- How many shares of Nvidia does Jensen Huang own?
- How many shares of Microsoft did Satya Nadella buy last quarter?
- How many shares of Apple has Tim Cook sold over the past year?
Coverage
| Tickers | Years of Coverage | Updated |
|---|---|---|
| 8,200+ | 15+ years | Within 10 seconds |
Available Tickers
You can fetch a list of available tickers with aGET request to:
https://api.financialdatasets.ai/insider-trades/tickers/
Available Insiders
You can fetch a list of available insider names for a given ticker with aGET request to:
https://api.financialdatasets.ai/insider-trades/names/?ticker=AAPL
Available Transaction Types
You can fetch a list of available transaction types with aGET request to:
https://api.financialdatasets.ai/insider-trades/transaction-types/
Getting Started
There are only 3 steps for making a successful API call:- Add your API key to the header of the request as
X-API-KEY. - Add query params like
tickerandlimitto filter the data. - Execute the API request.
Filtering the Data
You can filter the data byticker, name, transaction_type, form_type, limit, and filing_date.
Note: ticker is required. By default, limit is 100, name is null, transaction_type is null, form_type is null, and filing_date is null.
The name parameter is used to filter trades by a specific insider. You can get the list of available names for a ticker from the /names endpoint above.
The transaction_type parameter is used to filter trades by type (e.g., “Open market sale”, “Gift”). You can get the list of available transaction types from the /transaction-types endpoint above.
The form_type parameter filters by SEC form: 4 for trade reports, 5 for transactions reported on annual statements, or their amendments 4/A and 5/A. Each item also carries its form_type.
The limit parameter is used to specify the number of trades to return. The maximum value is 5000.
The filing_date parameter is used to specify the date of the trades. For example, you can include filters like filing_date_lte=2024-09-30 and filing_date_gte=2024-01-01 to get trades between January 1, 2024 and September 30, 2024.
The available filing_date operations are:
filing_date_ltefiling_date_ltfiling_date_gtefiling_date_gtfiling_date
Example
Insider Trades
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
ticker = 'NVDA' # stock ticker
limit = 100 # number of trades to return
# create the URL
url = (
f'https://api.financialdatasets.ai/insider-trades'
f'?ticker={ticker}'
f'&limit={limit}'
)
# make API request
response = requests.get(url, headers=headers)
# parse insider_trades from the response
insider_trades = response.json().get('insider_trades')
Example (with name)
Insider Trades
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
ticker = 'NVDA' # stock ticker
name = 'Jen Hsun Huang' # insider name
# create the URL
url = (
f'https://api.financialdatasets.ai/insider-trades'
f'?ticker={ticker}'
f'&name={name}'
)
# make API request
response = requests.get(url, headers=headers)
# parse insider_trades from the response
insider_trades = response.json().get('insider_trades')
Example (with transaction_type)
Insider Trades
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
ticker = 'NVDA' # stock ticker
transaction_type = 'Open market sale' # transaction type
# create the URL
url = (
f'https://api.financialdatasets.ai/insider-trades'
f'?ticker={ticker}'
f'&transaction_type={transaction_type}'
)
# make API request
response = requests.get(url, headers=headers)
# parse insider_trades from the response
insider_trades = response.json().get('insider_trades')
Example (with filing_date)
Insider Trades
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
ticker = 'NVDA'
filing_date_lte = '2024-01-01' # end date
filing_date_gte = '2020-01-01' # start date
# create the URL
url = (
f'https://api.financialdatasets.ai/insider-trades'
f'?ticker={ticker}'
f'&filing_date_lte={filing_date_lte}'
f'&filing_date_gte={filing_date_gte}'
)
# make API request
response = requests.get(url, headers=headers)
# parse insider_trades from the response
insider_trades = response.json().get('insider_trades')
FAQ
Where does the insider trading data come from?
Directly from SEC EDGAR. Each Form 4 and Form 5 filing is parsed into a structured record with the transaction type, share count, price, and the insider’s ownership.How fast do new insider trades show up?
New trades are added within 10 seconds.Can I filter by insider or by type of trade?
Yes. Filter byname (list the names with /insider-trades/names/), by transaction_type (for example “Open market sale”), by form_type, and by filing_date range.