# Substack Scraper - Posts, Newsletters, Full Text (no login) (`obliging_resilience/substack-scraper`) Actor

Scrape posts, authors, reactions, comment counts and full text of free posts from public Substack newsletters, plus newsletter search. No login, no API keys.

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

## Pricing

from $4.50 / 1,000 post scrapeds

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

## Substack Scraper (posts, newsletters, no login)

You get **public Substack posts as clean JSON/CSV**: title, date, free or paid status, word count, reactions, restacks, comment count, authors and the full text of free posts. No Substack account, no API key.
**Price: $4.50 per 1,000 posts** (pay per event: `post` = $0.0045). Same price with or without text. Error rows are free.

### Why use it

- **Competitor and niche monitoring**: track what rival newsletters publish and which posts get the most reactions and comments.
- **LLM and research datasets**: collect full text of free posts for summaries, topic models and RAG (respect author copyright).
- **Sponsorship and creator research**: compare posting frequency, engagement and authors across newsletters found by keyword.

### Input

| Field | Description |
|---|---|
| `publications` | Subdomain, host, custom domain or URL. A post URL (`.../p/some-post`) scrapes just that post |
| `searchQuery` | Optional keyword. The top matching newsletters are added to the run |
| `maxSearchPublications` | Newsletters taken from the search (default 5, max 25) |
| `maxPosts` | Max posts per newsletter, newest first (default 50, max 10000) |
| `since` | Optional ISO date such as `2026-01-01`. Older posts are skipped |
| `includeContent` | `true` adds `contentHtml` and `text` for free posts (one extra request per post) |

```json
{
  "publications": ["astralcodexten", "https://www.lennysnewsletter.com"],
  "searchQuery": "machine learning",
  "maxSearchPublications": 3,
  "maxPosts": 100,
  "since": "2026-06-01",
  "includeContent": true
}
```

Error row example: `{ "publication": "nope-xyz.substack.com", "error": "Publication not found or not reachable (HTTP 404)." }`

### Example output

| publication | title | date | audience | wordCount | reactionCount | restacks | commentCount | author | url |
|---|---|---|---|---|---|---|---|---|---|
| astralcodexten.substack.com | Open Thread 456 | 2026-10-19T17:51:46.436Z | free | 422 | 50 | 1 | 259 | Scott Alexander | https://www.astralcodexten.com/p/open-thread-456 |

Every row also has `subtitle`, `slug`, `type`, `reactions` (per emoji), `authors` (`name`, `handle`, `url`), `coverImage`, `tags`, `scrapedAt`, and with `includeContent` on free posts `contentHtml` and `text`.

```json
{
  "publication": "astralcodexten.substack.com", "title": "Open Thread 456", "slug": "open-thread-456",
  "url": "https://www.astralcodexten.com/p/open-thread-456", "date": "2026-10-19T17:51:46.436Z",
  "type": "newsletter", "audience": "free", "wordCount": 422,
  "reactionCount": 50, "reactions": { "❤": 50 }, "restacks": 1, "commentCount": 259,
  "authors": [{ "name": "Scott Alexander", "handle": "astralcodexten", "url": "https://substack.com/@astralcodexten" }],
  "author": "Scott Alexander", "tags": [], "scrapedAt": "2026-10-20T05:56:37.786Z",
  "text": "This is the weekly visible open thread..."
}
```

For a paid post, `audience` is `paid` and `text` / `contentHtml` are not included.

### Use with AI agents / MCP

Call this actor from any AI agent through the Apify MCP server (`https://mcp.apify.com`) or the Apify API, using the actor id `TuqVqmgph62ZaatCR`. An agent can ask "which posts about machine learning got the most reactions this month?" using `searchQuery` and `since`. Output is flat JSON with stable keys (`publication`, `slug`), so an agent can sort by `reactionCount`, filter by `audience` or summarise `text` directly.

Sample tool input an agent can send:

```json
{
  "publications": ["astralcodexten"],
  "searchQuery": "machine learning",
  "maxSearchPublications": 3,
  "maxPosts": 20,
  "since": "2026-09-01",
  "includeContent": false
}
```

### Limits and notes

- Public data only. Paid posts return metadata only: the paywall is never bypassed and the actor never logs in.
- No comments, subscriber counts or emails (not public). You get the comment count only.
- Podcasts, videos and threads can lack a word count.
- About one request per second, no proxies needed for normal volumes. Set a maximum cost per run in the run options; the actor stops cleanly when it is reached.

### FAQ

**Can it read paid posts?** No, metadata only.

**How do I pick a newsletter?** Use its subdomain, its `name.substack.com` host, its custom domain, or paste any post URL.

**How far back can it go?** To the first post in the public archive. Use `maxPosts` and `since` to limit the run.

### Disclaimer

This is an **unofficial** tool. It is not affiliated with, endorsed by or sponsored by Substack. It collects only publicly available data from Substack's public web endpoints. You are responsible for using the data in line with Substack's terms, the authors' copyright and applicable law (for example GDPR). Full post text belongs to its authors; use it for research and analysis, not republishing. Substack can change its endpoints at any time, which may temporarily break the actor.

**AI disclosure:** this actor was built with AI assistance (Claude by Anthropic). Maintained by tinygrid. Issues and feature requests are welcome in the Issues tab.

# Actor input Schema

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

Substack newsletters: subdomain (astralcodexten), full host (astralcodexten.substack.com), custom domain (www.lennysnewsletter.com) or any URL. A post URL (https://x.substack.com/p/some-post) scrapes just that post.

## `searchQuery` (type: `string`):

Find newsletters by keyword (for example 'machine learning'). The top matches are added to the publications above.

## `maxSearchPublications` (type: `integer`):

How many newsletters to take from the search results.

## `maxPosts` (type: `integer`):

Newest posts first. Stops earlier if the publication has fewer posts or the 'since' date is reached.

## `since` (type: `string`):

Optional. ISO date like 2026-01-01. Older posts are skipped.

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

Adds contentHtml and text for free posts (one extra request per post, slower). Paid posts never include text.

## Actor input object example

```json
{
  "publications": [
    "astralcodexten"
  ],
  "maxSearchPublications": 5,
  "maxPosts": 50,
  "includeContent": false
}
```

# Actor output Schema

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

Public Substack posts, newsletter search results and per-target error records stored in the default dataset.

# 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": [
        "astralcodexten"
    ],
    "maxSearchPublications": 5,
    "maxPosts": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("obliging_resilience/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": ["astralcodexten"],
    "maxSearchPublications": 5,
    "maxPosts": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("obliging_resilience/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": [
    "astralcodexten"
  ],
  "maxSearchPublications": 5,
  "maxPosts": 50
}' |
apify call obliging_resilience/substack-scraper --silent --output-dataset

```

## MCP server setup

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