# Substack Scraper – Newsletters, Subscribers & Posts (`genesis-tools/substack-scraper`) Actor

Scrape public Substack newsletters: publication name, author, description, public subscriber count, sections, and posts with title, date, free/paid flag, likes, comment counts and free post body text. Fast JSON API, no login.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 – Newsletters, Subscriber Counts, Posts & Full Text

Scrape **public Substack newsletter data** in seconds, with no login and no browser. For each publication you get the **name, URL, author, description, public subscriber count** (e.g. "Over 1,200,000 subscribers" → `1200000`), paid-subscriber tier, sections and categories. For each post you get the **title, subtitle, URL, publish date, author(s), free/paid flag, likes, comment count, restacks, word count, tags** and, if you want it, the **full plain-text body of free posts**. It works with `*.substack.com` and custom domains (e.g. lennysnewsletter.com). Export to JSON, CSV or Excel, or call it through the API.

### Why this Substack scraper

- **Fast and reliable:** it reads Substack's own public JSON (`/api/v1/archive`, `/api/v1/posts`) instead of fragile HTML, so it isn't broken by layout changes.
- **Sponsor-ready publication profiles:** subscriber counts and paid tiers where the writer has made them public, for newsletter sponsorship and outreach lists.
- **Clean free-vs-paid handling:** paid posts are flagged `isPaid: true` and never include paywalled text.
- **Polite by design:** it obeys robots.txt and uses randomized delays and low concurrency.

### What you can use it for

- **Newsletter sponsorship and ad buying:** rank newsletters by subscribers and engagement (likes, comments per post).
- **PR, outreach and influencer research:** build lists of writers by niche, with author bios and handles.
- **Content and market research:** track posting frequency, topics and engagement trends with scheduled runs.
- **AI/RAG and analysis:** pull free post text for summarization, sentiment and topic modeling, where you have the rights to use it.
- **Competitor monitoring:** see what rival newsletters publish and what performs.

### Input

| Field | Description |
|---|---|
| `publicationUrls` | Publication homepages (`https://www.lennysnewsletter.com`, `https://garymarcus.substack.com`), bare subdomains (`noahpinion`), or any post URL (it resolves to the publication). |
| `maxPostsPerPublication` | Newest posts per publication (default 20; 0 = publication profile only). |
| `includeBody` | Add the full plain text of **free** posts (default false). |
| `maxConcurrency`, `delayMs` | Politeness settings (defaults: 2 parallel requests, ~1 s randomized delay). |
| `proxyConfiguration` | Optional Apify Proxy. |

```json
{
  "publicationUrls": ["https://www.lennysnewsletter.com", "noahpinion", "https://garymarcus.substack.com"],
  "maxPostsPerPublication": 50,
  "includeBody": true
}
```

### Output

Each item has `type: "publication"` or `type: "post"`. The **Publications** and **Posts** views in the dataset tab separate them. See `sample-output.json` for real output.

```json
{
  "type": "publication",
  "name": "Lenny's Newsletter",
  "url": "https://www.lennysnewsletter.com",
  "author": "Lenny Rachitsky",
  "description": "Deeply researched product, growth, and career advice for product leaders, founders, and ambitious builders.",
  "subscriberCount": 1200000,
  "subscriberCountText": "Over 1,200,000 subscribers",
  "paidSubscribersText": "Tens of thousands of paid subscribers",
  "categories": ["Community wisdom", "How I AI", "AI", "Career", "Growth", "Product management"],
  "paymentsEnabled": true
}
```

```json
{
  "type": "post",
  "publicationName": "Noahpinion",
  "title": "Farewell, my Captain",
  "subtitle": "A TV character gave us a glimpse of what humanity might become.",
  "url": "https://www.noahpinion.blog/p/farewell-my-captain",
  "date": "2026-10-31T01:39:39.045Z",
  "author": "Noah Smith",
  "isPaid": false,
  "likes": 599,
  "commentCount": 52,
  "restacks": 78,
  "wordcount": 2038,
  "bodyText": "“That is the exploration that awaits you…”"
}
```

**Field notes**

- `subscriberCount` is `null` when the writer hides it (e.g. Astral Codex Ten). `subscriberCountText` keeps Substack's exact wording.
- `categories` combines the publication's sections with the most common post tags seen in the scraped posts. Substack doesn't expose one official category per publication.
- `commentCount` is a number only. Comment text is not scraped.

### Pricing (suggestion)

*Suggested pay-per-result pricing, not final:* **$0.001 per post** (with or without body text) and **$0.002 per publication profile**, i.e. **$1 per 1,000 posts**. Pay-per-event events: `post` and `publication` (charged via `Actor.charge`; free when monetization isn't enabled). This undercuts the main competitors on Apify Store: automation-lab ($0.00115 metadata / $0.0023 with content), fatihtahta ($0.0025) and easyapi ($0.005, rated 2.6/5).

### Limits and good use

- Public data only. There is no login, no comments and no paywalled content. It respects robots.txt.
- Substack's Terms of Use restrict crawling and copying significant portions of content, and post text is the writers' copyright. You are responsible for how you use the data. Don't republish full posts without permission.
- It works on Substack-hosted sites only. Publications that moved to other platforms (e.g. Platformer moved to Ghost) are reported as errors and skipped.

# Actor input Schema

## `publicationUrls` (type: `array`):

Substack publication homepages, e.g. https://www.lennysnewsletter.com, https://astralcodexten.substack.com or just a subdomain like 'noahpinion'. Post URLs (/p/...) are accepted and resolved to their publication.

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

Newest-first posts per publication. 0 = publication info only.

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

Fetch the full plain-text body of FREE posts (one extra request per free post). Paywalled posts never include body text.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep low to be polite.

## `delayMs` (type: `integer`):

Randomized delay (0.5x–1.5x) before each request.

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

Optional Apify proxy.

## Actor input object example

```json
{
  "publicationUrls": [
    "https://www.lennysnewsletter.com",
    "https://www.noahpinion.blog"
  ],
  "maxPostsPerPublication": 20,
  "includeBody": false,
  "maxConcurrency": 2,
  "delayMs": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset items: Substack publications and posts.

# 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 = {
    "publicationUrls": [
        "https://www.lennysnewsletter.com",
        "https://www.noahpinion.blog"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("genesis-tools/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 = {
    "publicationUrls": [
        "https://www.lennysnewsletter.com",
        "https://www.noahpinion.blog",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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