# Substack Newsletter Scraper: Posts, Full Text, Stats (`tali-works/substack-newsletter-scraper`) Actor

Scrape every post from any Substack newsletter: title, date, authors, paywall status, likes, comments, restacks, tags and full article text (free posts). URLs, custom domains or names. No login, no proxies. $1 per 1,000 posts, full text included.

- **URL**: https://apify.com/tali-works/substack-newsletter-scraper.md
- **Developed by:** [Trevor Staubach](https://apify.com/tali-works) (community)
- **Categories:** Social media, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Newsletter Scraper: Posts, Full Text & Engagement Stats

Export **every post from any Substack newsletter** as clean, structured data: title, subtitle, URL, publish date, authors, **paywall status, likes, comments, restacks**, word count, tags, section, cover image, and the **full article text** for free posts (the public preview for paid ones). Works with `name.substack.com`, **custom domains** and `substack.com/@handle` links. **$1 per 1,000 posts, full text included.** No login, API key or proxies needed.

### Why this scraper

- **Full text at the metadata price.** Other Substack scrapers charge about twice as much for posts with content. Here the price is the same with or without text.
- **Engagement stats.** Likes, comments and restacks for every post, so you can rank a newsletter's best content or benchmark competitors.
- **Incremental runs.** `postedSince` stops at the first older post, so daily monitoring costs only the new posts.
- **Clean text, ready for AI.** HTML is converted to readable paragraphs, which makes it suitable for summarisation, RAG, sentiment and topic analysis.
- **Many newsletters per run**, each logged separately; a failing one never stops the run.

### Use cases

Content and competitor research, newsletter sponsorship prospecting, media monitoring, training/RAG datasets, trend analysis, archiving your own newsletter.

### Input

| Field | Description |
|---|---|
| `publications` | Newsletter URLs, custom domains, `substack.com/@handle` or subdomain names. |
| `maxPostsPerPublication` | Newest first. Empty = whole archive. |
| `postedSince` | Only posts on or after this date. |
| `keywords` | Keep posts whose title/subtitle contains any of these. |
| `freeOnly` | Skip paid-only posts. |
| `includeContent` | Full text (default on). |
| `maxTotalPosts` | Hard cap for the run. |

```json
{ "publications": ["https://www.lennysnewsletter.com", "platformer", "https://substack.com/@noahpinion"], "postedSince": "2026-09-01" }
```

### Output

```json
{
  "publication": "www.lennysnewsletter.com", "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",
  "type": "newsletter", "postDate": "2026-09-29T13:15:57.512Z",
  "audience": "everyone", "isPaywalled": false, "authors": ["Lenny Rachitsky"],
  "wordcount": 1276, "reactionCount": 289, "commentCount": 7, "restacks": 5,
  "tags": [], "sectionName": null, "coverImage": "https://substack-post-media.s3.amazonaws.com/...",
  "description": "Plus, some reflections and takeaways from the day",
  "previewText": "👋 Hey there, I'm Lenny...",
  "contentText": "👋 Hey there, I'm Lenny. Each week, I share...",
  "contentIsPreviewOnly": false
}
```

`type` can be `newsletter`, `podcast` or `thread`. For paid posts `contentText` holds only the public preview and `contentIsPreviewOnly` is `true`.

### Pricing

**$1.00 per 1,000 posts** ($0.001 each), full text included, plus a tiny $0.00005 per run start. Use `maxTotalPosts` to cap spend.

### Notes

- Only public data is collected. Paid content beyond the free preview is never accessed.
- Respect authors' copyright when reusing text.

### FAQ

**Does it work with custom domains?** Yes, paste the newsletter's homepage URL.
**Can I get only new posts every day?** Yes, schedule it with `postedSince`.
**Export formats?** JSON, CSV, Excel, XML, or via the Apify API.

# Actor input Schema

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

Newsletter URLs (https://name.substack.com or custom domains like https://www.lennysnewsletter.com), substack.com/@handle profile URLs, or just the subdomain name (e.g. platformer).

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

Newest posts first. Leave empty for the whole archive (up to 1,000).

## `postedSince` (type: `string`):

Only posts published on or after this date.

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

Keep posts whose title or subtitle contains any of these words (case-insensitive).

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

Skip paid-subscriber posts (their full text isn't public anyway).

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

Fetch each post's full article text (free posts) or public preview (paid posts) as clean text. Same price either way.

## `maxTotalPosts` (type: `integer`):

Hard cap for the whole run, to control cost.

## Actor input object example

```json
{
  "publications": [
    "https://www.lennysnewsletter.com"
  ],
  "maxPostsPerPublication": 20,
  "freeOnly": false,
  "includeContent": true
}
```

# Actor output Schema

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

All results 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 = {
    "publications": [
        "https://www.lennysnewsletter.com"
    ],
    "maxPostsPerPublication": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("tali-works/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 = {
    "publications": ["https://www.lennysnewsletter.com"],
    "maxPostsPerPublication": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tali-works/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/8jArlEItDYNwKherm/builds/YoW4Bvhv9ufh6OcCF/openapi.json
