# Substack Newsletter Scraper: Posts, Full Text & Comments (`techliondev/substack-scraper`) Actor

Scrape any Substack newsletter, including custom domains. Get posts, dates, likes, comments, restacks, paywall status, subscriber estimates, and full text as text or Markdown. Free filters and new-post tracking.

- **URL**: https://apify.com/techliondev/substack-scraper.md
- **Developed by:** [TechLion Dev](https://apify.com/techliondev) (community)
- **Categories:** Social media, News, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.33 / 1,000 post saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### 📰 What is Substack Newsletter Scraper?

**Substack Newsletter Scraper** (also called Substack Scraper) collects posts from **any Substack newsletter**, including newsletters on their own domain (like `lennysnewsletter.com`), into a clean table. Get titles, dates, authors, likes, comments, restacks, paywall status and subscriber estimates, plus optional full text (as plain text, HTML or Markdown) and public comments. No login and no API (application programming interface) key needed.

It is for media researchers, newsletter operators, sponsor teams and AI (artificial intelligence) pipelines that need Substack posts and full text in one place.

- **Research creators and niches:** compare newsletters by subscribers, likes and comments per post.
- **Build reading lists and archives:** export a newsletter's full public history.
- **Feed AI tools:** get full text as Markdown for summaries, search or RAG (retrieval-augmented generation).
- **Monitor topics:** keep only posts that mention your keywords and get new ones on a schedule.
- **Find sponsors and partners:** spot fast-growing, highly engaged newsletters in your space.

#### What data does Substack Newsletter Scraper extract?

| | |
| --- | --- |
| 📰 Newsletter name, link and subscriber estimate | 🧾 Post title, subtitle, link and ID |
| 📅 Publish date | ✍️ Authors (name and handle) |
| 🔒 Audience: free or paid, and a paywall flag | ❤️ Likes, 💬 comment count and 🔁 restacks |
| ⏱️ Word count and reading time | 🏷️ Section and tags |
| 🖼️ Cover image | 🎧 Podcast audio link and length |
| 📄 Full text as text, HTML or Markdown (add-on) | 💬 Public comments with author, date and likes (add-on) |

#### Why this scraper?

- **Low price per post** and only a tiny start fee (see pricing below).
- **Free filters:** date range, keywords, words to skip, free or paid, post type and minimum likes.
- **Subscriber estimates and reading time** on every row at no extra cost.
- **New-post tracking** for scheduled runs, so you never pay twice for the same post.
- **Markdown output** ready for AI tools.

### ⬇️ Input

Add newsletters one per line: the short name (`astralcodexten`), the newsletter address (`https://www.lennysnewsletter.com`), or a single post link (`https://www.lennysnewsletter.com/p/some-post`).

```json
{
    "publications": ["https://www.lennysnewsletter.com", "astralcodexten"],
    "maxPostsPerPublication": 100,
    "newerThan": "90 days",
    "includeKeywords": ["AI", "growth"],
    "access": "free",
    "minLikes": 50,
    "includeFullText": true,
    "includeMarkdown": true,
    "maxCommentsPerPost": 20
}
```

### ⬆️ Output

One row per post. The **Overview** view shows engagement, **Full text** shows the body, and **Newsletter stats** shows subscriber estimates next to each post.

#### Table view

Sample rows from a real run with the default input (2 newsletters, 10 posts each, full text on):

| Newsletter | Subscribers | Title | Date | Access | Words | Likes | Comments |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Lenny's Newsletter | Over 1,200,000 subscribers | State of the tech job market: late 2026 | 2026-11-10 | only_paid | 2,183 | 325 | 33 |
| Lenny's Newsletter | Over 1,200,000 subscribers | All of the Lenny & Friends Summit talks are… | 2026-09-29 | everyone | 1,276 | 297 | 9 |
| Lenny's Newsletter | Over 1,200,000 subscribers | 60+ new creative growth ideas | 2026-09-15 | only_paid | 5,674 | 441 | 7 |
| Lenny's Newsletter | Over 1,200,000 subscribers | Announcing Lenny’s Jobs: The best place in… | 2026-08-18 | everyone | 933 | 391 | 18 |
| Astral Codex Ten |  | Escaping The “Outside Criticism” Trap | 2026-11-11 | everyone | 1,776 | 318 | 318 |
| Astral Codex Ten |  | Your Book Review: Orality and Literacy | 2026-11-06 | everyone | 6,967 | 198 | 202 |
| Astral Codex Ten |  | Links For November 2026 | 2026-11-05 | everyone | 3,370 | 224 | 476 |
| Astral Codex Ten |  | My California Ballot, 2026 | 2026-10-28 | everyone | 5,439 | 171 | 608 |

#### JSON example

One post from the same run (text shortened):

```json
{
    "publicationUrl": "https://www.lennysnewsletter.com",
    "publicationName": "Lenny's Newsletter",
    "publicationSubdomain": "lenny",
    "publicationSubscribers": 1200000,
    "publicationSubscribersText": "Over 1,200,000 subscribers",
    "postId": 215694124,
    "title": "All of the Lenny & Friends Summit talks are now online!",
    "subtitle": "Plus, some reflections and takeaways from the day",
    "url": "https://www.lennysnewsletter.com/p/all-of-the-lenny-and-friends-summit",
    "slug": "all-of-the-lenny-and-friends-summit",
    "postDate": "2026-09-29T13:15:57.512Z",
    "type": "newsletter",
    "audience": "everyone",
    "isPaywalled": false,
    "authors": [
        {
            "name": "Lenny Rachitsky",
            "handle": "lenny"
        }
    ],
    "description": "Plus, some reflections and takeaways from the day",
    "wordCount": 1276,
    "readingTimeMinutes": 5,
    "reactionCount": 297,
    "commentCount": 9,
    "restackCount": 6,
    "sectionName": null,
    "tags": [],
    "coverImage": "https://substack-post-media.s3.amazonaws.com/public/images/9fed347c-0e02-4190-a590-1236719b99de_9213x6142.jpeg",
    "podcastUrl": null,
    "podcastDurationSeconds": null,
    "previewText": "👋 Hey there, I’m Lenny. Each week, I share deeply researched product, growth, and career advice. For more: Lenny’s Jobs | Lennybot | Become an AI-Native Builder...",
    "bodyText": "👋 Hey there, I’m Lenny. Each week, I share deeply researched product, growth, and career advice. For more: Lenny’s Jobs | Lennybot | Become an AI-Native Builder...",
    "isFullTextComplete": true,
    "scrapedAt": "2026-11-13T00:36:16.609Z"
}
```

Newsletter profiles (author, description, subscriber estimate, first post date) are saved under the key `PUBLICATIONS`, and `RUN_SUMMARY` lists the results for each newsletter.

### ▶️ How to use Substack Newsletter Scraper

1. Click **Try for free** (an Apify account is free to create).
2. Add one or more newsletters or post links.
3. Choose filters and add-ons.
4. Click **Start**. The default input finishes in about 15 seconds.
5. Download the posts from the **Output** tab, or connect them to another tool.

### 💲 How much does it cost?

Pay-per-event pricing: you pay for what you get, not for computer time.

| Event | Price (free plan) | When it is charged |
| --- | --- | --- |
| Actor start | $0.00005 | Once per run |
| **Post saved** | **$0.0005** ($0.50 per 1,000 posts) | For each post saved, after your filters |
| Add-on: Full text | $0.0005 | For each saved post whose full text was loaded |
| Add-on: Comment | $0.0002 | For each comment saved |

Paid Apify plans get lower prices automatically. The **Pricing** tab lists every plan.

**Worked examples**

- **Default test run, 20 posts with full text:** $0.00005 + 20 × ($0.0005 + $0.0005) = **about $0.02**.
- **1,000 posts with full text:** 1,000 × $0.001 = **$1.00**. A popular alternative charges $2.30 per 1,000 posts with content, plus a $0.005 start fee.
- **1,000 posts, titles and engagement only:** **$0.50**.
- **Weekly check of 50 newsletters, new posts only (about 60 posts a week, with full text and 10 comments each):** 4 runs × $0.00005 + 240 × $0.001 + 2,400 × $0.0002 = **about $0.72 per month**.

Posts removed by your filters are never charged, and add-ons are charged only for posts that were saved.

### 🎯 Use cases

- **Media and market research:** see what the top newsletters in a niche write about and what gets the most engagement.
- **Sponsorship and partnerships:** shortlist newsletters by subscribers and engagement.
- **AI and search:** build a searchable knowledge base from your favorite newsletters.
- **Competitor monitoring:** get a feed of new posts from competitors' newsletters.
- **Community analysis:** read what commenters say about each post.

### 🔌 Integrations

- **Schedules:** run daily or weekly, together with **Only save posts that are new since the last run**.
- **Webhooks:** call your own system when a run finishes.
- **Apps:** send posts to Google Sheets, Notion, Slack, Zapier, Make and more with Apify's ready-made integrations.
- **API and code:** start runs and read results with the Apify API or the Python and JavaScript client libraries (see the **API** tab).
- **AI agents:** available through the Apify MCP (Model Context Protocol) server.

### 💻 Use it from code (API)

You can start this Actor and read its results from your own code with the Apify API. Replace `YOUR_APIFY_TOKEN` with the API token from the **Settings > API & Integrations** page in Apify Console.

**Python** (install with `pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("techliondev/substack-scraper").call(run_input={
    "publications": [
        "astralcodexten",
        "https://www.lennysnewsletter.com"
    ],
    "maxPostsPerPublication": 10,
    "includeFullText": True
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript / Node.js** (install with `npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('techliondev/substack-scraper').call({
    "publications": [
        "astralcodexten",
        "https://www.lennysnewsletter.com"
    ],
    "maxPostsPerPublication": 10,
    "includeFullText": true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Any language (HTTP):** send a POST request with the input as JSON to the `run-sync-get-dataset-items` endpoint for `techliondev~substack-scraper` and you get the posts back in the response. The **API** tab on this page shows the exact address and more examples.

### ❓ FAQ

#### Does it get the full text of paid posts?

No. For paid (subscriber-only) posts, Substack publicly shows only the free preview, so that is what you get. The `isPaywalled` and `isFullTextComplete` fields tell you which is which.

#### Do custom domains work?

Yes. Newsletters on their own domain, like `www.lennysnewsletter.com`, work the same way as `name.substack.com` addresses.

#### Where does the subscriber number come from?

From the subscriber count the newsletter itself shows publicly, such as "Over 1,200,000 subscribers". Some newsletters hide it, and then the field is empty.

#### How does new-post tracking work?

With **Only save posts that are new since the last run** on, the scraper remembers the newest post of each newsletter and next time stops as soon as it reaches it. You only get, and pay for, new posts.

#### Is it legal to scrape Substack?

The scraper reads only public pages that anyone can open without logging in. Comments can contain names and personal opinions, so make sure you have a legitimate reason to collect and use them under the privacy laws that apply to you, and respect authors' copyright when reusing text.

#### Can I use this as a newsletter scraper for many Substacks at once?

Yes. Add as many publications as you like (names, links or custom domains). Each row says which newsletter it came from, so one run can track a whole list of newsletters.

#### Can I feed Substack posts into an AI tool?

Yes. Turn on **Full text of each post** and **Also give the full text as Markdown** to get each post's full text in a format that AI (artificial intelligence) tools and language models read well, with headings and links kept.

#### Your feedback

Found a bug or want a feature? Please open an issue on the **Issues** tab. We aim to reply within a few days.

# Actor input Schema

## `publications` (type: `array`):

Substack newsletters to scrape. Use the short name (astralcodexten), the newsletter address (https://example.substack.com), a custom domain (https://www.lennysnewsletter.com), or a link to a single post (https://example.substack.com/p/post-name).

## `maxPostsPerPublication` (type: `integer`):

How many posts to save from each newsletter.

## `sortBy` (type: `string`):

Newest first, or the newsletter's most popular posts first.

## `newerThan` (type: `string`):

Skip posts published before this date. Pick a date or type a relative time like "30 days". Leave empty for no date limit.

## `olderThan` (type: `string`):

Skip posts published after this date. Combine with "Only posts newer than" for a date range.

## `includeKeywords` (type: `array`):

Keep only posts whose title, subtitle or preview contains at least one of these words or phrases (not case-sensitive).

## `excludeKeywords` (type: `array`):

Drop posts whose title, subtitle or preview contains any of these words.

## `searchQuery` (type: `string`):

Only return posts that match this word or phrase, using Substack's own archive search.

## `access` (type: `string`):

Filter by who can read the post.

## `postTypes` (type: `array`):

Keep only these kinds of posts. Leave empty for all.

## `minLikes` (type: `integer`):

Keep only posts with at least this many likes (hearts).

## `includeFullText` (type: `boolean`):

Opens each post to get its full body as clean text (and HTML). Charged as a small add-on per saved post that returns full text (see the Pricing tab). Paid posts only return the free preview part.

## `includeMarkdown` (type: `boolean`):

Adds bodyMarkdown, which keeps headings, links, lists and images. Handy for AI tools and RAG (retrieval-augmented generation). Needs the full text add-on and costs nothing extra.

## `maxCommentsPerPost` (type: `integer`):

Adds up to this many public comments (with author, date, likes and replies) to each post. Charged per comment saved. 0 turns comments off.

## `onlyNewPosts` (type: `boolean`):

Remembers the newest post of each newsletter and, on the next run, saves only newer posts. Works with sorting by newest.

## `stateKey` (type: `string`):

Name your watch list to keep its history when you change the newsletter list. If empty, a name is made from the list.

## Actor input object example

```json
{
  "publications": [
    "https://www.lennysnewsletter.com",
    "astralcodexten"
  ],
  "maxPostsPerPublication": 10,
  "sortBy": "new",
  "access": "all",
  "includeFullText": true,
  "includeMarkdown": false,
  "maxCommentsPerPost": 0,
  "onlyNewPosts": false
}
```

# Actor output Schema

## `posts` (type: `string`):

Dataset with one row per post

## `summary` (type: `string`):

How many posts each newsletter returned and any address that could not be read

## `publications` (type: `string`):

One record per newsletter: author, description, subscriber estimate, first post date, podcast flag

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "publications": [
        "https://www.lennysnewsletter.com",
        "astralcodexten"
    ],
    "maxPostsPerPublication": 10,
    "includeFullText": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("techliondev/substack-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "publications": [
        "https://www.lennysnewsletter.com",
        "astralcodexten",
    ],
    "maxPostsPerPublication": 10,
    "includeFullText": True,
}

# Run the Actor and wait for it to finish
run = client.actor("techliondev/substack-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "publications": [
    "https://www.lennysnewsletter.com",
    "astralcodexten"
  ],
  "maxPostsPerPublication": 10,
  "includeFullText": true
}' |
apify call techliondev/substack-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,techliondev/substack-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KVTNqPLUTiaeocbgA/builds/GmQSevzU2fcVPx1l1/openapi.json
