Want to know which posts made a newsletter grow? Every Substack has a public archive, and each post carries its like count, comment count, restacks and word count. Put them in a table and a newsletter's whole history becomes something you can sort.
This walkthrough pulls a full archive into Python. Then it answers three questions you can't easily answer by scrolling:
- Which posts got the most likes and comments?
- How often does the writer publish, and did the rhythm change?
- Do long posts beat short ones?
Disclosure: I built the scraper used below (Substack Scraper on Apify). It costs $0.50 per 1,000 posts, and Apify's free plan includes $5 of credit a month, so everything in this post runs for free. The analysis part works the same on any CSV with these columns.
What you get per post
One row per post, always the same keys:
| field | example |
|---|---|
title | "Varieties Of Discourseposting" |
postDate | 2026-11-18T... |
likes | 220 |
comments | 152 |
restacks | 9 |
wordCount | 1552 |
isPaid | false |
contentText | full text, when includeContent is on |
It works with name.substack.com and with custom domains (for example https://www.lennysnewsletter.com). No login is needed: it reads the same public pages a visitor sees, and paid posts return only their free preview.
1. Pull the archive
pip install apify-client pandas export APIFY_TOKEN=... # Apify Console > Settings > API & Integrations import os import pandas as pd from apify_client import ApifyClient client = ApifyClient(os.environ["APIFY_TOKEN"]) run = client.actor("sumitr_mardy/substack-scraper").call(run_input={ "newsletters": ["astralcodexten"], "maxPostsPerNewsletter": 500, "includeContent": False, # metadata only: faster, and enough for this analysis }) df = pd.DataFrame(client.dataset(run["defaultDatasetId"]).iterate_items()) df = df[df["status"] == "ok"] # a newsletter that fails returns one free row with another status df["postDate"] = pd.to_datetime(df["postDate"]) print(len(df), "posts") To skip code entirely, open the actor page, paste the newsletter URL and press Start. Then download the results as CSV or Excel and continue from pd.read_csv.
2. Top posts by engagement
Likes reward agreement. Comments reward controversy. Rank on both:
df["engagement"] = df["likes"] + 2 * df["comments"] + 3 * df["restacks"] top = df.sort_values("engagement", ascending=False) print(top[["postDate", "title", "likes", "comments", "restacks"]].head(10).to_string(index=False)) The weights are a judgement call. A restack puts the post in front of someone else's audience, so it counts for more than a like. Try weights of your own.
Filter out the recurring threads (Open Thread, Links For, and so on) before ranking. They collect comments every week and push the essays down the list:
essays = df[~df["title"].str.contains(r"Open Thread|Links For|Highlights From", regex=True)] 3. Publishing rhythm
per_month = df.set_index("postDate").resample("MS").size() print(per_month.tail(18)) A jump or a drop here usually lines up with something the writer announced, such as a paid tier, a book or a break. Lay the dates over the engagement column to see whether the audience followed.
4. Does length pay?
df["length_bucket"] = pd.cut(df["wordCount"], [0, 500, 1500, 3000, 6000, 100000], labels=["<500", "500-1.5k", "1.5k-3k", "3k-6k", "6k+"]) print(df.groupby("length_bucket", observed=True)[["likes", "comments"]].median()) Use the median, not the mean. One viral post can drag a whole bucket's mean up.
Comparing newsletters in a niche
Pass several newsletters in one run. The output carries a newsletter field, so a groupby compares them side by side:
run = client.actor("sumitr_mardy/substack-scraper").call(run_input={ "newsletters": ["https://www.lennysnewsletter.com", "astralcodexten", "noahpinion"], "maxPostsPerNewsletter": 100, "sort": "top", }) With sort: "top" you get each newsletter's most-liked posts first, which is the fastest way to see what has worked in a niche before you write in it.
Feeding the text to an LLM
Set includeContent: true and each row also gets contentText (clean text) and contentHtml. That is enough to:
- summarise a competitor's best 20 posts
- pull out recurring topics
- build a small retrieval index over a newsletter you read
Paid posts only include their free preview.
Links
- Actor: https://apify.com/sumitr_mardy/substack-scraper
- Examples repo (Python, Node.js, cURL): https://github.com/sumitrmardy/substack-scraper-api
If you try this on a newsletter and the numbers surprise you, I'd like to hear which one.

