# Buttondown Newsletter Scraper (`crawlerbros/buttondown-newsletter-scraper`) Actor

Scrape posts and info from any public Buttondown newsletter (buttondown.com/{newsletter}) via its public archive pages. Browse a newsletter's full public archive, look up specific posts by URL, or fetch newsletter info. No login required.

- **URL**: https://apify.com/crawlerbros/buttondown-newsletter-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Buttondown Newsletter Scraper

Scrape posts and info from any public [Buttondown](https://buttondown.com) newsletter — buttondown.com/{newsletter} — via its public archive pages. Works globally against any Buttondown-hosted newsletter. No login, no API key, no proxy required.

### What this actor does

- **Three modes:** `posts`, `byPostUrls`, `newsletterInfo`
- **Full archive pagination:** walks a newsletter's entire public archive, newest first
- **Optional full-body enrichment:** fetch each post's individual page for exact timestamps, author info, and complete HTML body
- **Filters:** publish-date range, keyword (title/excerpt substring)
- **Empty fields are omitted** — every record only contains fields that actually have data

### Output fields

#### Posts (`recordType: "post"`)

| Field | Description |
|---|---|
| `postId` | `{newsletterSlug}/{postSlug}` composite ID |
| `newsletterSlug`, `postSlug` | Post identity |
| `title`, `excerpt` | Title and short description (always present, from the archive listing) |
| `publishedDate` | Publish date, `YYYY-MM-DD` (from the archive listing, day precision) |
| `featureImage` | Cover image URL, if the post has one |
| `postUrl` | Canonical archive URL |
| `html` | Full HTML body (only with `includeFullBody: true` or mode=byPostUrls) |
| `publishedAt`, `updatedAt` | Exact ISO timestamps (only with full-body enrichment) |
| `isAccessibleForFree` | Whether the post is publicly free vs. paid-subscriber-gated (only with full-body enrichment; not present for Buttondown's own cross-posted `/blog/` articles, which are always free) |
| `articleSection` | Category/section label, when the post has one (only with full-body enrichment) |
| `authorName`, `authorUrl`, `authorImage` | Author info (only with full-body enrichment) |
| `ogTitle`, `ogDescription`, `ogImage` | Social card fields (only with full-body enrichment) |
| `language` | Newsletter's declared page language (e.g. `en`, `fr`, `pt-br`), from the newsletter owner's account language setting |

#### Newsletter info (`recordType: "newsletter"`)

`newsletterSlug`, `newsletterName`, `newsletterDescription`, `icon`, `language`, `newsletterUrl`, `archiveUrl`, `socialLinks` (the author's own configured identity links — GitHub, X/Twitter, Bluesky, Mastodon, personal site, etc. — as `{platform, url}` pairs; only present when the newsletter owner has configured them)

Every record also includes `recordType` and `scrapedAt` (UTC ISO timestamp).

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `posts` | `posts` / `byPostUrls` / `newsletterInfo` |
| `newsletterSlug` | string | `buttondown` | The newsletter's Buttondown slug, or a full URL |
| `postUrls` | array | – | mode=byPostUrls: exact archive post URLs |
| `includeFullBody` | boolean | `false` | mode=posts: fetch each post's page for full body/timestamps/author (slower) |
| `dateFrom` | string | – | ISO date, published on/after |
| `dateTo` | string | – | ISO date, published on/before |
| `keyword` | string | – | Case-insensitive substring match on title/excerpt |
| `maxItems` | integer | `50` | Hard cap (1–1000) |

#### Example: a newsletter's full archive

```json
{
  "mode": "posts",
  "newsletterSlug": "buttondown",
  "maxItems": 50
}
```

#### Example: with full post bodies

```json
{
  "mode": "posts",
  "newsletterSlug": "thesephist",
  "includeFullBody": true,
  "maxItems": 20
}
```

#### Example: posts in a date range

```json
{
  "mode": "posts",
  "newsletterSlug": "buttondown",
  "dateFrom": "2026-01-01",
  "dateTo": "2026-12-31",
  "maxItems": 50
}
```

#### Example: single post lookup

```json
{
  "mode": "byPostUrls",
  "newsletterSlug": "buttondown",
  "postUrls": ["https://buttondown.com/buttondown/archive/updates-from-july-4795/"]
}
```

### Use cases

- **Content research** — pull a newsletter's full public archive with metadata
- **Migration / backup** — export a Buttondown newsletter's post history
- **Content monitoring** — track a newsletter's publishing cadence and topics
- **Curation** — filter posts by date range or keyword across a newsletter's history

### FAQs

**Does this require a Buttondown account or API key?**
No. This actor reads the same public archive pages any visitor sees at `buttondown.com/{newsletter}/archive` — no login required.

**Will this work on any Buttondown newsletter?**
Yes, as long as the newsletter owner has public archives enabled (Buttondown lets writers mark individual emails as public, subscriber-only, or paid-only — this actor only sees what's publicly visible, same as a logged-out visitor).

**Why is `publishedDate` day-precision but `publishedAt` has exact time?**
`publishedDate` comes from the archive listing page (which only shows a date, e.g. "August 6, 2026"). Set `includeFullBody: true` to also fetch each post's individual page, which includes an exact ISO timestamp.

**What if a newsletter slug doesn't exist?**
The actor fails soft with a clear status message and emits zero records — it never crashes on a bad or private newsletter slug.

**Is this actor global?**
Yes — Buttondown hosts newsletters worldwide with no regional restrictions. Any public newsletter's slug works as input.

# Actor input Schema

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

What to fetch.

## `newsletterSlug` (type: `string`):

The newsletter's Buttondown slug, e.g. `buttondown` for buttondown.com/buttondown. Also accepts a full URL.

## `postUrls` (type: `array`):

Full Buttondown archive post URLs, e.g. `https://buttondown.com/buttondown/archive/updates-from-july-4795/`.

## `includeFullBody` (type: `boolean`):

Fetch each post's individual page for full HTML body, exact timestamps, and author info. Slower — one extra request per post.

## `dateFrom` (type: `string`):

ISO date, e.g. `2024-01-01`. Only posts published on or after this date.

## `dateTo` (type: `string`):

ISO date, e.g. `2024-12-31`. Only posts published on or before this date.

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

Case-insensitive substring match against the title and excerpt.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "posts",
  "newsletterSlug": "buttondown",
  "postUrls": [],
  "includeFullBody": false,
  "dateFrom": "",
  "dateTo": "",
  "keyword": "",
  "maxItems": 50
}
```

# Actor output Schema

## `items` (type: `string`):

Dataset containing all scraped Buttondown newsletter records.

# 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 = {
    "mode": "posts",
    "newsletterSlug": "buttondown",
    "postUrls": [],
    "includeFullBody": false,
    "dateFrom": "",
    "dateTo": "",
    "keyword": "",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/buttondown-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 = {
    "mode": "posts",
    "newsletterSlug": "buttondown",
    "postUrls": [],
    "includeFullBody": False,
    "dateFrom": "",
    "dateTo": "",
    "keyword": "",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/buttondown-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 '{
  "mode": "posts",
  "newsletterSlug": "buttondown",
  "postUrls": [],
  "includeFullBody": false,
  "dateFrom": "",
  "dateTo": "",
  "keyword": "",
  "maxItems": 50
}' |
apify call crawlerbros/buttondown-newsletter-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/buttondown-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/XKrYtJZlArLtXsedq/builds/3BajG9sX95uNSGeMG/openapi.json
