# Substack Posts Scraper - Any Newsletter, No API Key (`eliai/substack-posts-scraper`) Actor

Scrape any Substack newsletter by handle OR custom domain: post title, author, publish date, subtitle, cover image and word count, one row per post. Optional full text. Bulk publications. $0.004 per post; empty feeds are free.

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

## Pricing

$4.00 / 1,000 posts 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Substack Posts Scraper — Any Newsletter, No API Key

Scrape any **Substack newsletter** — by handle **or custom domain** — and get **one row per post**:
title, author, publish date, subtitle, cover image and word count. Optional full text.

No API key, no account. **$0.004 per post** — a publication with no feed is recorded and
**not charged**.

### Input

```json
{ "publication": "bigtechnology.com", "maxPosts": 20 }
```

Bulk, mixing address shapes:

```json
{
  "publications": ["platformer", "bigtechnology.com", "https://stratechery.com"],
  "maxPosts": 10,
  "includeFullText": true
}
```

| Field | Type | Notes |
|---|---|---|
| `publication` | string | A handle (`platformer`), a custom domain (`bigtechnology.com`) or a full URL. |
| `publications` | string\[] | Up to 20 newsletters per run. |
| `maxPosts` | integer | 1–50. A Substack feed carries roughly the 20 most recent. **Charged per post.** |
| `includeFullText` | boolean | Adds the article body as plain text. Default false. |

### Output

```json
{
  "ok": true,
  "publication": "bigtechnology.com",
  "publicationTitle": "Big Technology",
  "feedUrl": "https://www.bigtechnology.com/feed",
  "title": "When Artificial Intelligence Is Too Valuable To Sell",
  "author": "Alex Kantrowitz",
  "link": "https://www.bigtechnology.com/p/when-artificial-intelligence-is-too",
  "publishedAt": "2026-07-31T19:30:17.000Z",
  "subtitle": "Just because the AI labs have sold models on a meter until now…",
  "imageUrl": "https://substackcdn.com/image/fetch/…",
  "wordCount": 1840
}
```

### What it gets right

- ⭐ **Custom domains actually work.** Most established newsletters publish on their own domain,
  and the obvious URL fails on them. Measured: `bigtechnology.com/feed` returns **404**, while
  `www.bigtechnology.com/feed` and `bigtechnology.substack.com/feed` both return 20 items. This
  resolves by **trying each candidate and keeping the first that yields posts**, and tells you
  which one it used in `feedUrl`. A handle-only implementation silently returns nothing here.
- **A 200 is not success.** A custom domain can answer with a marketing page; a response with zero
  items is not accepted as the feed.
- **Substack needs a browser user-agent.** A bare client gets an empty body — measured, and the
  reason the request sets one.
- **Dates are ISO-8601**, not the raw RFC-822 string.
- **`wordCount` comes from the real body** (`content:encoded`), so you can sort long reads from
  short notes without pulling every article.
- **Text fields are clean** — tags stripped, entities decoded in the correct order.

### Pricing

**$0.004 per post returned.** No start fee. A publication with no reachable feed produces an
`ok: false` record naming the addresses tried and **is not charged**.

### Limits

- A Substack RSS feed carries roughly the **20 most recent posts**. There is no public archive
  endpoint, so older posts are not reachable this way — `maxPosts` above ~20 simply returns what
  exists.
- Paywalled posts appear in the feed with their **public preview only**; `includeFullText` returns
  that preview, not the paid body.
- 20 publications per run.

### FAQ

**Does it work with custom domains?** Yes — that is the case this was built for. See above.

**Can I get the whole archive?** No. Substack's feed only exposes recent posts.

**Do I need a Substack account?** No.

### Changelog

- **0.1 (2026-09-10)** — first release. One row per post, custom-domain resolution with fallback,
  word counts, optional full text, bulk publications.

# Actor input Schema

## `publication` (type: `string`):

A Substack handle (bigtechnology), a custom domain (bigtechnology.com) or a full URL. Custom domains are supported.

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

Several newsletters in one run. Up to 20.

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

A Substack feed carries roughly the 20 most recent posts. You are charged per post returned.

## `includeFullText` (type: `boolean`):

Adds the whole article body as plain text. Verbose, and only the public portion of paywalled posts is present.

## Actor input object example

```json
{
  "publication": "bigtechnology.com",
  "publications": [],
  "maxPosts": 20,
  "includeFullText": false
}
```

# Actor output Schema

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

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# 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 = {
    "publication": "bigtechnology.com",
    "publications": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/substack-posts-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 = {
    "publication": "bigtechnology.com",
    "publications": [],
}

# Run the Actor and wait for it to finish
run = client.actor("eliai/substack-posts-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 '{
  "publication": "bigtechnology.com",
  "publications": []
}' |
apify call eliai/substack-posts-scraper --silent --output-dataset

```

## MCP server setup

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