# Substack Scraper - Newsletter Posts, Full Text & Profiles (`get_anything/substack-scraper`) Actor

Scrape any public Substack newsletter, custom domains too: posts with full clean text (LLM-ready), title, date, authors, word count, likes, comments and tags, plus newsletter profiles with subscriber counts. Single post URLs too. Full text included in the post price. No login or API key.

- **URL**: https://apify.com/get_anything/substack-scraper.md
- **Developed by:** [Get Anything](https://apify.com/get_anything) (community)
- **Categories:** News, AI, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.63 / 1,000 post with full texts

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 & Profiles

Scrape **any public Substack newsletter**, including ones on a **custom domain**, without logging in or using an API key. For every post you get the **full text** (clean and ready for AI tools), plus the title, subtitle, date, authors, word count, likes, comment count, restacks, tags, cover image and podcast link. You can also add **one newsletter profile** row with the name, description, author, subscriber count (when it is public), language, logo and RSS link.

**One event = one post with its full text.** You do not pay extra for the content.

Plain HTTP on Substack's public JSON endpoints. No browser, no proxy, so it is fast and cheap.

### What you can do with it

- **Feed newsletters to ChatGPT, Claude or your RAG pipeline.** The `text` field is clean Markdown-style text, with headings as `#` and list items as `-`.
- **Track creators and competitors.** Pull new posts on a schedule and send them to Slack, Sheets or your CRM.
- **Research and investing.** Collect a newsletter's full public archive with dates, likes and comment counts.
- **Lead lists for agencies and sponsors.** Newsletter profiles give you the author, subscriber count, language and links.
- **Read one post.** Paste a post URL and get just that post's text.

### Input

| Field | Description |
|---|---|
| `newsletters` | Subdomain name (`astralcodexten`), substack URL (`https://noahpinion.substack.com`), custom domain (`https://www.lennysnewsletter.com`) or author handle (`@noahpinion`). |
| `postUrls` | Optional single post links (`https://www.astralcodexten.com/p/<slug>`). |
| `maxPostsPerNewsletter` | Posts per newsletter (default 20). `0` = the whole public archive. |
| `sortBy` | `new` (newest first, default) or `top` (most popular first). |
| `postedAfter` | Only posts on or after this date (`YYYY-MM-DD`). |
| `includeNewsletterProfile` | One profile row per newsletter (default on). |
| `skipPaidPosts` | Leave out paid-only posts (default off; see FAQ). |
| `includeHtml` | Also return the original post HTML as `bodyHtml` (default off). |
| `maxRunSeconds` | Optional time budget. The run stops cleanly and keeps its data. |

Example:

```json
{
  "newsletters": ["astralcodexten", "https://www.noahpinion.blog", "@lenny"],
  "maxPostsPerNewsletter": 50,
  "postedAfter": "2026-09-01"
}
```

### Output

**Post** (`resultType: "post"`)

```json
{
  "resultType": "post",
  "newsletter": "astralcodexten",
  "newsletterName": "Astral Codex Ten",
  "postId": 212351021,
  "title": "Your Book Review: Orality and Literacy",
  "subtitle": "Finalist #15 in the Book Review contest",
  "slug": "your-book-review-orality-and-literacy",
  "url": "https://www.astralcodexten.com/p/your-book-review-orality-and-literacy",
  "date": "2026-11-06T21:31:52.233Z",
  "postType": "newsletter",
  "audience": "everyone",
  "isPaywalled": false,
  "fullTextAvailable": true,
  "authors": [{ "name": "Scott Alexander", "handle": "astralcodexten" }],
  "wordcount": 6967,
  "text": "Imagine that you are dropped seven thousand years in the past, right i ...",
  "textLength": 41055,
  "coverImage": "https://substackcdn.com/image/fetch/.../60f1843e-95d0-4f37-a92f-97b57af87310_2048x1152.png",
  "reactionCount": 185,
  "commentCount": 199,
  "restacks": 11,
  "tags": [],
  "podcastUrl": null,
  "language": "en",
  "scrapedAt": "2026-11-11T05:08:44.395462+00:00"
}
```

**Newsletter** (`resultType: "newsletter"`)

```json
{
  "resultType": "newsletter",
  "newsletter": "noahpinion",
  "name": "Noahpinion",
  "url": "https://www.noahpinion.blog",
  "customDomain": "www.noahpinion.blog",
  "description": "Economics and other interesting stuff",
  "authorName": "Noah Smith",
  "authorHandle": "noahpinion",
  "subscriberCount": 466000,
  "subscriberCountText": "466K+ subscribers",
  "freeSubscribersRange": "Hundreds of thousands",
  "language": "en",
  "createdAt": "2020-03-28T03:32:51.086Z",
  "rssUrl": "https://www.noahpinion.blog/feed"
}
```

| Field | Meaning |
|---|---|
| `text` | Full post text, cleaned. For paid posts it is the free preview only. |
| `fullTextAvailable` | `true` when `text` is the whole post. `false` for paid posts, which return the preview. |
| `audience` | `everyone`, `only_paid` or `founding`. |
| `wordcount` | Substack's word count for the whole post, including the paid part. |
| `reactionCount` / `commentCount` / `restacks` | Likes, comments and restacks at scrape time. |
| `subscriberCount` | Only when Substack shows it publicly on the author's profile, otherwise `null`. |
| `textError` | Only present if a free post's text could not be loaded (for example Substack kept rate-limiting). That row is **not charged**. |

If a newsletter returns no posts, you get one **free** `error` row that says why, for example *"no Substack publication at this address (HTTP 404)"*, *"no posts on or after 2026-09-01"*, or *"this subdomain redirects to the user profile"*. The run log and the `RUN_SUMMARY` record in the key-value store list posts per input.

### Use it from ChatGPT, Claude & AI agents

This Actor works as a tool for AI assistants through the **Apify MCP server**. It is pay-per-event, so agents can pay for it per post. The inputs are plain strings an agent can fill in.

- **Claude (claude.ai / Desktop), ChatGPT, Cursor, VS Code, Windsurf:** add this MCP server URL as a custom connector and sign in with your Apify account:

  ```
  https://mcp.apify.com/?tools=get_anything/substack-scraper
  ```

- **Claude Desktop / Cursor config file:**

  ```json
  { "mcpServers": { "apify": { "url": "https://mcp.apify.com/?tools=get_anything/substack-scraper" } } }
  ```

- **Any LLM framework or GPT Action (REST):** one call runs the Actor and returns the posts as JSON:

  ```
  POST https://api.apify.com/v2/acts/get_anything~substack-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN
  {"newsletters": ["noahpinion"], "maxPostsPerNewsletter": 5}
  ```

- **No-code:** Make, Zapier, n8n, LangChain and LlamaIndex all have Apify integrations.

Then ask, for example: *"Read the last 5 posts from Noahpinion and summarize his view on China."*

### Pricing

Pay per event, with no monthly fee:

- **Post with full text:** one event per post. The text is included and there is no separate content fee.
- **Newsletter profile:** one event per newsletter (turn it off with `includeNewsletterProfile: false`).
- A small start fee per run.

Error rows are free. You can see the current prices on the Pricing tab. Set a spending limit on the run and the Actor stops cleanly when it reaches it.

### FAQ

**Does it work with custom domains?** Yes. Paste the domain (for example `https://www.lennysnewsletter.com`) or the substack subdomain. Redirects are followed.

**Can it get paid posts?** It only returns what Substack shows to the public. For paid posts that is the free preview, marked with `fullTextAvailable: false`. It never logs in and never gets past a paywall. Turn on `skipPaidPosts` if you don't want previews.

**Does it scrape comments?** No. You get the comment count only.

**Do I need a proxy?** Usually not. If Substack rate-limits a run, the Actor waits and retries on its own.

**How far back can it go?** The whole public archive. Set `maxPostsPerNewsletter: 0`.

### Related actors

- [YouTube Transcript Scraper](https://apify.com/get_anything/youtube-transcript-scraper)
- [Google News Scraper](https://apify.com/get_anything/google-news-scraper)
- [arXiv Papers Scraper](https://apify.com/get_anything/arxiv-papers-scraper)
- [Telegram Channel Scraper - Posts, Views & Reactions](https://apify.com/get_anything/telegram-channel-scraper)

### ⭐ Like this Actor?

If it saved you time, please [leave a quick rating](https://apify.com/get_anything/substack-scraper/reviews). It helps other people find it, and it keeps it maintained. Found a bug or need a field? Open an [issue](https://apify.com/get_anything/substack-scraper/issues) and I'll respond quickly.

# Actor input Schema

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

Substack newsletters to scrape. Any of: the subdomain name ('astralcodexten'), a substack.com URL ('https://noahpinion.substack.com'), a custom domain ('https://www.lennysnewsletter.com') or the author's handle ('@noahpinion'). Each one returns its newest posts with full text.

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

Optional. Individual post links ('https://www.astralcodexten.com/p/<slug>') to read just those posts with full text. Works with custom domains.

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

How many posts to return per newsletter, newest first (or most popular first if Sort by = top). 0 = the whole public archive.

## `sortBy` (type: `string`):

'new' = newest posts first. 'top' = the newsletter's most popular posts first.

## `postedAfter` (type: `string`):

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

## `includeNewsletterProfile` (type: `boolean`):

Add one row per newsletter with name, description, author, subscriber count (when public), language, logo and RSS link. Charged per newsletter.

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

Paid-subscriber posts only show their free preview publicly. They are returned with the preview text and fullTextAvailable = false. Turn this on to leave them out (and not pay for them).

## `includeHtml` (type: `boolean`):

Also return the original post HTML (bodyHtml). Off by default: the clean 'text' field is smaller and better for AI tools.

## `maxRunSeconds` (type: `integer`):

Optional time budget. When it is spent (or 60 seconds before the run's timeout, whichever comes first), the scraper stops starting new work and keeps everything collected so far. 0 = only use the run timeout.

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

Usually not needed: Substack's public endpoints answer plain requests.

## Actor input object example

```json
{
  "newsletters": [
    "astralcodexten",
    "https://www.noahpinion.blog"
  ],
  "maxPostsPerNewsletter": 5,
  "sortBy": "new",
  "includeNewsletterProfile": true,
  "skipPaidPosts": false,
  "includeHtml": false,
  "maxRunSeconds": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Structured results in the default dataset - one item per post (with full text) and one per newsletter profile.

# 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": [
        "astralcodexten",
        "https://www.noahpinion.blog"
    ],
    "maxPostsPerNewsletter": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("get_anything/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": [
        "astralcodexten",
        "https://www.noahpinion.blog",
    ],
    "maxPostsPerNewsletter": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

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

```

## MCP server setup

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