Substack Newsletter & Archive Scraper (Markdown) avatar

Substack Newsletter & Archive Scraper (Markdown)

Pricing

from $1.05 / 1,000 substack posts

Go to Apify Store
Substack Newsletter & Archive Scraper (Markdown)

Substack Newsletter & Archive Scraper (Markdown)

Fetch public Substack archives and custom domains via JSON API or RSS fallback without login cookies. Outputs engagement counts, paywall flags, clean Markdown full text, and unwrapped external outbound links.

Pricing

from $1.05 / 1,000 substack posts

Rating

0.0

(0)

Developer

tsun tsun

tsun tsun

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Categories

Features

Limited permissions

Share

Pull public Substack publication archives from /api/v1/archive JSON (with automatic /feed RSS XML fallback on custom domains where archive JSON is restricted) across .substack.com subdomains, substack.com/@handle URLs, bare handles, and custom Substack domains like lennysnewsletter.com. No login cookies, browsers, or proxies are needed.

Each post record combines structured metadata (publicationName, reactionCount, commentCount, restackCount, wordCount, audience, isPaywalled, authorNames, coverImage, podcastUrl) with clean GitHub-Flavored Markdown and unwrapped external outboundLinks.

Use cases

  • Build incremental daily or weekly newsletter RAG indexes using postedWithinDays: 2 or publishedAfter so older archive pages are skipped before fetching full HTML or billing.
  • Track newsletter sponsors and cited tools across a roster of industry publications by analyzing unwrapped outboundLinks.
  • Benchmark top-performing essays (sort: "top") by comparing reactionCount, commentCount, restackCount, wordCount, and isPaywalled ratios.
  • Archive public essays from custom-domain Substack writers into Notion, Airtable, or pgvector in clean Markdown.

Input options

ParameterTypeDefaultDescription
publicationsstring[](required)Substack URLs, custom domains, substack.com/@handle, or bare handles.
sortstring"new"Archive order: "new" (chronological) or "top" (highest-performing).
maxPostsPerPublicationinteger25Max posts per publication (0-1000; 0 fetches up to 1,000).
postedWithinDaysinteger0Rolling recency cutoff in days (0-3650; 0 disables).
publishedAfterstring""UTC start date in YYYY-MM-DD format (filtered before billing).
freePostsOnlybooleanfalseSkip paywalled (only_paid / founding) posts.
searchQuerystring""Case-insensitive keyword match (title/subtitle, plus body when includeFullText: true).
includeFullTextbooleantrueExtract clean markdownText and unwrapped outboundLinks.
concurrencyinteger3Concurrent publication workers (1-8).

Example input

{
"publications": [
"https://www.lennysnewsletter.com",
"pragmaticengineer"
],
"sort": "new",
"maxPostsPerPublication": 15,
"postedWithinDays": 30,
"includeFullText": true,
"freePostsOnly": false,
"concurrency": 3
}

Output structure

{
"publicationName": "Lenny's Newsletter",
"publicationUrl": "https://www.lennysnewsletter.com",
"postId": "159823412",
"title": "How to tell if a startup has a moat",
"subtitle": "Frameworks from top product leaders.",
"slug": "how-to-tell-if-a-startup-has-a-moat",
"canonicalUrl": "https://www.lennysnewsletter.com/p/how-to-tell-if-a-startup-has-a-moat",
"publishedAt": "2026-11-15T14:12:08.000Z",
"audience": "everyone",
"isPaywalled": false,
"type": "newsletter",
"wordCount": 2410,
"reactionCount": 402,
"commentCount": 28,
"restackCount": 19,
"authorNames": ["Lenny Rachitsky"],
"coverImage": "https://substackcdn.com/image/fetch/f_auto,q_auto:good/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fmoat-cover.png",
"podcastUrl": null,
"markdownText": "## Key Takeaways\n\n- Distribution compounds faster than isolated feature launches.",
"outboundLinks": ["https://example.org/saas-retention-benchmark"],
"source": "archive_api",
"scrapedAt": "2026-11-24T18:04:51.209Z"
}

Field reference

FieldTypeDescription
publicationNamestringResolved publication title (falls back to handle or RSS channel title).
publicationUrlstringNormalized publication origin URL.
postIdstringSubstack post ID or RSS GUID.
titlestringPost headline.
subtitlestring | nullPost subtitle or plain-text RSS summary.
slugstringPost URL slug after /p/.
canonicalUrlstringDirect post URL.
publishedAtstring | nullISO 8601 UTC publication timestamp.
audiencestring"everyone", "only_paid", or "founding".
isPaywalledbooleantrue for subscriber-only or founding posts.
typestring"newsletter", "podcast", or "thread".
wordCountnumber | nullPost word count.
reactionCountnumber | nullTotal reactions (null on RSS fallback).
commentCountnumber | nullTotal comments (null on RSS fallback).
restackCountnumber | nullTotal Notes restacks (null on RSS fallback).
authorNamesstring[]Bylines or RSS <dc:creator> names.
coverImagestring | nullFeatured cover image URL.
podcastUrlstring | nullAudio enclosure URL when present.
markdownTextstring | nullClean Markdown body (null if includeFullText: false).
outboundLinksstring[]Unwrapped external links with Substack CDN and image links excluded.
sourcestring"archive_api" or "rss_feed".
scrapedAtstringISO 8601 UTC extraction timestamp.

Full post HTML downloads in parallel waves of 4 per archive page while preserving chronological order, per-publication limits, and budget caps. Subscribe forms, share dialogs, paywall widgets, and button wrappers are removed prior to Markdown conversion. Inside outboundLinks, substack.com/redirect/... wrappers decode to their real destination URL while self-links, substack.com, substackcdn.com, *.substackcdn.com, substack-post-media.s3.amazonaws.com, and <a class="image-link"> lightboxes are dropped so only editorial and sponsor links remain. Real publication titles (such as "Lenny's Newsletter") are extracted directly from archive byline metadata.

On Apify Cloud (256 MB memory), a 3-post full-text run completed in 2.69 s at 92.0 MB peak RAM (128 MB minimum memory). Posts stream to the dataset without buffering entire archives in RAM, responses cap at 5 MB with 15-second timeouts and capped Retry-After backoff on 429/5xx, DNS-level SSRF checks run across inputs and redirects, and OUTPUT flushes cleanly on abort.

This Actor never uses login cookies or bypasses paywalls, does not extract Substack Notes, subscriber rosters, or nested comment trees, and targets Substack publications only (for Ghost, Beehiiv, or ConvertKit sites, use Fast Website & Sitemap Markdown Crawler for AI/RAG or Google News & Universal RSS/Atom Feed Scraper).

Pay-Per-Event pricing

Pay-Per-Event billing on apify-default-dataset-item with $0 actor-start fee and $0 proxy fees. Skipped paywalled posts, date-filtered posts, and failed publications are never charged.

Event (Apify Store Label)Free / 1kBronze (-10%)Silver (-20%)Gold+ (-30%)
Substack post$1.50$1.35$1.20$1.05

Gold+ includes Gold, Platinum, and Diamond plans (all -30%, or $0.00105 per post). Apify's $5 monthly free credit covers 3,333 Substack posts/month on the Free plan.

MCP setup

Claude Code

claude mcp add --transport http apify-substack \
"https://mcp.apify.com/?tools=tsun_tsun/substack-intelligence-scraper" \
--header "Authorization: Bearer $APIFY_TOKEN"

Claude Desktop, Cursor & Windsurf

{
"mcpServers": {
"apify-substack": {
"url": "https://mcp.apify.com/?tools=tsun_tsun/substack-intelligence-scraper",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}

Client SDKs & cURL

JavaScript / TypeScript (apify-client)

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('tsun_tsun/substack-intelligence-scraper').call({
publications: ['https://www.lennysnewsletter.com', 'pragmaticengineer'],
postedWithinDays: 14,
maxPostsPerPublication: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].publicationName, items[0].title, items[0].reactionCount);

Python (apify-client)

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("tsun_tsun/substack-intelligence-scraper").call(
run_input={
"publications": ["https://www.lennysnewsletter.com"],
"publishedAfter": "2026-11-01",
"maxPostsPerPublication": 10,
}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items), items[0]["canonicalUrl"])

cURL

curl -X POST "https://api.apify.com/v2/acts/tsun_tsun~substack-intelligence-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"publications": ["pragmaticengineer"],
"postedWithinDays": 14,
"maxPostsPerPublication": 5
}'

Frequently asked questions

How do postedWithinDays and publishedAfter behave if both are provided?

The stricter (more recent) cutoff wins. Under sort: "new", pagination halts as soon as an entire 12-item archive page falls older than the cutoff, and skipped posts never download full HTML or incur dataset charges.

What data is returned for paywalled subscriber-only posts?

When freePostsOnly: false (default), paywalled posts (isPaywalled: true) return full public metadata, engagement counts, coverImage, and whatever public preview text Substack serves before the paywall cutoff. Set freePostsOnly: true to skip paid posts completely at $0.

Why do some custom domains show source: "rss_feed" with null engagement counts?

If a custom Substack domain blocks /api/v1/archive, the Actor automatically falls back to /feed RSS XML. RSS feeds do not expose like, comment, or restack counts, so those three fields return null while markdownText, outboundLinks, authorNames, and media URLs are still extracted.

Does maxPostsPerPublication: 0 scrape an entire publication?

0 raises the per-publication limit to the maximum cap of 1,000 posts per run, streaming each item to the dataset as it is parsed.

Companion lightweight API Actors and free workflow templates in the Apify Automation Toolkit:

ActorBest paired for
Fast Website & Sitemap Markdown Crawler for AI/RAGCrawl linked blogs, docs, and sponsor sites found in outboundLinks.
Google News & Universal RSS/Atom Feed ScraperCombine Substack coverage with real-time Google News and RSS/Atom feeds.
Apple Podcasts & RSS Scraper (Host Emails & Shows)Pull podcast shows, host emails, audio URLs, and episode show notes.
Wikipedia Knowledge & RAG Markdown Scraper (API)Pair newsletter analysis with clean Wikipedia reference articles and Wikidata IDs.
Apple App Store & Reviews Scraper (iOS Apps & Ratings)Track consumer app reviews and release notes alongside newsletter commentary.
Website Contact, Email MX/DMARC & Tech Stack EnricherEnrich sponsor domains extracted from outboundLinks with contact and tech-stack data.