# Substack Posts and Comments Scraper (Public Posts Only) (`cyrus_1/substack-posts-and-comments`) Actor

Read public Substack newsletters. You get one row per post with metadata and the full text of free posts, and optionally comments. Paywalled text is never requested. A new-posts mode returns only what appeared since your last run. No login or API key.

- **URL**: https://apify.com/cyrus_1/substack-posts-and-comments.md
- **Developed by:** [Mohamed Ayman](https://apify.com/cyrus_1) (community)
- **Categories:** News, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 post with texts

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

Scrape public Substack newsletters into clean rows: post metadata, the full text of free posts, and optionally comments, with a new-posts-only mode, for researchers, marketers and content teams. It costs $1 per 1,000 posts without text, $2 per 1,000 free posts with text and $0.50 per 1,000 comments; newsletters that cannot be read are free.

Public posts only, never paywalled. No login, no API key, no proxy.

### Substack Posts and Comments Scraper (Public Posts Only)

- **Posts:** title, subtitle, date, word count, reaction, comment and restack counts, section, language, cover image and link.
- **Full text of free posts** as plain text or HTML.
- **Comments** (optional) of free posts, with replies right after their parent.

**Paywalled posts are never read.** A post that is not open to everyone is detected from the newsletter's listing, marked `paywalled: true` and delivered with its public metadata only. The actor never requests its text, never asks for its comments, and never tries to get around a paywall. As a second check, the full text of a free post is thrown away unseen if the post's own record says it is not open to everyone.

### Quick start

Paste this input as it is. An empty input reads Substack's own newsletter, `on`.

```json
{
  "publications": ["on"],
  "maxPostsPerPublication": 10,
  "includeContent": true,
  "includeComments": false
}
```

### Example output

One post row from a real run on that input (text shortened, image link shortened):

```json
{
  "rowType": "post",
  "publication": "on.substack.com",
  "postId": 224336948,
  "slug": "your-substack-now-with-more-ways",
  "url": "https://on.substack.com/p/your-substack-now-with-more-ways",
  "title": "Your Substack, now with more ways to customize",
  "subtitle": "New website design tools are here: a Mini-Editor to play with and a Full Editor to fine-tune your site",
  "postDate": "2026-11-12T17:31:44.927Z",
  "updatedAt": "2026-11-13T22:33:25.821Z",
  "audience": "everyone",
  "postType": "newsletter",
  "wordCount": 1312,
  "commentCount": 0,
  "reactionCount": 1723,
  "restackCount": 275,
  "coverImage": "https://substackcdn.com/image/fetch/…",
  "authors": [],
  "tags": [],
  "section": "Product",
  "language": "en",
  "paywalled": false,
  "contentIncluded": true,
  "contentFormat": "text",
  "content": "Illustrations by Edward Cheng, product designer at Substack\n\nToday we’re launching new website design tools that give you more control over how your Substack looks and feels. …",
  "contentError": null,
  "charges": 1,
  "scrapedAt": "2026-11-19T12:14:45+00:00"
}
```

`audience` is `everyone` for free posts. `authors` lists public bylines (name and handle) when Substack provides them. `contentError` says why a free post has no text, for example an audio-only post.

Other rows:

- **Newsletter status row** (`rowType: "publication"`, never charged): `status` (`ok`, `not_found`, `blocked`, `rate_limited`, `error`, `invalid`, `blocked_on_request`), `error`, counts and `newestPostDate`. A newsletter that cannot be read gives a status row and no charge.
- **Comment row** (`rowType: "comment"`): `commentId`, `parentCommentId`, `depth`, `authorName`, `authorHandle`, `content`, `commentDate`, `reactionCount`. Deleted and hidden comments are skipped.

### Use cases

- Monitor the newsletters you follow or compete with, and get only new posts on a schedule.
- Build a research dataset of public Substack posts for analysis, with the rights caveats below.
- Track which posts get the most reactions and restacks in a niche.
- Collect public comments on free posts to study reader response.
- Pull post titles, dates and links into a spreadsheet or content calendar.
- Feed free posts from chosen newsletters into your own notes or search tool.

### Input

| Field | Default | What it does |
|---|---|---|
| `publications` ("Newsletters") | `on` | Newsletter names (`noahpinion`), addresses (`https://noahpinion.substack.com`) or custom domains |
| `maxPostsPerPublication` | 10 | Cap per newsletter per run, newest first |
| `includeContent` | true | Include the text of free posts |
| `contentFormat` | `text` | `text` or `html` |
| `includeComments`, `maxCommentsPerPost` | false, 50 | Comments of free posts |
| `onlyNewPosts` | false | Only posts newer than the last delivered one |
| `sinceDate` | none | Skip posts older than a date (`YYYY-MM-DD`) |
| `cursorStoreName` | `substack-cursors` | Named key-value store, in your own account, that holds the last delivered post per newsletter |

### How much does it cost?

- **$2 per 1,000 posts with text** (`post-with-content`): a free post delivered with its text.
- **$1 per 1,000 posts without text** (`post`): metadata only, a paywalled post (title, date, counts and link), or a free post whose text could not be read. Charged instead of `post-with-content`, never both.
- **$0.50 per 1,000 comments** (`comment`).
- Free: newsletter status rows and newsletters that fail.
- Apify adds a very small run-start charge, shown on the Pricing tab.

**Worked example with the free $5 monthly credit.** Apify's free plan includes $5 of credit each month. That reads about 2,500 free posts with text. Watching 20 newsletters, each publishing about three free posts a week, is roughly 240 posts a month: $0.48.

To cap spending, set a maximum cost per run in the run options. The actor stops cleanly when it is reached, and with `onlyNewPosts` on, nothing is skipped or charged twice.

### Limits

- Only what Substack serves to anonymous visitors. No paid or subscriber-only content, no private posts, no subscriber lists, no profiles.
- Requests are sequential, at most two a second, with retries on rate limiting. Heavy use may still be limited by Substack.
- Newest posts come first. Very old posts of very large archives take extra paging, which costs time but not charges.
- The endpoints are Substack's own, not a documented API, and can change without notice.
- Custom-domain newsletters work when they are still served by Substack. Addresses that resolve to private or internal networks are refused.
- Comment author names and handles are public display names, which can be personal data. Use them lawfully.

### Terms of use and taking content down

**Substack's Terms of Use prohibit scraping.** They say users may not use Substack in a manner that "crawls, scrapes, or spiders any page, data, or portion of Substack" or that "copies or stores any significant portion of the content on Substack" (https://substack.com/tos, as read 19 Nov 2026). This actor reads only public pages and public endpoints, never paywalled text and nothing behind a login, but **you are responsible for how you use the data**: writers keep the rights to their posts, and republishing or training on them can infringe those rights.

**Taking content down on request.** If you write or comment on Substack and want to be left out:

1. Open an issue on this actor's Apify Store page (the Issues tab), or message the publisher through the Apify Store profile. Name the newsletter address (and, for comments, your Substack handle).
2. The publisher adds the newsletter or handle to the actor's takedown list and publishes a new build. From then on, listed newsletters return a `blocked_on_request` status row with no requests made and no charge, and listed handles are skipped in comment rows.
3. The actor stores nothing itself: rows exist only in the dataset of the user who ran it, in that user's own Apify account. The publisher cannot reach or delete those datasets. A user who is told that a newsletter or author asked to be removed should delete the matching rows from their datasets.

Writers also control who can see their work: making a post paid or private takes it out of reach of this actor immediately.

### FAQ

**Does it read paywalled posts?**
No. Paywalled posts are detected from the newsletter's listing and delivered with public metadata only, marked paywalled true. The actor never requests their text or comments and never tries to get around a paywall. As a second check, a free post's text is discarded if its own record says it is not open to everyone.

**Are paywalled posts charged?**
A paywalled post is delivered as a metadata-only row and charged as a normal post, $0.001, because you receive its title, date, counts and link. The $0.002 rate applies only to free posts delivered with text. Newsletter status rows and newsletters that cannot be read are free.

**How does new-posts-only mode work?**
Turn on onlyNewPosts. The first run delivers the newest posts and remembers the newest one in a named key-value store in your account. Later runs deliver only newer posts. If more are new than your cap allows, the oldest new ones come first and the next run continues, so nothing is skipped or charged twice.

**Is it allowed?**
Substack's Terms of Use prohibit scraping, and writers keep the rights to their posts. The actor reads only public pages and public endpoints, never paywalled text and nothing behind a login, but you are responsible for how you use the data. Republishing or training on posts can infringe the authors' rights. Read the terms first.

**What if I am a writer and want to be left out?**
Open an issue on this actor's Apify Store page, or message the publisher through the Store profile, naming the newsletter address and, for comments, your Substack handle. The publisher adds it to a takedown list in the next build. Listed newsletters then return a blocked_on_request status row with no requests made and no charge.

**Does it need a login, and what can go wrong?**
No login, key or proxy. It reads the same public JSON endpoints that the Substack website uses, at most two requests a second, so large archives take time. These endpoints are Substack's own rather than a documented API and can change without notice, which can break a run. Failed newsletters give a free status row.

**Can I schedule it, or call it from n8n, Make or an agent?**
Yes. Schedule it in Apify Schedules, ideally with onlyNewPosts on so each run delivers only new posts, or call it through the Apify API. n8n, Make and Zapier have Apify integrations, and AI agents can run it through Apify's MCP server. Rows land in the default dataset as JSON, CSV or Excel.

### Use from code or an AI agent

The actor runs under limited permissions. Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("cyrus_1/substack-posts-and-comments").call(
    run_input={"publications": ["on"], "maxPostsPerPublication": 5, "onlyNewPosts": True}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["rowType"] == "post":
        print(row["postDate"], row["title"], row["paywalled"])
```

The same input works with the JavaScript client, the REST API, n8n, Make and Zapier. AI agents can find and run the actor through Apify's MCP server (the `search-actors`, `fetch-actor-details` and `call-actor` tools).

### Licences

Open-source parts: Apify SDK (Apache-2.0), httpx2 (BSD-3-Clause), Beautiful Soup (MIT) and lxml (BSD-3-Clause). Post and comment text belongs to its authors.

### More from this publisher

- [RSS and Atom Feed Reader (new items only)](https://apify.com/cyrus_1/rss-atom-feed-reader) reads any feed, including newsletters that publish one, with its own new-items-only mode.
- [Telegram Public Channel Scraper](https://apify.com/cyrus_1/telegram-public-channel-scraper) reads public Telegram channels, with a new-posts-only mode.
- [Bluesky Posts and Profiles Scraper](https://apify.com/cyrus_1/bluesky-posts-profiles) reads public Bluesky accounts and feeds.

# Actor input Schema

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

Substack names (noahpinion), addresses (https://noahpinion.substack.com) or custom domains of newsletters. The default is Substack's own newsletter, on.substack.com.

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

Cap per newsletter per run, newest first.

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

Fetch the full text of posts open to everyone (event post-with-content). Off: metadata only (event post). Paywalled posts never include text.

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

Readable text, or the post's HTML.

## `includeComments` (type: `boolean`):

Add one row per comment (event comment) for posts open to everyone.

## `maxCommentsPerPost` (type: `integer`):

Comments are read best first, replies after their parent.

## `onlyNewPosts` (type: `boolean`):

Remember the newest delivered post of each newsletter and deliver only newer ones next time. The first run delivers the newest posts as usual. If more posts are new than the cap allows, the oldest new ones come first and the next run continues, so nothing is skipped or charged twice.

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

Skip posts older than this date (YYYY-MM-DD).

## `cursorStoreName` (type: `string`):

Named key-value store, in your own account, that remembers the last post of each newsletter for onlyNewPosts.

## Actor input object example

```json
{
  "publications": [
    "on"
  ],
  "maxPostsPerPublication": 10,
  "includeContent": true,
  "contentFormat": "text",
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "onlyNewPosts": false,
  "cursorStoreName": "substack-cursors"
}
```

# Actor output Schema

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

One row per post (metadata, and the text of free posts), per comment (if requested) and per newsletter (status). Paywalled posts have metadata only.

# 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": [
        "on"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cyrus_1/substack-posts-and-comments").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": ["on"] }

# Run the Actor and wait for it to finish
run = client.actor("cyrus_1/substack-posts-and-comments").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": [
    "on"
  ]
}' |
apify call cyrus_1/substack-posts-and-comments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cyrus_1/substack-posts-and-comments"
        }
    }
}
```

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/gdkQ3uZq4wei2jO3n/builds/J5w2XYU3oefTZjFEs/openapi.json
