# Substack Scraper – Posts, Comments, Leaderboards, Search (`rt-solutions/substack-scraper`) Actor

All-in-one Substack scraper: full archive of any newsletter with full text, all comments with replies, top newsletters by category with subscriber counts and prices, newsletter & post search, author profiles. No login. $1.50 per 1,000 results.

- **URL**: https://apify.com/rt-solutions/substack-scraper.md
- **Developed by:** [RT SOLUTIONS](https://apify.com/rt-solutions) (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 $1.05 / 1,000 results

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 Scraper — posts, comments, leaderboards, search & profiles

The **all-in-one Substack scraper**. One Actor, six tools — no login, no cookies:

1. **Posts of any newsletter** — the full archive (or only posts after a date / matching a word), with the **full text** of free posts.
2. **Comments** — every comment of a post **with all replies** (thread depth and parent ID kept).
3. **Leaderboards** — top newsletters in 33 categories (Trending or Bestsellers) with **subscriber counts, paid tier and subscription prices**.
4. **Search newsletters** by keyword — with subscribers, prices, author, X/Twitter.
5. **Search posts** by keyword across all of Substack.
6. **Author profiles** — followers, subscribers, bestseller badge, newsletters they write and read.

### Use cases

- **Influencer & sponsor research**: find the biggest newsletters of a niche with their audience size and price.
- **Content research**: what topics get the most likes, comments and restacks.
- **Competitive monitoring**: schedule a daily run to get every new post of competitor newsletters.
- **Datasets for AI / NLP**: full text of public posts and comment threads.

### What you get

**Post**: title, subtitle, URL, newsletter, authors, date, free/paid, word count, likes, comments, restacks, tags, section, cover image, podcast URL & duration, preview, full text + HTML (free posts).

**Comment**: text, author, handle, profile URL, date, likes, number of replies, depth, parent comment ID.

**Newsletter** (leaderboard & search): rank, name, URL, author, description, subscribers (number + label), paid subscribers tier, bestseller tier, monthly & yearly price, currency, language, podcast, first post date, X/Twitter, public support email, logo.

**Profile**: name, handle, bio, followers, subscribers, bestseller tier, main newsletter, newsletters written, links, newsletters subscribed to.

### Example (leaderboard)

```json
{
  "type": "newsletter",
  "rank": 3,
  "category": "technology",
  "ranking": "bestseller",
  "name": "The Pragmatic Engineer",
  "url": "https://newsletter.pragmaticengineer.com",
  "author": "Gergely Orosz",
  "subscribers": 1100000,
  "subscribersText": "Over 1,100,000 subscribers",
  "paidSubscribersText": "Tens of thousands of paid subscribers",
  "monthlyPrice": 15,
  "yearlyPrice": 150,
  "currency": "USD",
  "twitter": "https://x.com/GergelyOrosz"
}
```

### How to use

1. Choose **What to scrape**.
2. Fill the matching field: newsletter URLs or names (`lennysnewsletter.com`, `astralcodexten`, `substack.com/@handle`), post URLs, categories, keywords or profile handles.
3. Set **Max results** (per newsletter / category / keyword) and click **Start**. Export to JSON, CSV, Excel, or schedule it.

### Pricing

**$1.50 per 1,000 results** (posts with full text, comments, newsletters or profiles), cheaper on paid Apify plans. No extra fee for full text.

### Use with AI agents (MCP)

You can call this Actor from Claude, ChatGPT, Cursor or any other MCP client through the Apify MCP server (https://mcp.apify.com), using the Actor ID `rt-solutions/substack-scraper`. For example: *"List the top 20 technology newsletters on Substack's bestseller leaderboard with their subscriber counts and yearly price."* It also works through the Apify API, Make, n8n and Zapier.

### FAQ

**How do I scrape Substack without an API?** Choose what to scrape, paste newsletter URLs, post URLs, categories, keywords or profile handles, and click Start. No login or cookies are needed; export to JSON, CSV or Excel.

**How much does it cost to scrape 10,000 Substack posts?** $15 at $1.50 per 1,000 results, full text included — less on paid Apify plans. The same price applies to comments, newsletters and profiles.

**Can I monitor new posts of a newsletter?** Yes — schedule a daily run and use the "only posts after a date" option to collect just the new ones.

**Can I get paid posts?** Only what Substack shows publicly: title, stats and preview. The full text of paid posts needs a paid subscription and is not collected.

**Are subscriber counts exact?** They are the public figures Substack displays ("Over 120,000 subscribers"). Some newsletters hide them; the field is then empty.

**Does it work with custom domains?** Yes — e.g. `www.lennysnewsletter.com`, `www.astralcodexten.com`.

**Is it legal?** The Actor only collects data shown publicly to any visitor without login. Use it in line with applicable laws (e.g. GDPR for personal data) and Substack's terms.

### Related scrapers

Other ready-to-use Actors by RT Solutions:

- [Google News Scraper](https://apify.com/rt-solutions/google-news-scraper)
- [Weibo Scraper](https://apify.com/rt-solutions/weibo-scraper)
- [Bilibili Scraper](https://apify.com/rt-solutions/bilibili-scraper)

# Actor input Schema

## `mode` (type: `string`):

Choose one mode, then fill the matching field below.

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

Newsletter URLs or names: lennysnewsletter.com, astralcodexten, https://www.platformer.news, substack.com/@handle

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

Order of the archive.

## `searchInNewsletter` (type: `string`):

Optional word to search inside each newsletter's archive (e.g. pricing).

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

Optional. Only posts published after this date.

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

Full text + HTML of free posts. Paid posts only have a public preview.

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

e.g. https://www.astralcodexten.com/p/your-book-review-storm-of-steel

## `commentSort` (type: `string`):

Order of comments.

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

Replies included.

## `categories` (type: `array`):

Substack leaderboard categories.

## `ranking` (type: `string`):

Which Substack leaderboard.

## `keywords` (type: `array`):

For 'Search newsletters' and 'Search posts', e.g. artificial intelligence, personal finance.

## `profiles` (type: `array`):

Handles or URLs: scottalexander, substack.com/@handle

## `maxResults` (type: `integer`):

Stop after this many results for each item of your list.

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

Apify Proxy is used by default.

## Actor input object example

```json
{
  "mode": "newsletter_posts",
  "newsletters": [
    "lennysnewsletter.com"
  ],
  "sortBy": "new",
  "searchInNewsletter": "",
  "publishedAfter": "",
  "includeContent": true,
  "commentSort": "best",
  "maxCommentsPerPost": 500,
  "categories": [
    "technology"
  ],
  "ranking": "trending",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped rows.

# 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": [
        "lennysnewsletter.com"
    ],
    "categories": [
        "technology"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rt-solutions/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": ["lennysnewsletter.com"],
    "categories": ["technology"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rt-solutions/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": [
    "lennysnewsletter.com"
  ],
  "categories": [
    "technology"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rt-solutions/substack-scraper --silent --output-dataset

```

## MCP server setup

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