# Substack Scraper & API | EveryInfra (`blushing_parachute/everyinfra-substack-api`) Actor

Unofficial Substack data via one Actor: search, publication, publication_posts, post, comments, profile, notes. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-substack-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.10 / 1,000 search requests

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 & API | EveryInfra

Search Substack publications, posts, comments and notes to retrieve author details, engagement counts and subscriber data.

Publication URLs need a handle that can be read from the URL. Custom domains are not always recognized.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `search` | Discover Substack newsletters that match a keyword, with each publication's name, handle, custom domain, language, author and top posts. It matches publications rather than the text of posts, and a null subscriber count means hidden, not zero. | keyword | — | 10 (up to 30) | $0.0031 |
| `publication` | Look up a Substack publication from its homepage link and get its name, handle, custom domain, language, author, top posts and subscriber count when disclosed. The link needs a recognizable Substack handle, since custom domains may not parse, and nothing comes from the author's dashboard. | url | — | 1 | $0.0010 |
| `publication_posts` | List posts from a Substack publication. Each post has title, subtitle, author, likes, comments, word count, reading time and paid status. Narrow by format with `content_type` or by date with `since` and `until`. Paywalled text stays locked, and one batch may not cover the whole archive. | url | content_type, since, until | 10 (up to 30) | $0.0031 |
| `post` | Read a single Substack post from its /p/ link. Get title, subtitle, body text, author, publication, engagement counts and whether it is paid content. Paywalled text is not unlocked. Comments come from the separate `comments` action. | url | — | 1 | $0.0007 |
| `comments` | Pull the comments under a Substack post. Get author, likes, reply count, and flags for replies, pinned comments and remarks by the post's own author. Pass the post's /p/ link. The batch may not hold the whole conversation. | url | — | 20 (up to 100) | $0.0063 |
| `profile` | Find a Substack writer's profile from their handle. Get display name, bio, avatar, linked Twitter username and the publications tied to the account. It accepts a plain handle, an @handle or a substack.com/@ link. It describes the person, not a publication, and shows no subscription data. | username | — | 1 | $0.0013 |
| `notes` | Collect a Substack writer's Notes, the short posts kept apart from newsletters, with text, kind, likes and publish time for each. It lists one writer's Notes only, not a sitewide search, and may not reach the full history. | username | — | 25 (up to 200) | $0.0043 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "climate"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `id`, `handle`, `name`, `url`, `custom_domain`, `bio`, `language`, `subscriber_count`, `payments_enabled`, `avatar_url`, `cover_url`, `platform`, `author_name`, `author_username`, `top_posts`
- `publication`: `id`, `handle`, `name`, `url`, `custom_domain`, `bio`, `language`, `subscriber_count`, `payments_enabled`, `avatar_url`, `cover_url`, `platform`, `author_name`, `author_username`, `top_posts`
- `publication_posts`: `id`, `url`, `title`, `subtitle`, `text`, `author_name`, `author_username`, `publication_name`, `publication_handle`, `publication_url`, `like_count`, `comment_count`, `repost_count`, `word_count`, `reading_time_minutes`, `post_type`, `audience`, `is_paid`, `podcast_url`, `image_url`, `posted_at`, `updated_at`, `tags`, `platform`
- `post`: `id`, `url`, `title`, `subtitle`, `text`, `author_name`, `author_username`, `publication_name`, `publication_handle`, `publication_url`, `like_count`, `comment_count`, `repost_count`, `word_count`, `reading_time_minutes`, `post_type`, `audience`, `is_paid`, `podcast_url`, `image_url`, `posted_at`, `updated_at`, `tags`, `platform`
- `comments`: `id`, `text`, `author_name`, `author_username`, `like_count`, `reply_count`, `reply_to_id`, `is_reply`, `is_pinned`, `is_author`, `posted_at`, `platform`
- `profile`: `user_id`, `username`, `display_name`, `bio`, `avatar_url`, `twitter_username`, `platform`, `publications`
- `notes`: `id`, `kind`, `text`, `author_username`, `author_name`, `like_count`, `posted_at`, `platform`, `restacked_post`, `attachment_urls`

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0031, one event per started block of 10 results.
- `publication`: $0.0010, one event per non-empty request, whatever the row count.
- `publication_posts`: $0.0031, one event per started block of 10 results.
- `post`: $0.0007, one event per non-empty request, whatever the row count.
- `comments`: $0.0063, one event per started block of 20 results.
- `profile`: $0.0013, one event per non-empty request, whatever the row count.
- `notes`: $0.0043, one event per started block of 25 results.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee, and platform usage is included in these prices.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.
- This is an independent Actor. It is not affiliated with, sponsored by, or endorsed by Substack or its owner; names and trademarks belong to their respective owners.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

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

Used by `search` (required). Specifies the discovery query string for locating Substack newsletters and publications. It does not perform full-text searches across post bodies.

## `url` (type: `string`):

Used by `publication` (required), `publication_posts` (required), `post` (required), `comments` (required). Specifies the target Substack resource link. Use publication homepages for publication and publication_posts, or direct /p/ post links for post and comments. The publication action requires a URL containing a recognizable Substack handle (custom domains may not parse), whereas publication_posts accepts custom domain links directly.

## `content_type` (type: `string`):

Used by `publication_posts`. Filters publication posts by content format using all_types, newsletter_posts_only, podcast_episodes_only, or threads_only. Field presence must be verified against specific post links, and setting this value does not unlock paywalled content.

## `since` (type: `string`):

Used by `publication_posts`. Specifies the start date string for filtering posts or activity feeds within a date range. Its presence in shared profile or publication parameters does not enable account creation date filtering.

## `until` (type: `string`):

Used by `publication_posts`. Specifies the end date string for filtering posts or activity feeds alongside since. This parameter does not represent subscription expiration dates or trigger complete historical archive exports.

## `username` (type: `string`):

Used by `profile` (required), `notes` (required). Specifies the target creator handle for profile or notes, accepted as a plain handle (with optional @ prefix) or a full substack.com/@user link. The notes action fetches short creator updates rather than long-form publication posts.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 10 (max 30); `publication_posts` 10 (max 30); `comments` 20 (max 100); `notes` 25 (max 200). Billing: `search` one event per started block of 10 results; `publication_posts` one event per started block of 10 results; `comments` one event per started block of 20 results; `notes` one event per started block of 25 results.

## `params` (type: `object`):

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "climate"
}
```

# Actor output Schema

## `records` (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 = {
    "keyword": "climate"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-substack-api").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 = { "keyword": "climate" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-substack-api").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 '{
  "keyword": "climate"
}' |
apify call blushing_parachute/everyinfra-substack-api --silent --output-dataset

```

## MCP server setup

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

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/QCNeVWxC2KjR7HLTr/builds/i5jjRuyrZ2hgDiXAu/openapi.json
