# Substack Leaderboards, Newsletters & Posts Scraper (`api-market/substack-publications-scraper`) Actor

Zero-proxy Substack scraper extracting ranked category leaderboards (paid & rising newsletters) or structured post archives, engagement & author metadata.

- **URL**: https://apify.com/api-market/substack-publications-scraper.md
- **Developed by:** [Khan](https://apify.com/api-market) (community)
- **Categories:** News, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 substack post or publications

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 Leaderboards, Newsletters & Posts Scraper

Extract ranked **Substack category leaderboards** (top `paid` and `rising` newsletters with subscriber tiers, author names, and custom domains) OR scrape structured **Substack post archives** (titles, subtitles, authors, word counts, reactions, comments, restacks, and free/paid audience flags) — **zero proxies and zero headless browsers**.

Built for media intelligence teams, B2B sponsor/newsletter outreach, content strategists, and AI research workflows.

***

### Key Features & Why Use This Actor

- **Two High-Value Modes (`posts` & `leaderboard`):**
  - **`posts`:** Pulls full paginated post archives from any Substack subdomain (`semianalysis`), custom domain (`www.lennysnewsletter.com`), or URL with cursor pagination and engagement stats.
  - **`leaderboard`:** Extracts top **paid** or **rising** newsletters in any Substack category (`technology`, `business`, `finance`, `culture`, `us-politics`, `food`, `sports`, `podcast`, or numeric category ID).
- **Engagement & Monetization Signals:** Captures `reactionCount`, `commentCount`, `restacks`, `wordcount`, `audience` (`everyone` / `only_paid`), `subscriberTier`, and `paidTierDetail`.
- **Audience & Keyword Filtering:** Filter posts by `free`, `paid`, or `all`, and search across titles, subtitles, names, or author names.
- **Proxy-Free Speed:** Direct Substack JSON API queries without Puppeteer or residential proxy fees.

***

### Popular Use Cases

- **Newsletter Sponsorship & Creator Outreach:** Pull `paid` and `rising` leaderboards across `technology`, `business`, or `finance` to build qualified newsletter lead lists.
- **Editorial & Engagement Benchmarking:** Track which topics, word counts, and headlines generate the highest reactions, comments, and restacks.
- **Content Monitoring & RAG Datasets:** Sync newly published posts from curated industry newsletters into Notion, Slack, Airtable, or vector databases.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `mode` | `string` | No | `"posts"` | `"posts"` scrapes post archives from `publications`; `"leaderboard"` extracts ranked newsletters by category. |
| `publications` | `string[]` | No | `["www.lennysnewsletter.com", "newsletter.pragmaticengineer.com"]` | Substack subdomains (`semianalysis`), custom domains (`www.lennysnewsletter.com`), or URLs (used in `posts` mode). |
| `category` | `string` | No | `"technology"` | Category slug (`technology`, `business`, `finance`, `culture`, `us-politics`, `food`, `sports`, `podcast`) or numeric Substack category ID (`leaderboard` mode). |
| `leaderboardType` | `string` | No | `"paid"` | `"paid"` for top paid newsletters or `"rising"` for fastest-growing publications (`leaderboard` mode). |
| `keyword` | `string` | No | `""` | Optional case-insensitive filter across post titles/subtitles or publication names/descriptions. |
| `audienceFilter` | `string` | No | `"all"` | Filter posts by `"all"`, `"free"`, or `"paid"` (`posts` mode). |
| `maxPages` | `integer` | No | `2` | Max paginated API requests per publication (`12` posts/page) or leaderboard (`1–20` pages). |
| `maxItems` | `integer` | No | `50` | Global cap on records emitted in this run (`1–5,000`). |

#### Example Input (`posts` Mode)

```json
{
  "mode": "posts",
  "publications": [
    "www.lennysnewsletter.com",
    "newsletter.pragmaticengineer.com"
  ],
  "audienceFilter": "all",
  "maxPages": 2,
  "maxItems": 50
}
```

#### Example Input (`leaderboard` Mode)

```json
{
  "mode": "leaderboard",
  "category": "technology",
  "leaderboardType": "paid",
  "maxPages": 2,
  "maxItems": 50
}
```

***

### Sample Output (Live Verified JSON)

#### `posts` Mode

```json
{
  "recordType": "post",
  "publicationHost": "www.lennysnewsletter.com",
  "postId": "224972682",
  "title": "35 premium tools free for a year—now with OpenRouter, LangChain, Sentry, TextExpander, and Ploy 💥",
  "subtitle": "Over $40,000 in value, exclusively for Lenny’s Newsletter subscribers",
  "slug": "35-premium-tools-free-for-a-yearnow",
  "authors": [
    "Lenny Rachitsky"
  ],
  "authorName": "Lenny Rachitsky",
  "audience": "everyone",
  "isPaidOnly": false,
  "wordcount": 1752,
  "reactionCount": 216,
  "commentCount": 12,
  "restacks": 2,
  "publishedAt": "2026-11-17T18:02:02.477Z",
  "url": "https://www.lennysnewsletter.com/p/35-premium-tools-free-for-a-yearnow"
}
```

#### `leaderboard` Mode

```json
{
  "recordType": "publication",
  "rank": 1,
  "categoryId": "4",
  "leaderboardType": "paid",
  "name": "SemiAnalysis",
  "subdomain": "semianalysis",
  "customDomain": "newsletter.semianalysis.com",
  "url": "https://newsletter.semianalysis.com",
  "authorName": "Dylan Patel",
  "authorHandle": "semianalysis",
  "description": "Bridging the gap between the world's most important industry, semiconductors, and business.",
  "subscriberTier": "Hundreds of thousands of subscribers",
  "paidTierDetail": "Tens of thousands of paid subscribers"
}
```

***

### Pricing (Pay-Per-Event)

This Actor uses **Pay-Per-Event (PPE)** billing so you pay strictly per post or newsletter record returned:

- **Primary Event:** `result-item`
- **Suggested Rate:** **`$0.0009` per item** (**`$0.90` per 1,000 posts or publications**)
- **Compute Cost:** Near zero — no browser overhead or proxy fees.

***

### Integrations & Exports

- **Export Formats:** JSON, CSV, Excel (XLSX), JSONL, HTML, XML.
- **No-Code Automation:** Pipe weekly leaderboards or new posts to **n8n, Make, Zapier**, Google Sheets, HubSpot, or Slack.
- **AI Agent Workflows:** Ready for **Apify MCP** and REST API pipelines.

***

### FAQ

**Does it work on custom-domain Substack newsletters?**\
Yes. Pass custom domains like `www.lennysnewsletter.com` or `newsletter.semianalysis.com`, bare subdomains like `semianalysis`, or full URLs.

**Can I scrape only free posts or only paid posts?**\
Yes. Set `audienceFilter` to `"free"` or `"paid"` in `posts` mode.

**Do I need a Substack account or cookie?**\
No. Both public post archive metadata and category leaderboards are fetched cleanly without login cookies.

# Actor input Schema

## `mode` (type: `string`):

'posts' scrapes post archives from specified newsletters; 'leaderboard' scrapes ranked paid or rising newsletters by category.

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

Substack subdomains (e.g. semianalysis), custom domains (www.lennysnewsletter.com), or full URLs.

## `category` (type: `string`):

Category slug (technology, business, finance, culture, us-politics, food, sports, podcast) or numeric Substack category ID.

## `leaderboardType` (type: `string`):

Select 'paid' for top paid newsletters or 'rising' for fastest-growing newsletters.

## `keyword` (type: `string`):

Case-insensitive substring filter applied to post title/subtitle or publication name/description.

## `audienceFilter` (type: `string`):

Filter posts by access tier: 'all', 'free' (everyone), or 'paid' (subscriber-only).

## `maxPages` (type: `integer`):

Maximum number of paginated API requests per publication (12 posts/page) or leaderboard (1-20 pages).

## `maxItems` (type: `integer`):

Global cap on total post or publication records emitted in this run.

## Actor input object example

```json
{
  "mode": "posts",
  "publications": [
    "www.lennysnewsletter.com",
    "newsletter.pragmaticengineer.com"
  ],
  "category": "technology",
  "leaderboardType": "paid",
  "audienceFilter": "all",
  "maxPages": 2,
  "maxItems": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `items` (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 = {
    "publications": [
        "www.lennysnewsletter.com",
        "newsletter.pragmaticengineer.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-market/substack-publications-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": [
        "www.lennysnewsletter.com",
        "newsletter.pragmaticengineer.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("api-market/substack-publications-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": [
    "www.lennysnewsletter.com",
    "newsletter.pragmaticengineer.com"
  ]
}' |
apify call api-market/substack-publications-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,api-market/substack-publications-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/6dnseqTPEVEkV6J51/builds/D4WPg2KaXeNHbdh2o/openapi.json
