# Beehiiv Directory, Profile & Post Extractor (`dataspryva/beehiiv-directory-profile-and-post-extractor`) Actor

Browse Beehiiv's newsletter directory by category, fetch a newsletter's profile by URL or subdomain, or pull its recent posts with titles, authors and dates.

- **URL**: https://apify.com/dataspryva/beehiiv-directory-profile-and-post-extractor.md
- **Developed by:** [Dataspryva](https://apify.com/dataspryva) (community)
- **Categories:** News, Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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/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 Directory, Profile & Post Extractor

Map the Beehiiv newsletter ecosystem from one run: browse a live index of Beehiiv publications, pull a publication's profile, export its post archive, or fetch a single post with its public article text.

Everything works without a Beehiiv account, cookies or an API key. The actor reads public pages and public indexes only; it never unlocks a paywall.

### Modes

| Mode | What it returns | Typical input |
|---|---|---|
| `discover` | One row per newsletter from a live Beehiiv newsletter index: name, creator, description, topics, subscriber range, cadence, sponsorship and verification signals | keyword, category, frequency, sort order |
| `getNewsletter` | One profile row per newsletter: display name, description, logo, tags, language, socials, subscriber count when published, post count when exposed | newsletter URL or bare subdomain |
| `searchPosts` | One row per post found in the newsletter archive: title, URL, publish date, excerpt, cover image, and optional public article text | newsletter URL(s), post keyword, date range |
| `getPost` | One row per direct post URL, with JSON-LD metadata and optional public body text | URLs containing `/p/`, `/news/` or `/articles/` |

### Output fields

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

- `name` — publication display name
- `url` — canonical publication homepage
- `subdomain` — Beehiiv subdomain when the site is hosted on `*.beehiiv.com`
- `configuredDomain` — domain configured in Beehiiv, when exposed
- `description` — tagline or description
- `category` — first topic/tag
- `topics` — every topic from the directory listing
- `tags` — author tags exposed on the publication page
- `creator` — creator name (directory mode)
- `avatarUrl` — logo image
- `language` — publication language code
- `subscriberRange` — directory audience bucket such as `50K–100K`
- `subscriberCount` / `subscriberCountText` — exact or advertised audience when published
- `frequency`, `publishingDay` — cadence when the directory knows it
- `acceptsSponsors`, `sponsorPriceFrom` — sponsorship signals
- `verified`, `featured`, `activeStatus`, `lastVerified`, `lastIssueDate` — directory freshness signals
- `premium`, `private` — access flags when set
- `socials` — Twitter/X, LinkedIn, Instagram, YouTube, Facebook, TikTok, Threads, Bluesky, Discord
- `postCount` — only when the page exposes a real count
- `directoryUrl` — where the listing was found
- `recordType`, `scrapedAt`

#### Post rows (`recordType: "post"`)

- `title`, `url`, `publishedAt`, `updatedAt`
- `excerpt` — subtitle or preview text
- `author` — post or publication author
- `newsletterName`, `newsletterUrl` — parent publication
- `imageUrl` — cover image
- `postId`, `slug` — identifiers from the page
- `isPaywalled` — set when the post is explicitly gated
- `contentText` — public article text (20,000 characters max) when `includeContent` is on
- `recordType`, `scrapedAt`

Empty values are omitted at every depth — never `null`, `""`, `[]` or a placeholder.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `discover` | `discover`, `getNewsletter`, `searchPosts` or `getPost` |
| `startUrls` | array | `[]` | Newsletter homepages or direct post URLs |
| `subdomains` | array | `[]` | Bare Beehiiv subdomains such as `aibreakfast` |
| `searchQuery` | string | – | Directory keyword (mode=discover) |
| `category` | string | – | Directory topic: AI, SaaS, Marketing, Startups, Tech News and 12 more (mode=discover) |
| `frequency` | string | – | `daily`, `weekly` or `2-3x-week` when the listing publishes a cadence (mode=discover) |
| `sortBy` | string | `popular` | `popular`, `newest`, `featured`, `trending` or `alpha` (mode=discover) |
| `postSearchQuery` | string | – | Keep posts whose title/excerpt matches a keyword (mode=searchPosts) |
| `dateFrom` | string | – | Inclusive lower publish date, `YYYY-MM-DD` (mode=searchPosts) |
| `dateTo` | string | – | Inclusive upper publish date, `YYYY-MM-DD` (mode=searchPosts) |
| `maxItems` | integer | `20` | Maximum records saved (1–1000) |
| `maxPostsPerNewsletter` | integer | `10` | Post cap per newsletter, 1–1000 (mode=searchPosts) |
| `includeContent` | boolean | `false` | Add public article text (slower; paywalled bodies are skipped) |

Saved tasks that still send `urls`, `publicationUrls`, `query`, `topics`, `maxPosts` or `postsPerNewsletter` keep working: those legacy keys are mapped in code.

#### Example: browse AI newsletters

```json
{
  "mode": "discover",
  "category": "AI",
  "sortBy": "popular",
  "maxItems": 25
}
```

#### Example: profile two newsletters

```json
{
  "mode": "getNewsletter",
  "subdomains": ["aibreakfast", "superhuman"]
}
```

#### Example: recent posts with a keyword filter

```json
{
  "mode": "searchPosts",
  "startUrls": ["https://aibreakfast.beehiiv.com"],
  "postSearchQuery": "agents",
  "maxPostsPerNewsletter": 25,
  "includeContent": true
}
```

#### Example: one post

```json
{
  "mode": "getPost",
  "startUrls": ["https://aibreakfast.beehiiv.com/p/jensen-reinstated-as-nvidia-ceo"]
}
```

### What it is used for

- **Newsletter prospecting** — shortlist publications by topic, audience bucket and sponsorship availability
- **Media-kit research** — collect a publication's description, cadence and social profiles before outreach
- **Content monitoring** — export new issues on a schedule and diff titles or excerpts over time
- **Newsletter analytics** — build datasets for topic modeling, publishing cadence or sponsorship analysis
- **Archive migration** — export an author's public back catalogue with dates, authors and optional text

### FAQ

**Does this need a Beehiiv API key?** No. It reads public pages and a public newsletter index. No account, cookie or proxy setup is required.

**Where does the directory come from?** Beehiiv retired its public reader-facing directory page, so `discover` reads the largest public index of Beehiiv newsletters (SaaS Newsletters). Profiles and posts always come from the Beehiiv publication itself.

**Why does the directory have 81 newsletters?** That is the current size of the public Beehiiv index. The actor reports the honest count instead of inventing rows. Use `getNewsletter` or `searchPosts` with any Beehiiv URL for publications outside it.

**Can it scrape custom domains?** Yes. Pass the full URL, e.g. `https://www.therundown.ai`, in `startUrls`.

**Why do some Beehiiv subdomains work through a mirror?** Beehiiv fronts many sites with Cloudflare. When a direct request is challenged, the actor automatically reads the same public page through a free translation mirror. No paid proxy is required.

**Are subscriber counts exact?** Only when the publication or index states one. Otherwise `subscriberRange` is an audience bucket, and it is omitted when unknown.

**Can it unlock premium posts?** No. Public metadata and free article text only. Gated posts are marked `isPaywalled` when the page says so.

**How many posts can I get?** The archive is paginated and the actor keeps going until `maxPostsPerNewsletter` or `maxItems` is reached. The cap is `maxPostsPerNewsletter` (1–1000), so raise it for deep backfills.

**What is the smallest run?** The prefill browses the directory for 5 newsletters with no extra requests. It finishes in seconds and always returns output.

# Actor input Schema

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

What to collect from Beehiiv.

## `startUrls` (type: `array`):

Newsletter homepages (e.g. https://aibreakfast.beehiiv.com or https://www.therundown.ai) for getNewsletter/searchPosts, or direct post URLs (…/p/slug) for getPost.

## `subdomains` (type: `array`):

Bare Beehiiv subdomains such as aibreakfast or tldr. They are resolved to https://<subdomain>.beehiiv.com. Custom domains belong in startUrls.

## `searchQuery` (type: `string`):

Keyword matched against newsletter name and listing text in the Beehiiv directory (mode=discover).

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

Topic filter for the directory (mode=discover). Leave empty for every topic.

## `frequency` (type: `string`):

Directory filter for newsletters with a published cadence (mode=discover). Frequency is known for a subset of listings.

## `sortBy` (type: `string`):

How to order directory results (mode=discover).

## `postSearchQuery` (type: `string`):

Only keep posts whose title or excerpt contains this keyword (mode=searchPosts). Uses the newsletter archive search when available.

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

Only keep posts published on or after this date (YYYY-MM-DD). Leave empty for no lower bound.

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

Only keep posts published on or before this date (YYYY-MM-DD). Leave empty for no upper bound.

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

Maximum total records to save (newsletters or posts).

## `maxPostsPerNewsletter` (type: `integer`):

Cap on posts collected from each newsletter (mode=searchPosts).

## `includeContent` (type: `boolean`):

Fetch each post page and add its public article text (mode=searchPosts/getPost). Slower and uses more requests; paywalled bodies are never bypassed.

## Actor input object example

```json
{
  "mode": "discover",
  "startUrls": [],
  "subdomains": [],
  "searchQuery": "",
  "category": "",
  "frequency": "",
  "sortBy": "popular",
  "postSearchQuery": "",
  "dateFrom": "",
  "dateTo": "",
  "maxItems": 5,
  "maxPostsPerNewsletter": 5,
  "includeContent": false
}
```

# Actor output Schema

## `newsletters_and_posts` (type: `string`):

Dataset containing all scraped Beehiiv newsletter profiles, directory listings and post 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": "discover",
    "startUrls": [],
    "subdomains": [],
    "searchQuery": "",
    "category": "",
    "frequency": "",
    "sortBy": "popular",
    "postSearchQuery": "",
    "dateFrom": "",
    "dateTo": "",
    "maxItems": 5,
    "maxPostsPerNewsletter": 5,
    "includeContent": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataspryva/beehiiv-directory-profile-and-post-extractor").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": "discover",
    "startUrls": [],
    "subdomains": [],
    "searchQuery": "",
    "category": "",
    "frequency": "",
    "sortBy": "popular",
    "postSearchQuery": "",
    "dateFrom": "",
    "dateTo": "",
    "maxItems": 5,
    "maxPostsPerNewsletter": 5,
    "includeContent": False,
}

# Run the Actor and wait for it to finish
run = client.actor("dataspryva/beehiiv-directory-profile-and-post-extractor").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": "discover",
  "startUrls": [],
  "subdomains": [],
  "searchQuery": "",
  "category": "",
  "frequency": "",
  "sortBy": "popular",
  "postSearchQuery": "",
  "dateFrom": "",
  "dateTo": "",
  "maxItems": 5,
  "maxPostsPerNewsletter": 5,
  "includeContent": false
}' |
apify call dataspryva/beehiiv-directory-profile-and-post-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dataspryva/beehiiv-directory-profile-and-post-extractor"
        }
    }
}
```

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/edQmXGDUq1inGP7Iv/builds/XizFcx1Nx5iVFixNu/openapi.json
