# Substack Newsletter Scraper (`cliqtomedia/substack-newsletter-scraper`) Actor

Substack newsletter scraper for post metadata from known public RSS or Atom feeds. Get one stable row per unique item. Pay $0.001 per saved row, with no separate start fee. The Actor reads the feed only.

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

## Pricing

$1.00 / 1,000 saved post metadata

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

Substack newsletter scraper for recent post metadata from known public RSS or
Atom feeds. Give the Actor one or more full `/feed` URLs and get one clean
Dataset row per unique item.

### Quick start

```json
{
  "feedUrls": ["https://on.substack.com/feed"],
  "maxPostsPerFeed": 20,
  "maxTotalPosts": 100
}
```

Use 1–20 full HTTPS URLs in the form
`https://<publication>.substack.com/feed`.

- `maxPostsPerFeed`: 1–20, default 20.
- `maxTotalPosts`: 1–200 unique rows, default 100.
- `publishedFrom`: optional inclusive ISO 8601 date or UTC date-time.
- `publishedTo`: optional exclusive ISO 8601 date or UTC date-time.

The first version accepts Substack subdomain feeds only. Homepages, archive
URLs, direct post URLs, bare publication names and custom domains are not
accepted.

### What you get

Each Dataset row contains:

| Field                                                                   | Meaning                                                           |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| `postKey`                                                               | Stable versioned key for matching the same feed item between runs |
| `feedUrl`, `publicationKey`, `publicationName`, `publicationUrl`        | Source and publication context                                    |
| `sourceGuid`, `canonicalUrl`                                            | IDs and links exposed by the feed                                 |
| `title`, `subtitle`, `publishedAt`, `updatedAt`, `author`, `categories` | Post metadata from RSS/Atom                                       |
| `audience`, `contentAvailability`                                       | Public audience and paywall signal when present                   |
| `contentMode`                                                           | Always `metadata_only`                                            |
| `enclosure`                                                             | URL, type and length metadata only; the media is not downloaded   |
| `retrievedAt`, `sourceStatus`                                           | Retrieval time and saved/paywalled status                         |

The run also writes a `RUN_SUMMARY` record in the default key-value store. It
contains row counts, duplicate and limit counters, request and byte totals,
and a clear outcome for each feed.

### Pricing

The Actor charges $0.001 for each unique metadata row saved. There is no
separate run start fee. Empty, blocked, invalid, rejected and repeated items do
not create a saved-row charge.

Set a run maximum cost in Apify when you need a spending limit. The Actor stops
before saving another row when that limit cannot cover the next charge.

### Honest behavior

The Actor reads the public feed response only. It makes one limited request per
feed and does not paginate an archive. A feed exposes a finite recent window,
so the result is not a promise of a complete archive.

The default run is intended to finish in under five minutes for a normal
public feed. A blocked or rate-limited source can take longer because retries
are limited.

The Actor does not open article pages, fetch article text or HTML, download
images or audio, read comments, collect contact details, log in or bypass a
paywall. A paid post can still return public metadata when its feed exposes it.

The summary distinguishes an empty feed (`NO_POSTS`), metadata-only paywall
signal (`PAYWALLED_METADATA_ONLY`), missing source, blocked access, rate limit,
malformed XML, parser drift and other technical errors. A limit is reported as
`TRUNCATED_BY_LIMIT`.

### Privacy and source notice

Only metadata already present in the public RSS/Atom response is kept. Do not
send private feed URLs, cookies or tokens as input. Article text, images, audio
and author contact information belong to their publishers and authors.

Substack is a trademark of its owner. This project is independent and is not
affiliated with or endorsed by Substack. Check Apify's current platform terms.

The versioned contracts, support notes and sanitized sample are in
[`docs/`](docs/), including [`docs/publication/SAMPLE-OUTPUT.json`](docs/publication/SAMPLE-OUTPUT.json).

# Changelog

This Actor's version history is a separate document: https://apify.com/cliqtomedia/substack-newsletter-scraper/changelog.md

# Actor input Schema

## `feedUrls` (type: `array`):

Use one or more full HTTPS URLs ending in /feed. Homepages, archive URLs, post URLs and custom domains are not accepted.

## `maxPostsPerFeed` (type: `integer`):

Read at most this many source items from each feed. The Actor does not load older archive pages.

## `maxTotalPosts` (type: `integer`):

Maximum unique Dataset rows in one run.

## `publishedFrom` (type: `string`):

Optional ISO 8601 date or UTC date-time. An equal timestamp is included.

## `publishedTo` (type: `string`):

Optional ISO 8601 date or UTC date-time. An equal timestamp is excluded.

## Actor input object example

```json
{
  "feedUrls": [
    "https://on.substack.com/feed"
  ],
  "maxPostsPerFeed": 20,
  "maxTotalPosts": 100
}
```

# Actor output Schema

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

One metadata row per unique valid RSS/Atom item.

## `runSummary` (type: `string`):

Feed outcomes, counts, limits, timing and safe error codes.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("cliqtomedia/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 = {}

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

```

## MCP server setup

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