# Substack Scraper 📰 (newsletter posts, full text, archive) (`tagadanar/substack-scraper`) Actor

Substack newsletter posts as flat rows: title, date, authors, likes, comments, paid/free, word count and optional full text, from any newsletter's archive or post URLs. Custom domains work. No API key, no login.

- **URL**: https://apify.com/tagadanar/substack-scraper.md
- **Developed by:** [Tagada Data](https://apify.com/tagadanar) (community)
- **Categories:** News, 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 $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 Scraper 📰 (newsletter posts, full text, archive)

Give it Substack newsletters (a name like `lenny`, a `*.substack.com` address or the newsletter's own domain) and get every post of the archive, newest first, as flat rows: title, subtitle, publish date, authors, likes, comments, restacks, tags, paid or free, word count and, on request, the full text. Post URLs work too. Filter by date or by keyword, and deduplicate across sources.

**$1.00 per 1,000 posts on Free ($0.70 on Gold), plus $0.001 per run. Platform usage is included.** Full text costs the same. No API key, no login, no proxy needed.

### What you get

One flat row per post. Fields Substack does not publish for a post are null.

| Field | What it is |
| --- | --- |
| `postId` | Substack's numeric post id |
| `url` | The post's canonical URL |
| `slug` | The post slug (the part after `/p/`) |
| `title`, `subtitle` | Title and subtitle |
| `postType` | Substack's post type, e.g. `newsletter`, `podcast` or `thread` |
| `audience` | `everyone` (free) or `only_paid` / `founding` (paid) |
| `isPaywalled` | true when the post is for paying subscribers |
| `publishedAt` | Publish date (ISO 8601) |
| `updatedAt` | Last edit (only with full text, or for post URLs) |
| `wordCount` | Substack's word count of the whole post |
| `reactionCount`, `commentCount`, `restackCount` | Likes, comments and restacks |
| `authors`, `authorHandles` | Byline names and Substack handles |
| `tags` | The newsletter's tags on the post |
| `coverImage` | Cover image URL |
| `podcastUrl`, `podcastDurationSeconds` | Audio file and length for podcast posts |
| `language` | Post language |
| `previewText` | The opening of the post, as Substack shows it in lists |
| `fullText` | Plain-text body (with "Include full post text", and always for post URLs) |
| `fullTextWordCount` | Words in `fullText` |
| `fullTextIsPreview` | true for paid posts: Substack only gives the free preview |
| `fullTextTruncated` | true when the body was cut at 200,000 characters |
| `publicationId`, `publicationName`, `publicationSubdomain`, `publicationDomain` | The newsletter |
| `source` | The input entry this row came from |
| `retrievedAt` | When the row was fetched (ISO 8601) |

### Who uses it

- **Sponsorship and partnership teams**: list a newsletter's whole archive with likes and comments per post to see what lands with its readers before buying an ad slot.
- **Researchers and analysts**: pull the full text of free posts from many newsletters for topic, sentiment or cadence analysis, or as a corpus for AI/RAG.
- **Writers and newsletter operators**: watch competitors' new posts on a schedule with "Published after", and benchmark engagement.

### Examples

Prefill: the 20 newest posts of two newsletters.

```json
{"newsletters":["https://www.lennysnewsletter.com","simonw.substack.com"],"maxPostsPerNewsletter":20}
```

The full archive of one newsletter, with the text of each post:

```json
{"newsletters":["simonw.substack.com"],"maxPostsPerNewsletter":10000,"includeFullText":true}
```

New posts since a date across several newsletters (for a scheduled run):

```json
{"newsletters":["lenny","noahpinion.blog","www.astralcodexten.com"],"publishedAfter":"2026-10-01"}
```

Posts of a newsletter about one topic, using Substack's own archive search:

```json
{"newsletters":["simonw.substack.com"],"searchTerm":"llm","maxPostsPerNewsletter":100}
```

Single posts by URL (always with the full text):

```json
{"postUrls":["https://www.lennysnewsletter.com/p/how-to-tell-if-a-startup-has-a-moat"]}
```

### Results, zeros and errors

- Posts come newest first; "Max posts per newsletter" sets how far back to go. With "Published after", reading stops at the first older post.
- A newsletter or post that does not exist (Substack answers 404) is reported as NOT FOUND and costs nothing.
- A newsletter with no posts, or none after your date, is named as such in the status and costs nothing.
- Speed: without full text, one request brings 25 posts. With full text, each post is one more request, about 1-2.5 s per post once Substack's limit kicks in (80 posts in 150 s on a test run); raise the run timeout for big full-text archives. A run stopped by its timeout keeps and names what it delivered.
- Substack limits how fast one address may ask. The actor paces its requests and waits when Substack says "too many requests"; a source still refused after that is named in the status as REFUSED and never reported as empty.
- Invalid input (for example a substack.com/@author profile link instead of a newsletter address) ends the run right away with an "Input error: ..." message and only the $0.001 start charge.

### Pricing

- $0.001 per run (start).
- $1.00 per 1,000 posts on Free, with lower prices on higher Apify plans ($0.70 per 1,000 on Gold). Platform usage is included.
- Full text is included at the same price.

Set a maximum charge per run in Apify if you want a hard ceiling; the actor stops at it and says so in the status.

### FAQ

**Does it get the full text of paid posts?** No. Substack gives non-subscribers the free preview of a paid post; the row has that preview and `fullTextIsPreview: true`. Free posts come in full.

**Does it work with custom domains?** Yes. Give the newsletter's own domain (www.lennysnewsletter.com) or its substack.com address; both read the same archive.

**How far back can it go?** The whole archive: the actor follows Substack's archive pages until the newsletter's first post or your limit.

**Can I give an author profile (substack.com/@name)?** Not yet: give the address of the author's newsletter instead.

### Data use

Data comes from the public JSON that Substack serves to every visitor of a newsletter's web pages. It holds the authors' public bylines and no reader data. You are responsible for using it in line with Substack's terms and the laws that apply to you, including copyright on the posts' text.

# Changelog

This Actor's version history is a separate document: https://apify.com/tagadanar/substack-scraper/changelog.md

# Actor input Schema

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

Substack newsletters, one per line: a name (lenny), a substack.com address (simonw.substack.com) or the newsletter's own domain (https://www.lennysnewsletter.com). Returns its posts, newest first, with titles, dates, authors, likes, comments and paywall status. Up to 200 sources per run.

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

Single posts, one per line, e.g. https://simonw.substack.com/p/vibe-engineering. Each returns one row with the full text (the free preview for paid posts).

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

How far back to go in each newsletter's archive, newest first. Default 50, max 10,000. You only pay for posts delivered.

## `includeFullText` (type: `boolean`):

Adds the plain-text body of each newsletter post (fullText). Paid posts give the free preview only (fullTextIsPreview = true). Same price per post; runs are slower because each post is one more request.

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

Only posts published on or after this date, e.g. 2026-10-01. Handy for scheduled runs that watch for new posts.

## `searchTerm` (type: `string`):

Optional keyword: only posts of each newsletter that Substack's own archive search matches (e.g. AI agents). Results come in Substack's relevance order.

## Actor input object example

```json
{
  "newsletters": [
    "https://www.lennysnewsletter.com",
    "simonw.substack.com"
  ],
  "maxPostsPerNewsletter": 20,
  "includeFullText": false
}
```

# Actor output Schema

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

One item per post 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 = {
    "newsletters": [
        "https://www.lennysnewsletter.com",
        "simonw.substack.com"
    ],
    "maxPostsPerNewsletter": 20
};

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

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

```

## MCP server setup

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