# Substack Scraper — posts, likes, restacks, full text (`scraper0917/substack-scraper`) Actor

Export any Substack archive (custom domains too): title, date, authors, per-emoji reactions, restacks, comments, paywall status, podcast/video flags, tags, optional full text — plus publication name, description and subscriber count. Incremental runs via sinceDate. No login.

- **URL**: https://apify.com/scraper0917/substack-scraper.md
- **Developed by:** [Ezden Notghi](https://apify.com/scraper0917) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Substack Scraper

Export any Substack newsletter's archive — on `*.substack.com` or a custom domain — as clean JSON / CSV / Excel. No login, no browser, no proxies: the Actor reads Substack's public archive feed, so counts are exact and runs finish in seconds.

**Per post:** title, subtitle, description, URL, date, type (newsletter / podcast / video / thread), authors with Substack handles, **per-emoji reactions** and total likes, **restacks**, comment and reply counts, word count, paywall status, tags, section, cover image, podcast URL and duration, video / voiceover flags, pinned flag, restack source, public preview text, and optionally the **full body** as HTML and plain text.

**Per publication:** name, author, description, subscriber count (exact when Substack displays a number, otherwise the tier such as "hundreds of thousands of subscribers"), custom domain, paid and podcast flags, podcast feed URL, language, logo, cover photo, creation date.

### Example post

```json
{
  "type": "post",
  "publicationName": "Noahpinion",
  "title": "Why you won’t get a flying car",
  "subtitle": "A review of “Where is My Flying Car?”, by J. Storrs Hall…",
  "url": "https://www.noahpinion.blog/p/why-you-wont-get-a-flying-car",
  "date": "2026-09-03T09:55:22.593Z",
  "postType": "newsletter",
  "paywalled": false,
  "authors": [{ "name": "Noah Smith", "handle": "noahpinion", "url": "https://substack.com/@noahpinion" }],
  "likes": 314, "reactions": { "❤": 314 }, "restacks": 35, "comments": 75, "childComments": 36,
  "wordcount": 4205,
  "coverImage": "https://substackcdn.com/image/fetch/…jpeg",
  "bodyText": "…full article text when includeBody is on…"
}
```

### Input

| Field | Default | Notes |
|---|---|---|
| `publications` | — | `lenny`, `noahpinion.substack.com`, `https://www.platformer.news` — one per line |
| `maxPostsPerPublication` | 50 | newest first; `0` = whole archive |
| `lastNDays` / `sinceDate` / `untilDate` | — | date window; use `sinceDate` on a schedule to fetch only new posts |
| `sort` | `new` | `top` returns Substack's most-liked order |
| `postTypes` | all | `newsletter`, `podcast`, `video`, `thread` |
| `audience` | all | `free` or `paid` posts only |
| `includeBody` | off | adds `bodyHtml` + `bodyText`; paywalled posts return the public preview with `bodyTruncated: true` |
| `includePublicationInfo` | on | one `publication` item per newsletter |

### Uses

- **Newsletter research / competitor tracking** — likes, restacks and comments per post, sorted by `top`.
- **Content archives** — `maxPostsPerPublication: 0` + `includeBody` for a full-text corpus (free posts in full, paid posts as previews).
- **Monitoring** — schedule daily with `lastNDays: 2`; only new posts are billed.
- **Discovery lists** — feed hundreds of subdomains, keep the `publication` items for author, description and subscriber tier.

### Honest limits

- Paywalled bodies are only the public preview — Substack does not expose paid text without a subscription, and this Actor never logs in.
- Substack shows exact subscriber numbers only for some publications; others get the tier text, returned verbatim in `subscribersText`.
- Bare names map to `<name>.substack.com`. A few big newsletters have an unrelated subdomain squatter, so paste the full URL for custom-domain publications.
- Notes (Substack's short-form feed) and comment threads are not included in this version.

### Pricing

Pay per result: one post or one publication record = one result. The free trial covers a first run.

### Support

Open an Issue on the Actor page; Substack markup changes are fixed quickly.

# Actor input Schema

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

Substack subdomains or URLs — `lenny`, `noahpinion.substack.com`, `https://www.noahpinion.blog` (custom domains work). Bare names resolve to `<name>.substack.com`, so when a newsletter has a custom domain, paste its URL to be safe.

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

Newest first. 0 = no limit (walks the whole archive, or back to `sinceDate`).

## `lastNDays` (type: `integer`):

Shortcut for `sinceDate`. Ignored when `sinceDate` is set.

## `sinceDate` (type: `string`):

Only posts published on/after this date (YYYY-MM-DD). Use on a schedule to fetch only new posts.

## `untilDate` (type: `string`):

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

## `sort` (type: `string`):

`top` is Substack's own popularity order — handy for finding a publication's best posts.

## `postTypes` (type: `array`):

Keep only these post types. Empty = all.

## `audience` (type: `string`):

Filter by paywall status.

## `includeBody` (type: `boolean`):

Add `bodyHtml` and `bodyText` for each post. Paywalled posts return only the public preview (`bodyTruncated: true`). Adds one request per post when the archive does not carry the body.

## `includePublicationInfo` (type: `boolean`):

Emit one `publication` item per newsletter: name, author, description, subscriber count (exact when Substack shows a number, otherwise the tier text), paid/podcast flags, logo.

## `concurrency` (type: `integer`):

Publications scraped in parallel (1–6).

## Actor input object example

```json
{
  "publications": [
    "lenny",
    "https://www.noahpinion.blog"
  ],
  "maxPostsPerPublication": 50,
  "sort": "new",
  "audience": "all",
  "includeBody": false,
  "includePublicationInfo": true,
  "concurrency": 3
}
```

# 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 = {
    "publications": [
        "lenny",
        "https://www.noahpinion.blog"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper0917/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 = { "publications": [
        "lenny",
        "https://www.noahpinion.blog",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scraper0917/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 '{
  "publications": [
    "lenny",
    "https://www.noahpinion.blog"
  ]
}' |
apify call scraper0917/substack-scraper --silent --output-dataset

```

## MCP server setup

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