Vigil API how-to
Pull this week's insider buys into a spreadsheet
Company insiders must report open-market purchases to the SEC on Form 4 within two business days. This guide pulls every purchase worth $100,000 or more from the last 7 days into a CSV file you can open in Excel, Numbers or Google Sheets. It takes one free key and a 30-line Python script with no extra packages.
1. Get a free key
Get a key on the Vigil API page. The free tier gives 500 calls a month with no card. Then put the key in your shell without echoing it:
read -r -s -p "Vigil API key: " VIGIL_API_KEY; echo
export VIGIL_API_KEY
2. See what one call returns
side=buy keeps open-market purchases (Form 4 code P). since filters by filing date.
curl -H "X-Vigil-Key: $VIGIL_API_KEY" \
"https://vigil-api.renolabshq.com/v1/insider-trades?side=buy&since=2026-11-18&limit=2"
This is the real response from the live API on November 25, 2026:
{
"items": [
{
"issuer_ticker": "TMC",
"issuer_name": "TMC the metals Co Inc.",
"issuer_cik": "1798562",
"insider_name": "Karkar Andrei",
"insider_cik": "1874431",
"title": null,
"transaction_code": "P",
"shares": 500000.0,
"price": 1.61,
"value_usd": 805000.0,
"transaction_date": "2026-11-24",
"filed_date": "2026-11-25",
"is_10b5_1": false,
"filing_url": "https://www.sec.gov/Archives/edgar/data/1798562/000110465926131894/tm2630622-1_4seq1.xml"
},
{
"issuer_ticker": "CBL",
"issuer_name": "CBL & ASSOCIATES PROPERTIES INC",
"issuer_cik": "910612",
"insider_name": "CONTIS DAVID J",
"insider_cik": "1045957",
"title": null,
"transaction_code": "P",
"shares": 325.0,
"price": 49.97,
"value_usd": 16240.25,
"transaction_date": "2026-11-25",
"filed_date": "2026-11-25",
"is_10b5_1": false,
"filing_url": "https://www.sec.gov/Archives/edgar/data/910612/000119312526477427/ownership.xml"
}
],
"next_cursor": "MjAyNi0xMS0yNVQwMDowMDowMCswMDowMHxmOWVjZGQzMzUyMGU0M2NhOTU3NGQ2MGZhY2VhOTk4OA==",
"disclaimer": "Not Investment Advice — informational purposes only."
}
value_usd is shares times price. is_10b5_1 is true when the trade was made under a pre-set trading plan, which says less about the insider's view. Each row links to the SEC filing it came from. Pass next_cursor back unchanged to get the next page; null means you have every row.
3. Run the script
Save this as insider_buys.py. It pages through the last 7 days, keeps buys of $100,000 or more, and writes them biggest first:
import csv, datetime, json, os, urllib.parse, urllib.request
BASE = "https://vigil-api.renolabshq.com/v1/insider-trades"
KEY = os.environ["VIGIL_API_KEY"]
MIN_USD = 100_000
since = (datetime.date.today() - datetime.timedelta(days=7)).isoformat()
rows, cursor = [], None
while True:
params = {"side": "buy", "since": since, "limit": 100}
if cursor:
params["cursor"] = cursor
req = urllib.request.Request(BASE + "?" + urllib.parse.urlencode(params),
headers={"X-Vigil-Key": KEY})
with urllib.request.urlopen(req) as resp:
page = json.load(resp)
rows += [r for r in page["items"] if (r["value_usd"] or 0) >= MIN_USD]
cursor = page["next_cursor"]
if not cursor:
break
fields = ["filed_date", "transaction_date", "issuer_ticker", "issuer_name",
"insider_name", "shares", "price", "value_usd", "is_10b5_1", "filing_url"]
with open("insider_buys.csv", "w", newline="") as f:
w = csv.DictWriter(f, fieldnames=fields, extrasaction="ignore")
w.writeheader()
w.writerows(sorted(rows, key=lambda r: r["value_usd"], reverse=True))
print(f"{len(rows)} buys of ${MIN_USD:,}+ since {since} -> insider_buys.csv")
python3 insider_buys.py
On November 25, 2026 the script found 228 buys of $100,000 or more filed since November 18, using 8 calls. The first rows of the file:
filed_date,transaction_date,issuer_ticker,issuer_name,insider_name,shares,price,value_usd,is_10b5_1,filing_url
2026-11-24,2026-11-20,PLTR,Palantir Technologies Inc.,THIEL PETER,341423.0,143.6841,49057056.4743,True,https://www.sec.gov/Archives/edgar/data/1211060/000121106026000012/form4-11252026_011156.xml
2026-11-24,2026-11-20,PLTR,Palantir Technologies Inc.,THIEL PETER,295240.0,144.6068,42693711.632,True,https://www.sec.gov/Archives/edgar/data/1211060/000121106026000012/form4-11252026_011156.xml
2026-11-20,2026-11-20,KNOP,KNOT Offshore Partners LP,Seglem Trygve,2789070.0,12.5,34863375.0,False,https://www.sec.gov/Archives/edgar/data/1564180/000110465926130671/tm2630315-1_4seq1.xml
4. Change it
- Set
MIN_USDto another floor, or add"ticker": "NVDA"toparamsfor one company. - Drop plan trades with
and not r["is_10b5_1"]in the filter. - Run it every morning with cron, or swap
/v1/insider-tradesfor/v1/congressional-trades(free on every key) to track Congress.
What it costs
On a free key these calls are free and count toward the 500 a month. On a paid key there is no monthly fee: each successful Form 4 call costs $0.01, so the run above costs $0.08. Errors never bill. See live pricing.
One key covers Form 4 insider trades, Form 144 insider intent, 13F fund holdings and Congress trades.
Get a free keyData comes from public SEC filings. Not investment advice.