Tutorial: Screen SEC insider buying data using Python and a free API
A developer tutorial published on DEV Community demonstrates how to build a Python-based insider-buying screener using SEC Form 4 data via the AlphAI API. The script accepts a watchlist of tickers and a dollar threshold, then outputs a Markdown table and CSV file showing insider purchase transactions within a 30-day window. Testing the tool against 25 well-known tickers between August 20 and September 18, 2026, returned no qualifying purchase events, while a separate feed of recent insider activity surfaced 11 purchases across seven smaller tickers. Key transaction details such as dollar value, stake change percentage, and director status are pulled from the API and kept alongside each purchase for context. The script requires Python 3.10 or newer with no additional dependencies, and the repository includes saved sample runs that can be reproduced without an API key.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in