# Beehiiv Newsletter Scraper (`jungle_synthesizer/beehiiv-newsletter-scraper`) Actor

Scrape posts from any beehiiv-powered newsletter. Input publication domains — the actor discovers post URLs via sitemap and extracts title, author, publish date, excerpt, cover image, tags, and word count. Supports multi-newsletter fan-out in a single run.

- **URL**: https://apify.com/jungle_synthesizer/beehiiv-newsletter-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Lead generation, For creators
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.80 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Beehiiv Newsletter Scraper

Scrape posts from any beehiiv-powered newsletter. Input a list of publication domains or subdomains — the actor discovers post URLs via sitemap and extracts title, author, publish date, excerpt, cover image, tags, and word count. Supports multi-newsletter fan-out in a single run.

### What it does

The actor accepts a list of beehiiv publication domains (e.g. `readthepeak.com`, `discover.beehiiv.com`) and for each domain:

1. Fetches `<domain>/sitemap.xml` to discover all public post URLs matching the `/p/<slug>` pattern.
2. Crawls each post page and extracts structured data from the embedded JSON-LD Article schema.
3. Yields one record per post with all metadata fields.

Publications that sit behind bot protection or other anti-bot measures are gracefully skipped with a warning. Free posts are scraped; paywalled posts (where `isAccessibleForFree: false` in JSON-LD) are automatically skipped.

### Input

| Parameter         | Type    | Description |
|-------------------|---------|-------------|
| `domains`         | array   | List of publication domains. Accepts bare domains (`readthepeak.com`), subdomains (`mybrand.beehiiv.com`), or full URLs (`https://readthepeak.com`). |
| `maxItems`        | integer | Maximum posts to scrape **per publication** (0 = unlimited). Default: 10. |
| `includeFullText` | boolean | Also return the full post body text in `full_text`. Default: off. |

**Example input:**

```json
{
  "domains": ["readthepeak.com", "discover.beehiiv.com"],
  "maxItems": 50
}
```

### Output

Each record contains:

| Field                | Description                                                   |
|----------------------|---------------------------------------------------------------|
| `publication_domain` | Input domain (e.g. `readthepeak.com`)                         |
| `publication_name`   | Newsletter name from JSON-LD publisher                        |
| `post_url`           | Canonical post URL                                            |
| `post_title`         | Post headline                                                 |
| `post_subtitle`      | Post subtitle / description                                   |
| `author`             | Author name                                                   |
| `publish_date`       | ISO 8601 publish timestamp                                    |
| `excerpt`            | Short description (up to 300 chars)                           |
| `cover_image_url`    | Cover image URL                                               |
| `word_count`         | Estimated word count of post body                             |
| `tags`               | Comma-separated tags                                          |
| `full_text`          | Full post body text (empty unless `includeFullText` is set)   |
| `scraped_at`         | ISO 8601 scrape timestamp                                     |

**Example output record:**

```json
{
  "publication_domain": "readthepeak.com",
  "publication_name": "The Peak",
  "post_url": "https://www.readthepeak.com/p/canadian-universities-are-falling-behind",
  "post_title": "Canadian universities are falling behind",
  "post_subtitle": "Canada's post-secondary schools are losing their edge.",
  "author": "Lucas Arender",
  "publish_date": "2026-06-02T10:00:00.000Z",
  "excerpt": "Canada's post-secondary schools are losing their edge.",
  "cover_image_url": "https://beehiiv-images-production.s3.amazonaws.com/...",
  "word_count": 291,
  "tags": "Water Cooler, Perspectives",
  "full_text": "",
  "scraped_at": "2026-06-02T20:39:48.116Z"
}
```

### Limitations

- Publications behind bot protection (e.g. some high-traffic custom domains) will return a warning and be skipped. Use a different domain format if the publication has a `*.beehiiv.com` subdomain that is not walled.
- Paywalled posts (subscriber-only) are detected via JSON-LD and automatically skipped.
- Publications without a `sitemap.xml` or with no `/p/` posts in their sitemap are skipped.
- `full_text` extraction is best-effort — post body selectors may vary slightly across beehiiv themes.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `resumeCursor` (type: `string`):

Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs).

## `domains` (type: `array`):

List of beehiiv publication domains or subdomains to scrape. Accepts bare domains (readthepeak.com), subdomains (mybrand.beehiiv.com), or full URLs (https://readthepeak.com).

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

Maximum number of posts to scrape per publication (0 = unlimited)

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

Also return the full post body text in `full_text` (off by default).

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "domains": [
    "readthepeak.com"
  ],
  "maxItems": 10,
  "includeFullText": false
}
```

# Actor output Schema

## `results` (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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "domains": [
        "readthepeak.com"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/beehiiv-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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "domains": ["readthepeak.com"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/beehiiv-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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "domains": [
    "readthepeak.com"
  ],
  "maxItems": 10
}' |
apify call jungle_synthesizer/beehiiv-newsletter-scraper --silent --output-dataset

```

## MCP server setup

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