# Substack Scraper: Posts, Content & Engagement (`nexo_data/substack-public-archive-and-changes`) Actor

Scrape Substack newsletters, including custom domains: post archive, public post content, authors, likes, comments and restacks. Track new and changed posts between runs. Paid posts are labelled as excerpts. $0.80 per 1,000 posts.

- **URL**: https://apify.com/nexo_data/substack-public-archive-and-changes.md
- **Developed by:** [Nexo Data](https://apify.com/nexo_data) (community)
- **Categories:** News, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 delivered post records

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, Content & Engagement

Scrape Substack newsletters, including custom domains: post archive, public post content, authors, likes, comments and restacks. Track new and changed posts between runs. Paid posts are labelled as excerpts. $0.80 per 1,000 posts.

**Store page:** https://apify.com/nexo_data/substack-public-archive-and-changes

### What can you do with this Substack posts scraper?

- Archive a newsletter's full public post history
- Track new posts and engagement over time
- Analyze topics and content strategy of creators
- Feed newsletter content into LLM/RAG apps

### How to scrape a Substack newsletter archive

1. Open the Actor on Apify Store and click **Try for free**.
2. Paste your input (see the example below) in the Input tab.
3. Click **Start** and wait for the run to finish.
4. Download results as JSON, CSV, Excel or HTML, or fetch them via the Apify API.

### How to scrape a Substack newsletter archive via API

```bash
curl -X POST "https://api.apify.com/v2/acts/nexo_data~substack-public-archive-and-changes/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"publicationUrls": ["https://www.noahpinion.blog"], "maxPosts": 3, "includeContent": true}'
```

You can also call it from Python/JS with the `apify-client`, schedule it, or connect it to Make, Zapier, n8n or an MCP-enabled AI agent.

### How to schedule it for monitoring

Create an Apify **Schedule** (e.g. daily) with the same input. Combine with webhooks or integrations to get alerts in Slack, email or Google Sheets.

### Input example

```json
{
  "publicationUrls": [
    "https://www.noahpinion.blog"
  ],
  "maxPosts": 3,
  "includeContent": true
}
```

### Output example

Each item in the dataset is one result. Typical fields are listed in the **Output** tab; export to JSON/CSV/Excel.

### Pricing (pay per event)

You only pay for what you get — no monthly rental. Apify platform usage is included in the event prices below.

| Event | What it is | Price |
|---|---|---|
| `run-start` | Run initialization (including invalid inputs) — One initialization event per run, including runtime input-validation failures. | $0.003 ($3.0 / 1,000) |
| `source-check` | Bounded public-source check — One bounded public-source request attempt; charged also when access fails or filters match nothing. | $0.001 ($1.0 / 1,000) |
| `result` | Delivered post record — One delivered usable post record. Error rows do not trigger this event. | $0.0015 ($1.5 / 1,000) |

Tip: set **Maximum cost per run** in run options to cap spend. New Apify accounts get free monthly credits, so your first runs are effectively free.

### FAQ

**Is it legal to scrape Substack posts?** This Actor collects only publicly available data. Make sure your use complies with the site's terms and data protection laws (e.g. GDPR).

**Do I need an API key or login?** No. Only an Apify account.

**What if a source fails?** Failed or empty sources are reported in the output for diagnosis; you are not charged the `result` event for them.

**Can I use it with AI agents / LLMs?** Yes — output is structured JSON, ready for RAG, LangChain, LlamaIndex or the Apify MCP server.

**Found a bug or need a feature?** Open an issue in the **Issues** tab — we usually respond within 24 hours.

# Actor input Schema

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

Up to 10 Substack-hosted newsletters or custom domains using its public API.

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

With post content enabled, each post uses one source check; one run handles up to about 280 posts. Use more runs or onlyChanges for larger archives.

## `maxPagesPerPublication` (type: `integer`):

Maximum archive pages. See the README for coverage and billing details.

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

Fetch publicly available post bodies. See the README for coverage and billing details.

## `keywords` (type: `array`):

Any supplied keyword matches.

## `monitorKey` (type: `string`):

Separate repeatable monitors in your private account storage.

## `onlyChanges` (type: `boolean`):

Return only new and changed records after the baseline. See the README for coverage and billing details.

## Actor input object example

```json
{
  "publicationUrls": [
    "https://www.noahpinion.blog"
  ],
  "maxPosts": 25,
  "maxPagesPerPublication": 3,
  "includeContent": true,
  "monitorKey": "default",
  "onlyChanges": false
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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.noahpinion.blog"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexo_data/substack-public-archive-and-changes").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.noahpinion.blog"] }

# Run the Actor and wait for it to finish
run = client.actor("nexo_data/substack-public-archive-and-changes").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.noahpinion.blog"
  ]
}' |
apify call nexo_data/substack-public-archive-and-changes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexo_data/substack-public-archive-and-changes"
        }
    }
}
```

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/jlLNgRhuEx62N0eNw/builds/GeYwPTAQfrTjqQzQG/openapi.json
