Insider Transactions API

Discover and analyze insider buy and sell transactions for all publicly listed companies on US stock exchanges using the Insider Trading Data API. Gain insights into the activities of company directors, officers, 10% owners, and other executives, as the API provides comprehensive search capabilities. Key information includes the CIK and name of the insider, their relationship to the company, the number of shares and securities involved, purchase or selling prices, transaction dates, pre and post-transaction security holdings, footnotes (such as the impact of Rule 10b-18 or 10b5-1 stock purchase plans), and more. The complete list of available data points is provided below.

API Features:

  • HTTP POST-based API
  • Accepts search queries
  • Returns all matching insider transactions
  • All data points are searchable
  • Maximum of 50 insider transactions per query
  • Increment the 'from' parameter by 50 for each subsequent batch of matching transactions

Dataset Size: All filings on SEC EDGAR filed since 1993.

Data Update Frequency: Less than 300 milliseconds.

POST https://api.secfilingdata.com/v1/filings/insidertrades/

Supported HTTP methods: POST

Request and response content type: JSON

Authentication

All requests require an API token in the Authorization header.

Authorization: AUTH_TOKEN

Request Parameters

Parameter Type Required Description
query_type string Required Search type. Supported:
  • cik
  • issuer.tradingSymbol
query_value string Required Search value based on query_type
from integer Optional Pagination starting offset
size integer Optional Number of records to return (Maximum:50)
sort_order string Optional ASC or DESC

Request Example

{
  "query_type": "cik",
  "query_value": "0000320193",
  "from": 0,
  "size": 10,
  "sort_order": "DESC"
}
{
  "query_type": "issuer.tradingSymbol",
  "query_value": "AAPL",
  "from": 0,
  "size": 10,
  "sort_order": "DESC"
}

Response

<?php

$live_api_key = 'YOUR_API_TOKEN';
$url = "https://api.secfilingdata.com/v1/filings/insidertrades/";

$postData = [
    'query_type' => 'cik',
    'query_value' => '0000320193',
    'from' => '0',
    'size' => '10',
    'sort_order' => 'DESC'
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode($postData),
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: ' . $live_api_key
    ]
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo curl_error($ch);
}

curl_close($ch);

echo $response;
import requests

url = "https://api.secfilingdata.com/v1/filings/insidertrades/"

headers = {
    "Authorization": "YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

payload = {
    "query_type": "cik",
    "query_value": "0000320193",
    "from": "0",
    "size": "10",
    "sort_order": "DESC"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
const url = "https://api.secfilingdata.com/v1/filings/insidertrades/";

const payload = {
    query_type: "cik",
    query_value: "0000320193",
    from: "0",
    size: "10",
    sort_order: "DESC"
};

fetch(url, {
    method: "POST",
    headers: {
        "Authorization": "YOUR_API_TOKEN",
        "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
const axios = require("axios");

const url = "https://api.secfilingdata.com/v1/filings/insidertrades/";

const payload = {
    query_type: "cik",
    query_value: "0000320193",
    from: "0",
    size: "10",
    sort_order: "DESC"
};

axios.post(url, payload, {
    headers: {
        Authorization: "YOUR_API_TOKEN",
        "Content-Type": "application/json"
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error.response?.data || error.message);
});
curl -X POST "https://api.secfilingdata.com/v1/filings/insidertrades/" \
-H "Authorization: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
    "query_type":"cik",
    "query_value":"0000320193",
    "from":"0",
    "size":"10",
    "sort_order":"DESC"
}'
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    url := "https://api.secfilingdata.com/v1/filings/insidertrades/"

    payload := []byte(`{
        "query_type":"cik",
        "query_value":"0000320193",
        "from":"0",
        "size":"10",
        "sort_order":"DESC"
    }`)

    req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload))
    if err != nil {
        panic(err)
    }

    req.Header.Set("Authorization", "YOUR_API_TOKEN")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    res, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer res.Body.Close()

    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {

        String json = """
        {
            "query_type":"cik",
            "query_value":"0000320193",
            "from":"0",
            "size":"10",
            "sort_order":"DESC"
        }
        """;

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://api.secfilingdata.com/v1/filings/insidertrades/"))
                .header("Authorization", "YOUR_API_TOKEN")
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(json))
                .build();

        HttpClient client = HttpClient.newHttpClient();

        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();

        client.DefaultRequestHeaders.Add("Authorization", "YOUR_API_TOKEN");

        var json = @"{
            ""query_type"":""cik"",
            ""query_value"":""0000320193"",
            ""from"":""0"",
            ""size"":""10"",
            ""sort_order"":""DESC""
        }";

        var content = new StringContent(json, Encoding.UTF8, "application/json");

        var response = await client.PostAsync(
            "https://api.secfilingdata.com/v1/filings/insidertrades/",
            content
        );

        var body = await response.Content.ReadAsStringAsync();

        Console.WriteLine(body);
    }
}
require 'net/http'
require 'uri'
require 'json'

uri = URI("https://api.secfilingdata.com/v1/filings/insidertrades/")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request["Authorization"] = "YOUR_API_TOKEN"
request["Content-Type"] = "application/json"

request.body = {
  query_type: "cik",
  query_value: "0000320193",
  from: "0",
  size: "10",
  sort_order: "DESC"
}.to_json

response = http.request(request)

puts response.body

Response Example

[
  {
    "transactions": [
      {
        "id": "999",
        "accessionNo": "0001181431-12-005475",
        "filedAt": "2012-02-02",
        "schemaVersion": "X0304",
        "documentType": "4",
        "periodOfReport": "2012-01-31",
        "notSubjectToSection16": false,
        "issuer": {
          "cik": "0000320193",
          "name": "APPLE INC",
          "tradingSymbol": "AAPL"
        },
        "reportingOwner": {
          "cik": "0001496686",
          "name": "WILLIAMS JEFFREY E",
          "address": {
            "street1": "1 INFINITE LOOP",
            "city": "CUPERTINO",
            "state": "CA",
            "zipCode": "95014"
          },
          "relationship": {
            "isDirector": true,
            "isOfficer": true,
            "officerTitle": "Senior Vice President",
            "isTenPercentOwner": true,
            "isOther": true
          }
        }
      }
    ],
    "nonDerivativeTable": [
      {
        "securityTitle": "Common Stock (ESPP)",
        "transactionDate": "2012-01-31",
        "transactionCoding": {
          "transactionFormType": "5",
          "transactionCode": "A",
          "equitySwapInvolved": 0,
          "footnoteId": {
            "id": ""
          }
        },
        "transactionAmounts": {
          "transactionShares": 63,
          "transactionPricePerShare": 337.2375,
          "transactionAcquiredDisposedCode": "A"
        },
        "postTransactionAmounts": {
          "sharesOwnedFollowingTransaction": 276
        },
        "ownershipNature": {
          "directOrIndirectOwnership": "D"
        }
      }
    ],
    "footnotes": [
      {
        "id": "F1",
        "text": "The reporting person is voluntarily reporting the acquisition of shares of the issuer's common stock pursuant to the Apple Inc. Employee Stock Purchase Plan (\"ESPP\"), for the ESPP purchase period of August 1, 2011 through January 31, 2012. This transaction is also exempt under Rule 16b-3(c)."
      },
      {
        "id": "F2",
        "text": "In accordance with the ESPP, these shares were purchased based on 85% of the closing price of the issuer's common stock on August 1, 2011."
      }
    ],
    "ownerSignature": {
      "signatureName": "/s/ Gene Levoff, Attorney-in-fact for Jeffrey E. Williams",
      "signatureDate": "2012-02-02"
    }
  }
]

Important:
Requests must use: Content-Type:application/json
POST body must be JSON encoded using:json_encode($postData)

The response type is JSON, and the transactions array includes all XML-to-JS converted filings. Each array item represents a single SEC form 3, 4, or 5. Many data fields have optional footnotes attached, indicated by the "with footnote" mark.

  • transactions (array): An array of all matching transactions. Each item represents the JSON-converted XML data of a matching filing.
  • accessionNo (string): Accession number of the original filing.
  • filedAt (dateTime): Date and time when the transaction filing was accepted by SEC EDGAR. Example: 2022-08-09T21:23:00-04:00
  • documentType (string):*Type of the form: 3, 3/A, 4, 4/A, 5, 5/A.
  • periodOfReport (date): Meaning in Form 3: date of event requiring statement. In Form 4: date of earliest transaction. In Form 5: statement for issuer's fiscal year end. Format: YYYY-MM-DD
  • dateOfOriginalSubmission (date): If amended, the date of the original filing in the format YYYY-MM-DD. Mandatory in Form 3/A, 4/A, and 5/A.
  • issuer (object): Issuer information
  • cik (string): CIK of issuer. Leading zeros are removed.
  • name (string): Issuer name.
  • tradingSymbol (string): Issuer trading symbol.
  • reportingOwner (object): Information about the reporting entity.
  • nonDerivativeTable (object): Table I - Non-Derivative Securities
  • transactions (array): Non-derivative transactions
  • derivativeTable (object): Table II - Derivative Securities
  • transactions (array): Derivative transactions
  • footnotes (array):Array of footnote objects.
  • id (string):ID
  • text (string): Footnote
  • remarks (array): Array of remark objects.
  • ownerSignatureName (string): Owner's signature name
  • ownerSignatureNameDate (date): Date of owner's signature

HTTP Status Codes

Status Code Description
200 Successful request
204 No results found
400 Invalid request parameters
401 Unauthorized / Invalid token
500 Internal server error