# Substack Scraper: Posts, Likes, Full Text + New Post Alerts (`inder-studio/substack-posts`) Actor

Scrape posts from any Substack, custom domains too: title, date, authors, likes, comments count, restacks, word count and free full text. Get only new posts on a schedule. Never outputs paywalled text. No login.

- **URL**: https://apify.com/inder-studio/substack-posts.md
- **Developed by:** [Inder Studio](https://apify.com/inder-studio) (community)
- **Categories:** Social media, Lead generation, News
- **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: posts, likes and full text

Add any Substack (or its custom domain). Get every post with title, date, authors, likes, comments count, restacks and word count. Add the full text of free posts if you want it.

Turn on **Only new posts** and schedule it daily to follow newsletters.

Paywalled text is never output. No login.

### Use cases

- **Track competitors or creators:** schedule daily with `onlyNewPosts` and get new posts in Slack, email or a webhook.
- **Content research:** which topics earn the most likes, comments and restacks?
- **Datasets for AI and RAG:** clean plain text of free posts.
- **Sponsorship and newsletter-ads research:** posting cadence and engagement per publication.

### Input

| Field | What it does |
|---|---|
| `publications` | `https://www.lennysnewsletter.com`, `noahpinion`, `name.substack.com`… |
| `maxPostsPerPublication` | Newest first; pages through the full archive |
| `postedWithinDays`, `keywords` | Filters |
| `includeContent` | Plain text of free posts |
| `onlyNewPosts` + `monitorName` | Output only posts not seen in earlier runs |

### Output

`publication, postId, title, subtitle, url, slug, postDate, type, audience, isPaywalled, authors[], wordcount, reactions, comments, restacks, tags[], coverImage, description, teaser, podcastDurationSec, content?, scrapedAt`

### Run time

Each request has a 20-second timeout and up to 3 retries. Runs stop at **timeBudgetSecs**, which defaults to 600 seconds, or 45 seconds before the run timeout, whichever comes first. Posts collected up to that point are saved and the run finishes as succeeded. For very large archives, raise both the time budget and the run timeout.

### Pricing

**Pricing today:** this Actor is free. You pay only the Apify platform usage of your run. We plan to switch to pay per event at the prices below. This section will say so when it changes.

Planned pay-per-event prices (not active yet):

- **$0.005 per run start**.
- **$0.0015 per post** (metadata).
- **$0.003 per post with full text**.

### Notes

Respect authors' copyright: reuse text only as the law and Substack's terms allow. Built and maintained by **Inder Studio**. Issues get fixed within 24h.

# Actor input Schema

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

Substack URLs, custom domains or subdomain names, e.g. "https://www.lennysnewsletter.com", "noahpinion", "astralcodexten.substack.com".

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

Newest first.

## `postedWithinDays` (type: `integer`):

0 = any date.

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

Keep posts whose title, subtitle or description contains any of these.

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

Adds plain-text content for free posts (one extra request per post). Paywalled posts never include text - only the public teaser.

## `onlyNewPosts` (type: `boolean`):

First run saves a baseline; later runs output only new posts. Schedule daily for alerts.

## `monitorName` (type: `string`):

Separate baselines per task.

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

25 posts per page. 0 = automatic (enough pages for Max posts).

## `timeBudgetSecs` (type: `integer`):

Stop fetching after this long, save what was collected and finish successfully. The run also stops 45 s before its own timeout.

## Actor input object example

```json
{
  "publications": [
    "https://www.lennysnewsletter.com",
    "noahpinion"
  ],
  "maxPostsPerPublication": 5,
  "postedWithinDays": 0,
  "includeContent": false,
  "onlyNewPosts": false,
  "monitorName": "default",
  "maxPagesPerPublication": 0,
  "timeBudgetSecs": 600
}
```

# Actor output Schema

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

Substack posts with metadata (and free post content when requested), one row per post.

# 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": [
        "https://www.lennysnewsletter.com",
        "noahpinion"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("inder-studio/substack-posts").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": [
        "https://www.lennysnewsletter.com",
        "noahpinion",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("inder-studio/substack-posts").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": [
    "https://www.lennysnewsletter.com",
    "noahpinion"
  ]
}' |
apify call inder-studio/substack-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,inder-studio/substack-posts"
        }
    }
}
```

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/EufjHHbQWNvLgXq8T/builds/R8ghVkEEEViC4PcVH/openapi.json
