# Substack Scraper - Newsletters, Leaderboards, Authors & Posts (`hoanle0126/substack-newsletters-posts-scraper`) Actor

Scrape Substack top/rising/paid newsletter leaderboards, creator profiles, X/Twitter handles, bestseller tiers, full newsletter post text, engagement metrics, and keyword search results.

- **URL**: https://apify.com/hoanle0126/substack-newsletters-posts-scraper.md
- **Developed by:** [Hoan Le](https://apify.com/hoanle0126) (community)
- **Categories:** Lead generation, Social media, AI
- **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 dataset items

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 - Newsletters, Leaderboards, Authors & Full Posts

Extract **Substack Top / Paid Bestseller / Rising newsletter leaderboards** across all 35 categories, **full newsletter article archives (`bodyText`, word counts, reactions, comments, restacks)** from any Substack URL or custom domain, **author X/Twitter handles & bestseller tiers**, and **keyword search results (Posts & Notes)** over fast lightweight HTTP.

Engineered specifically to avoid Substack's deprecated `offset` `400` errors on pure **`256 MB` HTTP** with **zero browser startup** and **zero residential proxy cost**.

***

### Three Modes in One Actor

1. **`leaderboards` Mode (Creator Outreach, Sponsor Sourcing & Market Research):**
   - Scrape Substack's official `paid` (Top Paid Bestsellers), `top` (Top Overall), or `rising` (Fast-Growing) leaderboards across all 35 categories (`technology`, `business`, `finance`, `culture`, `crypto`, `us-politics`, `health`, `food`, `sports`, etc.).
   - Extracts `publicationName`, `subdomain`, `customDomain`, `authorName`, `authorHandle`, `authorBio`, `authorTwitterUrl`, `paymentsState`, and `url`.
2. **`posts` Mode (Content Intelligence, RAG Pipelines & Competitor Analysis):**
   - Pass any newsletter URL (`https://www.lennysnewsletter.com`, `https://blog.bytebytego.com`, `https://newsletter.pragmaticengineer.com`) or subdomain (`bytebytego`).
   - Extracts up to 50 full recent posts per publication including clean plain-text `bodyText`, `wordCount`, `audience` (`everyone` vs `only_paid`), `reactionCount`, `commentCount`, `restacks`, `bestsellerTier`, and `authorTwitterUrl`.
3. **`search` Mode (Viral Topic & Note Monitoring):**
   - Search Substack's global index for viral Posts and Notes matching any keyword (`artificial intelligence`, `saas`, `investing`).

***

### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `mode` | `string` | `"leaderboards"` | `"leaderboards"`, `"posts"`, or `"search"`. |
| `targets` | `string[]` | `["technology"]` | Category slugs (`leaderboards`), publication URLs/subdomains (`posts`), or keywords (`search`). |
| `leaderboardRanking` | `string` | `"paid"` | `"paid"` (Top Paid Bestsellers), `"top"`, or `"rising"`. |
| `includePostBody` | `boolean` | `true` | Extract clean plain-text `bodyText` in `"posts"` mode. |
| `paidOnly` | `boolean` | `false` | Filter strictly for monetized newsletters or subscriber-only posts. |
| `maxItemsPerTarget` | `integer` | `25` | Max items per target (`1` to `200`). |

***

### Sample Output Record (`mode: "leaderboards"`)

```json
{
  "recordType": "newsletter",
  "rank": 1,
  "categoryName": "Technology",
  "leaderboardType": "paid",
  "publicationId": 817132,
  "publicationName": "ByteByteGo Newsletter",
  "subdomain": "bytebytego",
  "customDomain": "blog.bytebytego.com",
  "title": "Explain complex systems with simple terms...",
  "authorName": "Alex Xu",
  "authorHandle": "bytebytego",
  "authorBio": "Author of 3 Bestselling Books | Co-Founder of ByteByteGo",
  "authorTwitterUrl": "https://x.com/alexxubyte",
  "paymentsState": "enabled",
  "isPaidEnabled": true,
  "url": "https://blog.bytebytego.com",
  "scrapedAt": "2026-11-20T10:15:00.000Z"
}
```

***

### How Much Does It Cost to Scrape Substack?

This Actor uses transparent **Pay-Per-Event (`PPE`)** pricing - you only pay for actual newsletter, post, or note records returned, with **zero Actor start fees** and ultra-lightweight `256 MB` HTTP execution (`< $0.0001` compute per run).

- **Try for Free (`$5.00` Monthly Credit Included):** Every Apify Free plan includes `$5.00` in monthly usage credits, letting you extract approximately **`3,330` Substack newsletters or articles every month completely free**.
- **Automatic Store Tier Discounts (Up to `30%` Off):**
  - **Free Tier:** `$1.50` per `1,000` records (`$0.0015` / record)
  - **Bronze Tier:** `$1.35` per `1,000` records
  - **Silver Tier:** `$1.20` per `1,000` records
  - **Gold / Platinum / Diamond Tiers:** `$1.05` per `1,000` records

***

### AI Agents (MCP), Automation & API Quickstart

- **Apify MCP Server (`Claude`, `Cursor`, `Windsurf`, `OpenAI Agents`):** Connect `https://mcp.apify.com` and reference `hoanle0126/substack-newsletters-posts-scraper` to pull newsletter leads or feed fresh articles into AI research workflows.
- **No-Code Workflows:** Plug directly into **n8n**, **Make**, **Clay**, **Zapier**, or **Google Sheets** for sponsor outreach or daily AI digest pipelines.

#### Node.js (`apify-client`)

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('hoanle0126/substack-newsletters-posts-scraper').call({
  mode: 'leaderboards',
  targets: ['technology', 'business'],
  leaderboardRanking: 'paid',
  maxItemsPerTarget: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### cURL REST API

```bash
curl -X POST "https://api.apify.com/v2/acts/hoanle0126~substack-newsletters-posts-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"posts","targets":["https://www.lennysnewsletter.com"],"includePostBody":true,"maxItemsPerTarget":15}'
```

***

### Frequently Asked Questions (FAQ)

#### Can I scrape Substack newsletters hosted on custom domains like lennysnewsletter.com or blog.bytebytego.com?

Yes. Both custom domains (`https://www.lennysnewsletter.com`) and standard subdomains (`bytebytego` / `https://bytebytego.substack.com`) are supported natively in `posts` mode.

#### Does it extract full article text for AI RAG or newsletter summarization?

Yes. With `includePostBody: true`, every public post returns clean plain-text `bodyText` alongside `wordCount`, `reactionCount`, `commentCount`, and `restacks`. Paywalled subscriber-only content is never bypassed.

#### How can B2B sponsors or agencies find monetized newsletters?

Run `mode: "leaderboards"` with `leaderboardRanking: "paid"` across categories like `technology`, `business`, `finance`, or `crypto` to capture creator names, bios, custom domains, and X/Twitter handles.

#### Do I need Substack login credentials or residential proxies?

No. All public Substack endpoints run cleanly on `256 MB` HTTP with zero logins or proxy overhead.

# Actor input Schema

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

'leaderboards' scrapes top/paid/rising newsletters by category; 'posts' extracts articles from newsletter URLs/subdomains; 'search' searches Substack posts & notes by keyword.

## `targets` (type: `array`):

In 'leaderboards' mode: category slugs/names (e.g. 'technology', 'business', 'finance', 'culture', 'crypto'). In 'posts' mode: newsletter URLs or subdomains (e.g. 'https://www.lennysnewsletter.com', 'bytebytego'). In 'search' mode: keywords (e.g. 'artificial intelligence', 'saas').

## `leaderboardRanking` (type: `string`):

Substack leaderboard type to scrape in 'leaderboards' mode.

## `includePostBody` (type: `boolean`):

When enabled in 'posts' mode, extracts clean full plain-text content (bodyText) from each public article.

## `paidOnly` (type: `boolean`):

In 'leaderboards' mode, keep only newsletters with paid subscriptions enabled. In 'posts' mode, keep only paywalled/subscriber-only posts.

## `maxItemsPerTarget` (type: `integer`):

Maximum publications, posts, or search results to extract per entry in Targets.

## Actor input object example

```json
{
  "mode": "leaderboards",
  "targets": [
    "technology"
  ],
  "leaderboardRanking": "paid",
  "includePostBody": true,
  "paidOnly": false,
  "maxItemsPerTarget": 25
}
```

# Actor output Schema

## `dataset` (type: `string`):

Extracted Substack newsletters, posts, or notes stored in the default dataset.

# 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 = {
    "targets": [
        "technology"
    ],
    "maxItemsPerTarget": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("hoanle0126/substack-newsletters-posts-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 = {
    "targets": ["technology"],
    "maxItemsPerTarget": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("hoanle0126/substack-newsletters-posts-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 '{
  "targets": [
    "technology"
  ],
  "maxItemsPerTarget": 25
}' |
apify call hoanle0126/substack-newsletters-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hoanle0126/substack-newsletters-posts-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/BcWYTOj6lHuamVuVp/builds/P9WpIsrxNI2PYpDH0/openapi.json
