# Substack Newsletter & Posts Scraper (`slavako/substack-newsletter-scraper`) Actor

Extract Substack newsletters, posts, clean Markdown, author B2B profiles, reaction counts, and subscriber tiers without login or cookies. Standby MCP ready.

- **URL**: https://apify.com/slavako/substack-newsletter-scraper.md
- **Developed by:** [Sviatoslav](https://apify.com/slavako) (community)
- **Categories:** Marketing, News, Lead generation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 substack post results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Newsletter & Posts Scraper

[![No Login Required](https://img.shields.io/badge/Auth-No_Login_Required-brightgreen?style=flat-square)](https://apify.com/slavako/substack-newsletter-scraper)
[![Author B2B Leads](https://img.shields.io/badge/Leads-Author_Profiles_%26_Socials-blue?style=flat-square)](https://apify.com/slavako/substack-newsletter-scraper)
[![MCP Ready](https://img.shields.io/badge/AI_Agents-MCP_Ready-blue?style=flat-square)](https://apify.com/slavako/substack-newsletter-scraper)
[![Pay-Per-Event](https://img.shields.io/badge/Pricing-from_$1.00_/_1k-orange?style=flat-square)](https://apify.com/slavako/substack-newsletter-scraper)
[![Zero Proxies](https://img.shields.io/badge/Proxies-Zero_Cost-informational?style=flat-square)](https://apify.com/slavako/substack-newsletter-scraper)

High-speed, zero-cost Substack scraper designed for competitive intelligence, content marketing, creator lead generation, and LLM knowledge bases. Extracts newsletters, articles, clean Markdown, author B2B profiles, reaction counts, and subscriber tiers without login or cookies.

***

### ⚡ Key Features

- **🔒 100% No Login / No Cookies Required**: Queries official public API endpoints directly without browser automation, session bans, or residential proxy surcharges.
- **📝 Clean Markdown Articles**: Automatically converts post HTML into clean, boilerplate-free GitHub Flavored Markdown (headings, lists, tables, code blocks).
- **💼 Author & Publication B2B Intel**: Extracts creator name, bio, Twitter/X handle, profile image, subscriber leaderboard tiers, and publication logos.
- **📊 Rich Engagement Metrics**: Captures reaction/like counts, comment counts, published dates, and word counts.
- **🔄 Auto-Pagination**: Uses modern cursor-based pagination to seamlessly traverse newsletter archives.
- **🎯 Flexible Input Normalization**: Accepts plain handles (e.g. `pragmaticengineer`), subdomains (e.g. `sinocism.substack.com`), custom domains (e.g. `newsletter.pragmaticengineer.com`), or direct post URLs.
- **🤖 Standby MCP Mode**: Native Model Context Protocol (MCP) server running at `/mcp` or `/api/posts` for instant AI agent tool execution with zero cold starts.

***

### 💰 Pay-Per-Event (PPE) Transparent Pricing

Never pay flat monthly plans or expensive proxy fees. You are billed strictly per event:

| Event | Cost | Description |
|---|---|---|
| **Actor Start (`apify-actor-start`)** | **$0.003** / run | Initialization & environment setup |
| **Post Result (`apify-default-dataset-item`)** | **$0.001** / post ($1.00 per 1k records) | Metadata, title, author, reactions, comments (Primary event) |
| **Full Content Enriched (`substack-content-enriched`)** | **$0.002** / article ($2.00 per 1k records) | Full article body converted to clean Markdown |

*Free tier accounts can extract up to 15 posts per run for free testing.*

***

### 🔗 Step-by-Step Integrations

#### 1. Clay Outbound Enrichment (Creator & Author Leads)

Substack writers are top influencers, agency owners, and SaaS founders:

1. In your **Clay** workbook, create an **HTTP API** enrichment column.
2. Target URL: `https://api.apify.com/v2/acts/slavako~substack-newsletter-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN`
3. Method: `POST` with JSON Body:

```json
{
  "newsletters": ["{{newsletter_handle}}"],
  "maxPostsPerNewsletter": 5,
  "includeFullContent": false
}
```

4. Extract `author.name`, `author.twitter`, and `publication.heroText` for automated outreach.

***

#### 2. n8n / Make Workflow (Sync New Tech Articles to Google Sheets)

Automate weekly content curation or competitor monitoring:

1. In **n8n**, add an **HTTP Request** node calling the Apify Actor API.
2. Connect a **Google Sheets** node with `Append row` mapping:
   - `Title`: `{{$json.title}}`
   - `Author`: `{{$json.author.name}}`
   - `Reactions`: `{{$json.reactionsCount}}`
   - `Comments`: `{{$json.commentsCount}}`
   - `Canonical URL`: `{{$json.canonicalUrl}}`
3. Schedule on a weekly cron trigger.

***

#### 3. Cursor & Claude Desktop (MCP Agent Integration)

Add this to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "substack-scraper": {
      "command": "npx",
      "args": ["-y", "@apify/mcp-server", "--actor", "slavako/substack-newsletter-scraper"]
    }
  }
}
```

Ask Claude: *"Fetch the 5 latest articles from Pragmatic Engineer and summarize the main engineering management insights"*.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `newsletters` | Array of strings | `["pragmaticengineer", "sinocism"]` | Handles, subdomains, or custom domain URLs |
| `postUrls` | Array of strings | `[]` | Direct URLs to individual Substack posts |
| `maxPostsPerNewsletter` | Integer | `20` | Maximum posts to scrape per newsletter |
| `includeFullContent` | Boolean | `true` | Fetch full article body and convert to clean Markdown |
| `audienceFilter` | Enum | `"all"` | `"all"` (free + paid), `"everyone"` (free only), `"only_paid"` |
| `searchKeyword` | String | `""` | Filter posts matching keyword in title or subtitle |

***

### 📤 Output Dataset Format

```json
{
  "id": 224627630,
  "publication": {
    "name": "The Pragmatic Engineer",
    "subdomain": "pragmaticengineer",
    "customDomain": "newsletter.pragmaticengineer.com",
    "url": "https://newsletter.pragmaticengineer.com",
    "heroText": "Big Tech and startups, from the inside. Highly relevant for software engineers...",
    "logoUrl": "https://substack-post-media.s3.amazonaws.com/...",
    "copyright": "Gergely Orosz"
  },
  "author": {
    "name": "Gergely Orosz",
    "handle": "pragmaticengineer",
    "bio": "Big Tech and startups from the inside. Especially relevant for software engineers...",
    "twitter": "GergelyOrosz",
    "photoUrl": "https://substack-post-media.s3.amazonaws.com/...",
    "bestsellerTier": 10000
  },
  "title": "The Pulse: What can we learn from the Railway hack?",
  "subtitle": "Also: native mobile and frontend jobs are disappearing...",
  "slug": "the-pulse-what-can-we-learn-from-114",
  "canonicalUrl": "https://newsletter.pragmaticengineer.com/p/the-pulse-what-can-we-learn-from-114",
  "publishedAt": "2026-11-12T18:53:19.570Z",
  "audience": "only_paid",
  "wordCount": 1420,
  "reactionsCount": 32,
  "commentsCount": 0,
  "coverImageUrl": "https://substackcdn.com/image/fetch/...",
  "bodyMarkdown": "# The Pulse: What can we learn from the Railway hack?\n\nEarlier this week...",
  "scrapedAt": "2026-11-13T21:40:00.000Z"
}
```

***

### 📄 License

Apache-2.0

# Actor input Schema

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

List of Substack newsletters to scrape. Accepts slugs (e.g. 'pragmaticengineer'), subdomains (e.g. 'sinocism.substack.com'), or custom domains (e.g. 'https://newsletter.pragmaticengineer.com').

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

Direct URLs to individual Substack posts (e.g. 'https://newsletter.pragmaticengineer.com/p/the-pulse-what-can-we-learn-from-114').

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

Maximum number of posts to extract per newsletter.

## `includeFullContent` (type: `boolean`):

When enabled, fetches full post body and converts it into clean, boilerplate-free Markdown.

## `audienceFilter` (type: `string`):

Filter posts by access level: 'all' (free + paid), 'everyone' (free only), or 'only_paid' (paid only).

## `searchKeyword` (type: `string`):

Filter posts containing this keyword in the title or subtitle.

## Actor input object example

```json
{
  "newsletters": [
    "pragmaticengineer",
    "sinocism"
  ],
  "maxPostsPerNewsletter": 20,
  "includeFullContent": true,
  "audienceFilter": "all"
}
```

# Actor output Schema

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

Extracted Substack posts, clean Markdown, author profiles, and engagement statistics.

# 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": [
        "pragmaticengineer",
        "sinocism"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("slavako/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": [
        "pragmaticengineer",
        "sinocism",
    ] }

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

```

## MCP server setup

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