# Substack Posts Scraper: Likes, Comments, Full Text ($1/1K) (`tamnt67/substack-scraper`) Actor

Substack posts scraper: title, subtitle, author, publish date, free or paid, word count, likes, comments, restacks and full text of free posts. Takes Substack newsletter URLs, custom domains included. Use it to analyze a newsletter's archive and engagement.

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

## Pricing

from $0.70 / 1,000 posts

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

## Substack Posts Scraper: Likes, Comments, Full Text

Export posts from any Substack newsletter, custom domains included, with no login and no API key, for $1 per 1,000 posts on the Free plan, down to $0.70 on higher plans.

For each post you get the title, subtitle, author, publish date, free or paid status, word count, likes, comment count, restacks, tags and, for free posts, the full article text. The Actor reads the public archive that every Substack publication serves, so it needs no account.

### What you can do with it

- **Content research:** export a newsletter's whole archive and see which topics, formats and lengths get the most likes, comments and restacks.
- **Competitor newsletter tracking:** run the newest posts of competing newsletters every week and see what they publish and how readers react.
- **Find top-performing posts:** sort by "Top posts" to get the publication's own ranking of its best posts.
- **Topic search inside a newsletter:** use **Search** to pull only the posts that match a keyword, using Substack's own archive search.
- **Reading lists and archives:** build a list of post links, dates and authors for a set of newsletters.
- **AI and text analysis:** turn on **Include full text** to feed free articles into summaries, embeddings or an LLM workflow.

### Output fields

| Field | Example |
|-------|---------|
| `newsletterUrl` | https://lenny.substack.com |
| `postId` / `slug` | 224206488 / state-of-the-tech-job-market-late |
| `title` | State of the tech job market: late 2026 |
| `subtitle` | PMs are winning, engineers are plateauing, designers are hurting, ... |
| `url` | https://www.lennysnewsletter.com/p/state-of-the-tech-job-market-late |
| `type` | newsletter, podcast, thread |
| `audience` | free or paid |
| `publishedAt` | 2026-11-10T15:04:03.497Z |
| `authorName` / `authorHandle` | Lenny Rachitsky / lenny |
| `authors` | \["Lenny Rachitsky", "Michelle Rial"] |
| `wordCount` | 2183 |
| `likeCount` / `commentCount` / `restackCount` | 295 / 30 / 26 |
| `tags` / `section` / `language` | \["Career"] / null / en |
| `coverImage` / `podcastUrl` | image link / audio link or null |
| `previewText` | the public preview of the post |
| `contentText` / `contentHtml` | full text and HTML of free posts when **Include full text** is on; null for paid posts |
| `scrapedAt` | 2026-11-12T05:24:18.591Z |
| `publicationId` / `authorId` | 10845 / 1849774 |
| `authorPhotoUrl` / `authorBio` | author image link / Writing • Angel investing • Advising |
| `reactions` / `childCommentCount` | {"❤": 226} / 4 (replies to comments) |
| `podcastDuration` / `hasVoiceover` | seconds or null / false |
| `discoveredByKeyword` | the keyword that found this newsletter, or null |
| `publicationName` / `publicationDescription` / `publicationLogoUrl` / `publicationLanguage` | only with **Include publication info**: Lenny's Newsletter / tagline / logo link / language or null |
| `publicationPaymentsEnabled` / `publicationSubscriberCount` / `publicationSubscriberCountText` | only with **Include publication info**: true / 1200000 / 1.2M+ subscribers |
| `comments` | only with **Include comments**: list of `{commentId, parentId, authorName, authorHandle, text, date, likeCount, replyCount}` |

### Example output

One real record from a cloud test run (newsletter `lenny`, full text on). This post is paid, so `contentText` and `contentHtml` are null. The preview text is trimmed.

```json
{
  "newsletterUrl": "https://lenny.substack.com",
  "postId": 224206488,
  "title": "State of the tech job market: late 2026",
  "subtitle": "PMs are winning, engineers are plateauing, designers are hurting, and the biggest AI hiring boom isn’t in software",
  "url": "https://www.lennysnewsletter.com/p/state-of-the-tech-job-market-late",
  "slug": "state-of-the-tech-job-market-late",
  "type": "newsletter",
  "audience": "paid",
  "publishedAt": "2026-11-10T15:04:03.497Z",
  "authorName": "Lenny Rachitsky",
  "authorHandle": "lenny",
  "authors": ["Lenny Rachitsky"],
  "wordCount": 2183,
  "likeCount": 295,
  "commentCount": 30,
  "restackCount": 26,
  "tags": ["Career"],
  "section": null,
  "language": "en",
  "coverImage": "https://substackcdn.com/image/fetch/$s_!-6sL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8be609d0-ed10-464c-8b94-d052d45956da_2912x1940.png",
  "podcastUrl": null,
  "previewText": "... Hey there, I’m Lenny. Each week, I share deeply researched product, growth, and career advice. ...",
  "contentText": null,
  "contentHtml": null,
  "scrapedAt": "2026-11-12T05:24:18.591Z"
}
```

### How to use

1. Add **Newsletters**: a Substack name (`lenny` for lenny.substack.com), a Substack address, or a custom domain such as `https://www.lennysnewsletter.com`.
2. Set **Maximum posts per newsletter**, choose **Sort** (newest or top), and optionally a **Search** term, a **Published after** date and **Include full text**.
3. Optional: **Find newsletters by keyword** (Substack's own search finds the newsletters), **Single post URLs**, a **Published before** date, **Free or paid**, **Post type**, minimum likes, comments and word count, **Include comments** and **Include publication info** (name, logo, paid plans, rounded subscriber count). Filters left empty change nothing.
4. Click **Start**, then download the dataset as JSON, CSV, Excel or HTML, or read it through the API.

Example input:

```json
{
  "newsletters": ["lenny", "https://newsletter.pragmaticengineer.com"],
  "maxPostsPerNewsletter": 100,
  "sortBy": "new",
  "search": "pricing",
  "publishedAfter": "2026-01-31",
  "includeContent": true
}
```

Leave `search` and `publishedAfter` out (or empty) to get all posts.

Discovery example (find newsletters about product management, take free posts with 100+ likes, add comments and subscriber counts):

```json
{
  "newsletters": [],
  "searchKeywords": ["product management"],
  "maxNewslettersPerKeyword": 5,
  "maxPostsPerNewsletter": 20,
  "audience": "free",
  "minLikes": 100,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "includePublicationInfo": true
}
```

Leave **Newsletters** empty when you only want discovered newsletters or single posts. The example newsletter (lenny) is used only when the run has no newsletter, keyword or post URL at all.

Tips:

- With `sortBy: "new"` and a **Published after** date, the Actor stops paging as soon as it reaches older posts, so recent-only runs finish fast.
- **Include full text** makes one extra request per free post, so runs take longer. Leave it off if you only need titles and engagement numbers.
- The default datacenter proxy works for Substack.

### Pricing and cost examples

You pay per post record in the dataset. Platform usage and proxy traffic are included. Full text costs the same per post; it only makes the run slower.

| Apify plan tier | Price per 1,000 posts |
|-----------------|-----------------------|
| Free | $1.00 |
| Bronze | $0.90 |
| Silver | $0.80 |
| Gold, Platinum, Diamond | $0.70 |

Cost examples on the Free plan:

- 100 posts ≈ $0.10
- 1,000 posts ≈ $1
- 10,000 posts ≈ $10 (about $7 on Gold and higher tiers)

There is also a one-time start fee of $0.00005 per run. The Apify Free plan gives you $5 of platform credit every month, which is enough for about 5,000 posts at the Free price.

A newsletter that fails or is not a Substack publication adds no records, so it adds no post charges. Posts skipped by the **Published after** filter are not saved and not charged. You can also set a maximum total charge per run in the run options; the Actor stops when it is reached.

### Use it via API, on a schedule, or from an AI agent

Replace `YOUR_API_TOKEN` with your Apify API token.

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('tamnt67/substack-scraper').call({
    newsletters: ['lenny'],
    maxPostsPerNewsletter: 50,
    sortBy: 'new',
});

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

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

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("tamnt67/substack-scraper").call(run_input={
    "newsletters": ["lenny"],
    "maxPostsPerNewsletter": 50,
    "sortBy": "new",
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

**cURL** (runs the Actor and returns the dataset items in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/tamnt67~substack-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"newsletters": ["lenny"], "maxPostsPerNewsletter": 50, "sortBy": "new"}'
```

**Schedules:** create a task with your input and add it to Apify Schedules to collect new posts every day or week; each run saves a new dataset.

**AI agents:** the Apify MCP server at https://mcp.apify.com lets AI assistants such as Claude or Cursor run this Actor and read its results.

### FAQ

**How much does the Substack Scraper cost?**
The Substack Scraper costs $1 per 1,000 posts on the Apify Free plan and goes down to $0.70 per 1,000 on Gold and higher tiers. 100 posts cost about $0.10. Platform usage and proxy traffic are included, and the Free plan's $5 monthly credit covers about 5,000 posts.

**How many posts can I get?**
The Substack Scraper returns up to 20,000 posts per newsletter, set with **Maximum posts per newsletter**. A newsletter with a smaller archive returns all of its posts.

**How do I get more posts?**
With the Substack Scraper, raise **Maximum posts per newsletter**, clear the **Search** and **Published after** fields, and add more newsletters to the list. Each newsletter is scraped separately up to the limit.

**Can I run it through the API or on a schedule?**
Yes. The Substack Scraper can be started from the Apify API with the JavaScript or Python client or a single cURL call, and saved as a task in Apify Schedules for daily or weekly runs. AI assistants can run it through the Apify MCP server.

**How fresh is the data?**
The Substack Scraper reads each newsletter's public archive live during the run, so likes, comments and restacks are the counts shown at that moment. Every record has a `scrapedAt` timestamp. Run it again to refresh the numbers.

**Does it work with newsletters on their own domain?**
Yes. The Substack Scraper accepts custom domains such as `https://www.lennysnewsletter.com` as long as the site is a Substack publication with a public archive. Other sites are skipped and logged.

**Is it legal to scrape Substack?**
The Substack Scraper collects only publicly visible data from each publication's public archive and does not log in, so paid content stays behind the paywall. You are responsible for how you use the data, including Substack's terms, the authors' copyright in their articles, and data protection laws such as GDPR when records contain personal data such as author names. This is not legal advice; ask a lawyer if you are unsure about your use case.

### Limitations

- Paid posts: only the metadata and public preview are exported; the full text stays behind the paywall (`contentText` is null).
- Subscriber counts come from the newsletter owner's public Substack profile and are rounded by Substack (for example 1.2M+). They are null when the profile does not show them.
- **Find newsletters by keyword** uses Substack's public search, which ranks posts, not newsletters; the newsletters behind the top matching posts are used, so the list can differ from what you see in the Substack app.
- **Include comments** returns the comments Substack shows publicly, up to **Max comments per post** (replies included). Deleted comments are skipped. Substack Notes, reactor lists and contact details are not exported.
- The free/paid, post type, likes, comments and word count filters are applied to the archive pages, so a narrow filter reads many pages to find a few matches. **Maximum posts per newsletter** counts the posts that pass the filters.
- **Search** uses Substack's own archive search for each newsletter, so matching follows Substack's rules.
- If the full-text request for a free post fails, the post is still saved with `contentText` and `contentHtml` set to null.
- `contentText` is plain text converted from the post HTML; images, embeds and most formatting are dropped. Use `contentHtml` for the original markup.
- `likeCount` is the reaction count from the archive.
- Each newsletter stops at 20,000 posts.

### Changelog

- 1.0 update (2026-11-23): new optional inputs: find newsletters by keyword, single post URLs, published before, free or paid, post type, minimum likes, comments and word count, comments per post and publication info (name, logo, paid plans, subscriber count). New output fields `publicationId`, `authorId`, `authorPhotoUrl`, `authorBio`, `reactions`, `childCommentCount`, `podcastDuration`, `hasVoiceover`, `discoveredByKeyword`, and on request `comments` and the `publication...` fields. Existing inputs and fields are unchanged.
- 1.0 (2026-11-19): First stable release.

### Integrations

Works with every Apify integration: API, webhooks, Zapier, Make, Google Sheets, Slack, n8n, LangChain and the Apify MCP server.

### Support

Found a problem or missing field? Report it in the Issues tab of this Actor.

# Actor input Schema

## `newsletters` (type: `array`):

Substack names (lenny), Substack addresses or custom domains (https://www.lennysnewsletter.com), one per line. Leave empty when you use Search keywords or Post URLs.

## `searchKeywords` (type: `array`):

Optional. Topics such as AI marketing or climate. Each keyword is searched with Substack's public search and the newsletters behind the matching posts are scraped like the ones above. Rows get discoveredByKeyword. Via the API, send "newsletters": \[] if you want only the discovered newsletters (otherwise the default newsletter is added).

## `maxNewslettersPerKeyword` (type: `integer`):

How many newsletters to take from the search for each keyword.

## `postUrls` (type: `array`):

Optional. Links to individual posts, such as https://www.lennysnewsletter.com/p/some-post. Each one returns that post only. Newsletter links in Newsletters still return the archive.

## `maxPostsPerNewsletter` (type: `integer`):

Stop after this many posts for each newsletter.

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

Newest first or the publication's top posts.

## `search` (type: `string`):

Only posts matching this search term, using Substack's own archive search. Leave empty for all posts.

## `publishedAfter` (type: `string`):

Only posts published on or after this date, for example 2026-01-31. Leave empty for all dates.

## `includeContent` (type: `boolean`):

Fetch the full article text and HTML of free posts. One extra request per post, so runs are slower.

## `publishedBefore` (type: `string`):

Optional. Only posts published on or before this date, for example 2026-06-30 (the whole day counts). Leave empty for all dates.

## `audience` (type: `string`):

Optional. Keep all posts, only free posts or only paid (subscriber-only) posts.

## `postType` (type: `string`):

Optional. Keep only one post type. Leave empty for all types.

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

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

## `minComments` (type: `integer`):

Optional. Keep only posts with at least this many comments.

## `minWordCount` (type: `integer`):

Optional. Keep only posts with at least this many words.

## `includeComments` (type: `boolean`):

Adds a comments list to every post (comment text, date, likes, replies and the commenter display name and handle). One extra request per post with comments.

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

Upper limit of comments (replies included) per post when Include comments is on.

## `includePublicationInfo` (type: `boolean`):

Adds newsletter name, description, logo, language, whether paid subscriptions are on, and Substack's rounded subscriber count. One extra request per newsletter.

## `proxyConfiguration` (type: `object`):

Proxy used for the requests. The default datacenter proxy works.

## Actor input object example

```json
{
  "newsletters": [
    "lenny"
  ],
  "maxNewslettersPerKeyword": 10,
  "maxPostsPerNewsletter": 50,
  "sortBy": "new",
  "includeContent": false,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "includePublicationInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with one record per result.

## `postsCsv` (type: `string`):

The same dataset exported as CSV.

# 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 = {
    "newsletters": [
        "lenny"
    ],
    "maxPostsPerNewsletter": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tamnt67/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 = {
    "newsletters": ["lenny"],
    "maxPostsPerNewsletter": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tamnt67/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 '{
  "newsletters": [
    "lenny"
  ],
  "maxPostsPerNewsletter": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tamnt67/substack-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tamnt67/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/G5grq0xYc2mKMW8tt/builds/2q8IMseJsRiCC6Zse/openapi.json
