# Substack Scraper - Newsletter Posts and Top Newsletters (`turboextract/substack-newsletter-scraper`) Actor

Posts from any Substack newsletter with title, date, free or paid, likes, comments, restacks, word count and optional full text, plus the top newsletters in any Substack category with author, bio, X profile and paid plan.

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

## Pricing

$3.00 / 1,000 post or newsletter delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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: Newsletter Posts and Top Newsletters by Category

**Get posts from any Substack newsletter, with title, date, free or paid, likes, comments, restacks, word count and optional full text. Or list the top newsletters in any Substack category, with author, bio, X profile and paid plan.** Works with substack.com subdomains and custom domains. No login.

In one test, the actor read 60 posts each from Lenny's Newsletter, Noahpinion and Astral Codex Ten, plus the top Technology newsletters, 185 rows in under 20 seconds.

***

### Who this is for

- **Sponsors and ad buyers** comparing newsletters by engagement before buying a slot
- **Newsletter writers** studying what gets likes and comments in their niche
- **PR and partnerships teams** building lists of writers to pitch
- **Researchers and AI teams** collecting long-form writing with dates and engagement
- **Investors and analysts** following a set of expert newsletters

***

### What you get

A post row:

```json
{
  "type": "post",
  "newsletter": "Lenny's Newsletter",
  "title": "35 premium tools free for a year",
  "url": "https://www.lennysnewsletter.com/p/35-premium-tools-free-for-a-yearnow",
  "publishedAt": "2026-11-17T18:02:02.477Z",
  "audience": "free",
  "postType": "newsletter",
  "wordCount": 1752,
  "likes": 205,
  "comments": 12,
  "restacks": 2,
  "authors": ["Lenny Rachitsky"]
}
```

A newsletter row from a category:

```json
{
  "type": "newsletter",
  "category": "Technology",
  "categoryRank": 2,
  "name": "The Pragmatic Engineer",
  "url": "https://newsletter.pragmaticengineer.com",
  "authorName": "Gergely Orosz",
  "authorBio": "Big Tech and startups from the inside...",
  "twitterUrl": "https://x.com/...",
  "hasPaidPlan": true,
  "language": "en"
}
```

***

### How it works

```mermaid
flowchart LR
    A[Newsletter URLs or subdomains] --> B[Newsletter's public posts feed]
    B --> C[Date and free-only filters]
    C --> D[Post rows with engagement]
    E[Categories] --> F[Substack category rankings]
    F --> G[Newsletter rows with author]
```

Every Substack publication serves its post list as public JSON, and Substack publishes ranked newsletter lists per category. The actor reads both.

***

### Quick start

1. Click **Try for free**.
2. Add **Newsletters**, like `https://www.lennysnewsletter.com`, `noahpinion` or `substack.com/@author`.
3. Or add **Categories** like `technology`, `business` or `finance` to list the top newsletters.
4. Click **Start**, then export to CSV, JSON or Google Sheets.

#### API

```bash
curl -X POST "https://api.apify.com/v2/acts/Turboextract~substack-newsletter-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "newsletters": ["https://www.lennysnewsletter.com", "noahpinion"],
    "maxPostsPerNewsletter": 50
  }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("Turboextract/substack-newsletter-scraper").call(run_input={
    "categories": ["technology", "business"],
    "maxNewslettersPerCategory": 100,
})
for n in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(n["categoryRank"], n["name"], n["url"], n["authorName"])
```

***

### Input

| Field | Default | What it does |
|---|---|---|
| `newsletters` | – | Newsletter URLs, custom domains or subdomains |
| `maxPostsPerNewsletter` | 20 | Newest posts first |
| `postedWithinDays` | 0 (all) | Only posts from the last N days |
| `freeOnly` | false | Skip paid posts |
| `includeContent` | false | Add post text (free preview for paid posts) |
| `categories` | – | List top newsletters in these categories |
| `maxNewslettersPerCategory` | 25 | Ranked order |
| `maxResults` | 500 | Total cap per run |

***

### Pricing

**$0.003 per post or newsletter delivered.** The last 50 posts from 20 newsletters (1,000 rows) cost $3.

| Option | 1,000 rows |
|---|---|
| **Substack Scraper** | **$3**, posts and category rankings |
| Other Substack actors on Apify | $3 to $5, some charge extra per run |
| Newsletter sponsorship databases | $100+ a month |

***

### Use cases

- **Sponsorship shortlists**: top 100 newsletters in your category with the author and paid plan
- **Content research**: which topics get the most likes and comments in your niche
- **Writer outreach**: authors with their bio and X profile for podcast or PR pitches
- **Archive export**: every post from a newsletter with dates and links
- **Datasets**: free post text for analysis or AI training, with clear sources

***

### Tips

- Custom domains work. The actor reads the newsletter's own posts feed on that domain.
- Category names match Substack's: technology, business, finance, culture, science, politics and more.
- Use `postedWithinDays: 7` on a weekly schedule to track new posts only.

***

### Pairs well with

- [Google News Scraper](https://apify.com/Turboextract/google-news-feed): news articles by search or topic
- [Podcast Transcript Dataset](https://apify.com/Turboextract/podcast-transcript-dataset): podcast episodes as text
- [Bluesky Scraper](https://apify.com/Turboextract/bluesky-posts-profiles): what writers are posting on Bluesky

***

### FAQ

**Can it read paid posts?** It returns the title, date and engagement for every post. For paid posts, the text is the free preview only.

**Does it give subscriber counts?** Substack only shows ranges for some newsletters. When it does, they appear in `subscriberCountLabel`.

**Does it work with custom domains?** Yes, like `lennysnewsletter.com`. Non-Substack sites return a warning.

**Do I need a login?** No.

**Is it legal?** It reads public post lists and rankings that Substack shows to every visitor.

***

### Support

- Docs and examples: https://github.com/andersonjames38phd-cpu/substack-newsletter-scraper
- Community Discord: https://discord.gg/8SrXSCpvgj

Built and maintained by [Turboextract](https://apify.com/Turboextract) on the Apify platform.

# Actor input Schema

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

Newsletter URLs or Substack subdomains, like lenny, https://www.platformer.news or substack.com/@author.

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

Newest posts first.

## `postedWithinDays` (type: `integer`):

Only posts from the last N days. 0 means no limit.

## `freeOnly` (type: `boolean`):

Skip paid-subscriber posts.

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

Adds the post text. Paid posts only include the free preview.

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

Substack categories to list top newsletters for, like technology, business, finance, culture or science.

## `maxNewslettersPerCategory` (type: `integer`):

Substack ranks newsletters within each category.

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

Stop after this many rows in total. You only pay for what is delivered.

## Actor input object example

```json
{
  "newsletters": [
    "https://www.lennysnewsletter.com"
  ],
  "maxPostsPerNewsletter": 20,
  "postedWithinDays": 0,
  "freeOnly": false,
  "includeContent": false,
  "maxNewslettersPerCategory": 25,
  "maxResults": 500
}
```

# Actor output Schema

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

Rows of type post (newsletter posts with engagement) and type newsletter (category leaderboard entries).

# 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": [
        "https://www.lennysnewsletter.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("turboextract/substack-newsletter-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": ["https://www.lennysnewsletter.com"] }

# Run the Actor and wait for it to finish
run = client.actor("turboextract/substack-newsletter-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": [
    "https://www.lennysnewsletter.com"
  ]
}' |
apify call turboextract/substack-newsletter-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,turboextract/substack-newsletter-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/mKm9gFqROivuDQpE9/builds/VUJYxIb6QE8SoAHRe/openapi.json
