# Substack Newsletter Scraper (`latam_data/substack-newsletter-scraper`) Actor

Scrape posts, full text, likes, comments and authors from any Substack newsletter or custom domain. Filter by date, keyword or free/paid. Fast, no login, export to JSON, CSV or Excel.

- **URL**: https://apify.com/latam_data/substack-newsletter-scraper.md
- **Developed by:** [Cristian Camilo Gomez Diaz](https://apify.com/latam_data) (community)
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 post scrapeds

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

### What does Substack Newsletter Scraper do?

**Substack Newsletter Scraper** extracts posts from any [Substack](https://substack.com) newsletter, including newsletters on custom domains. For every post you get the **title, subtitle, URL, publish date, authors, likes, comments, restacks, word count, tags, free/paid status** and, optionally, the **full article text or HTML**.

It reads Substack's public JSON endpoints instead of rendering pages, so it is **fast (about 50 posts with full text in under 10 seconds) and cheap**. No login, no cookies, no browser.

### Why scrape Substack?

- 🧠 **AI & RAG pipelines**: feed clean plain-text articles into LLMs, embeddings or a knowledge base.
- 📈 **Content research**: find which topics and formats get the most likes, comments and restacks.
- 🕵️ **Competitor and market monitoring**: track what newsletters in your niche publish, and how often.
- 📰 **Media monitoring**: schedule the Actor daily with a date filter to get only new posts.
- 📚 **Archiving & analysis**: export a newsletter's full archive to JSON, CSV or Excel.

### How to scrape Substack

1. Click **Try for free**.
2. Add one or more newsletters in **Newsletters or post URLs**. All of these work:
   - `https://www.lennysnewsletter.com` (custom domain)
   - `platformer.substack.com`
   - `platformer` (just the name)
   - `https://www.astralcodexten.com/p/some-post` (a single post)
3. Set **Max posts per newsletter** (newest first; use a large number for the full archive).
4. Optionally filter by **keyword**, **date range**, or **skip paid posts**.
5. Click **Start** and download your data as JSON, CSV, Excel or HTML.

### Input example

```json
{
    "newsletters": ["https://www.lennysnewsletter.com", "platformer"],
    "maxPostsPerNewsletter": 100,
    "includeContent": true,
    "contentFormat": "text",
    "dateFrom": "2026-01-01"
}
```

### Output example

```json
{
    "newsletterUrl": "https://www.astralcodexten.com",
    "postId": 225455324,
    "title": "Varieties Of Discourseposting",
    "subtitle": null,
    "url": "https://www.astralcodexten.com/p/varieties-of-discourseposting",
    "publishedAt": "2026-11-18T07:47:03.648Z",
    "type": "newsletter",
    "audience": "everyone",
    "isPaid": false,
    "authors": ["Scott Alexander"],
    "wordCount": 1552,
    "likes": 89,
    "commentCount": 45,
    "restacks": 5,
    "tags": [],
    "coverImage": null,
    "hasPodcast": false,
    "contentIsPreviewOnly": false,
    "contentText": "I'm teaching at the Inkhaven blogging fellowship again this..."
}
```

### How much does it cost to scrape Substack?

This Actor uses **pay per result**: you only pay for the posts you get, plus a tiny start fee. See the **Pricing** tab for the current price. Apify's free plan includes monthly credits, enough to try it on thousands of posts for free.

Turn off **Include full post content** for an even faster, metadata-only run.

### Tips

- **Paid posts**: subscriber-only posts return only the public preview. The field `contentIsPreviewOnly` tells you when that happens. Use **Skip paid posts** to keep only free posts.
- **Only new posts**: schedule the Actor (for example daily) and set **Published after** to get only fresh posts.
- **Many newsletters**: if you scrape hundreds of newsletters at once and see errors, enable the **Proxy** option (Apify Proxy, or your own proxies such as [Webshare](https://www.webshare.io/?referral_code=v5e0reweus4m)). For heavily protected sites, a scraping API like [ScraperAPI](https://www.scraperapi.com/?fp_ref=camilo-66b5f5) also works.

### Integrations and API

Use the results anywhere: connect the Actor to [Make](https://www.make.com/en/register?pc=latamdata), Zapier, n8n, Google Sheets, Slack or webhooks, or call it from code with the [Apify API](https://docs.apify.com/api/v2). New to Apify? [Create a free account here](https://apify.com?fpr=rfn03e).

### Is it legal to scrape Substack?

This Actor collects only publicly available posts that newsletters publish on the open web; it does not bypass paywalls or log in. Author names are included only as they appear in the public byline. You are responsible for how you use the data: respect copyright, Substack's terms and applicable privacy laws such as GDPR. If in doubt, consult a lawyer.

### Feedback

Found a bug or need an extra field? Open an issue in the **Issues** tab and it will be looked at quickly.

# Actor input Schema

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

Substack newsletters to scrape. Use a full URL (https://www.lennysnewsletter.com), a subdomain (platformer.substack.com), just the name (platformer) or a single post URL (.../p/post-slug). Custom domains work.

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

Newest posts first. Use a high number to get the full archive.

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

Download the article body. Turn off for a faster, metadata-only run (titles, dates, likes, comments).

## `contentFormat` (type: `string`):

Format of the article body: plain text, HTML, or both.

## `searchQuery` (type: `string`):

Only posts matching this keyword (uses the newsletter's own archive search).

## `dateFrom` (type: `string`):

Only posts published on or after this date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Only posts published on or before this date (YYYY-MM-DD).

## `skipPaidPosts` (type: `boolean`):

Paid posts only expose a preview without a subscription. Turn on to keep only free posts.

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

Usually not needed. Enable if you scrape many newsletters and get blocked.

## Actor input object example

```json
{
  "newsletters": [
    "https://www.astralcodexten.com"
  ],
  "maxPostsPerNewsletter": 20,
  "includeContent": true,
  "contentFormat": "text",
  "skipPaidPosts": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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.astralcodexten.com"
    ],
    "maxPostsPerNewsletter": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("latam_data/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.astralcodexten.com"],
    "maxPostsPerNewsletter": 20,
}

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

```

## MCP server setup

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