# AZ PulseLeads - Substack Outreach Lead Generator (`pure_matai/substack-outreach-leads`) Actor

Discover niche Substack authors by keyword, enrich their social profiles and contactability, and export outreach-ready leads. Pay only for leads with reachable contact info - ideal for guest posts, B2B outreach, and creator partnerships.

- **URL**: https://apify.com/pure\_matai/substack-outreach-leads.md
- **Developed by:** [AzulGanzes Technologies](https://apify.com/pure_matai) (community)
- **Categories:** Developer tools, AI, News
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 lead discovereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

![AZ PulseLeads](https://raw.githubusercontent.com/gsrtech100-wq/pulseleads/main/demo/branding/az_pulseleads_light.png)

## AZ PulseLeads — Substack Outreach Lead Generator

**Stop scrolling Substack for people to pitch. Type a topic, get a ranked list of relevant writers with their public email and socials — ready to reach out for PR, partnerships, influencer, or recruiting.**

*AZ PulseLeads is an AZULGANZES TECHNOLOGIES product (Product Factory naming: AZ StackPulse, AZ PulseLeads).*

AZ PulseLeads turns a keyword or a list of Substack publications into an **outreach lead list**: the right authors and publications in your niche, with their **public contact info** (when published) and a **topic-fit score** — ready to drop into your outreach.

> **Ethical use:** only public Substack data is used. Use the output only for lawful outreach, honor opt-outs, and comply with applicable privacy law (e.g. GDPR). We never invent contact data.

***

### Customer problem

PR agencies, marketers, recruiters, and partnership teams need to reach relevant writers — but discovering and qualifying them on Substack is manual, slow, and the contacts are scattered across profiles.

### Customer solution

1. **You provide** a topic (e.g. `AI`, `finance`, `health`) **or** paste known Substack URLs.
2. **AZ PulseLeads discovers** relevant Substack publications (search index + seed URLs).
3. **It extracts** the authors, their public email / socials, and a topic-fit score.
4. **You export** a clean, contact-ready lead list (CSV / JSON) and pay only for leads that include a public contact.

***

### Installation

```bash
## from this repository
apify login            # uses the token stored by the Apify CLI
apify push            # builds and uploads the Actor to your Apify account
```

The Actor is also available on the Apify Store as **`pure_matai~substack-outreach-leads`**.

### Configuration

All configuration is via the Actor input (no code changes). Key fields:

| Field | Default | What it does |
|---|---|---|
| `keywords` | *(empty)* | Topics to discover Substack publications for. Leave empty to use `newsletterUrls`. |
| `newsletterUrls` | *(empty)* | Known Substack URLs to skip discovery. |
| `maxAuthors` | `10` | Max authors collected per publication. |
| `minRelevance` | `0.3` | Topic-fit threshold (0 = loose, 1 = exact). Leads below are flagged `qualified:false`. |
| `includeContact` | `true` | Only bill for leads that have a public contact. |
| `proxy` | Apify proxy on | **Required** — Substack blocks datacenter IPs. |

### Example workflow

```json
{
  "keywords": ["AI", "finance"],
  "maxAuthors": 10,
  "minRelevance": 0.3,
  "includeContact": true,
  "proxy": { "useApifyProxy": true }
}
```

See [`examples/input_example.json`](examples/input_example.json) for a ready-to-run input.

### Output

Each lead in the dataset contains:

`authorName`, `authorBio`, `publicEmail`, `hasEmail`, `twitter`, `linkedin`, `website`,
`sourceName`, `sourceUrl`, `audienceSize`, `relevanceScore`, `qualified`, `contactReady`.

A **"Contact-Ready Leads"** dataset view shows only rows with an email or social.
See [`sample_output/`](sample_output/) for a real production run.

### Pricing

- **Pay per reachable lead:** billed via the `LEAD_DISCOVERED` event **only** for leads that are
  qualified **and** have a public contact. You pay for leads you can actually reach, not raw rows.
- Apify also adds a small per-run start fee and per-dataset-item fee.
- **Example:** 100 writers with contact ≈ **$0.08**.

> Pay-per-event pricing is enabled in the Apify Console (Monetization) for the published Actor.
> Intended events: `apify-actor-start` $0.00005, `apify-default-dataset-item` $0.00050,
> `LEAD_DISCOVERED` $0.00030.

### Architecture

See [`docs/architecture.md`](docs/architecture.md). The product uses a frozen connector
architecture: `SEARCH → CONNECTOR → ENRICHMENT → QUALIFICATION → EXPORT`. Substack is
**Connector #1** (fully implemented, reusing the proven AZ StackPulse engine); Medium, GitHub,
YouTube, and blogs are documented extension points that require no core changes.

### Troubleshooting

| Symptom | Cause | Fix |
|---|---|---|
| `No Substack sources were discovered` | Keyword returned no `*.substack.com` results | Use broader keywords or paste `newsletterUrls`. |
| `Found N source(s) but collected 0 author profiles` | Publication has no visible authors / was blocked | Try a larger publication (e.g. `https://lenny.substack.com`). |
| `0 are billable (no public contact found)` | Authors don't publish public contact | Broaden keywords, or set `includeContact=false` to get the full list. |
| Run fails immediately | Proxy not enabled | Ensure `proxy.useApifyProxy = true`. |
| Empty dataset | No input provided | Provide `keywords` or `newsletterUrls`. |

### Honesty / limitations

- Discovery via keyword uses a search index (DuckDuckGo in MVP). For production volume, wire a
  paid search provider (SerpAPI / Bing) — a documented extension point.
- Authors who don't publish a public email are still returned, flagged `contactReady:false`.
  We never invent contact data.
- `audienceSize` is often unavailable from public Substack APIs and may be `null`.

# Changelog

This Actor's version history is a separate document: https://apify.com/pure\_matai/substack-outreach-leads/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

What niche do you want writers for? e.g. AI, finance, health. The actor searches for relevant Substack publications and pulls their authors. Don't know any Substack URLs? Just fill this in. (Leave empty only if you're pasting URLs below.)

## `newsletterUrls` (type: `array`):

Already know the Substacks you want? Paste their URLs to skip discovery (custom domains supported). Leave empty to discover by keyword instead.

## `maxAuthors` (type: `integer`):

How many authors to collect from each publication (default 10).

## `minRelevance` (type: `number`):

Leads scoring below this on topic match are flagged unqualified (still exported). 0.3 = loose match, 0.7 = strong match. Default 0.3.

## `includeContact` (type: `boolean`):

On (recommended): you're only charged LEAD\_DISCOVERED for leads that have a public email or social. Off: all qualified leads are billed.

## `proxy` (type: `object`):

Apify proxy is ON by default and required — Substack blocks normal servers, so requests are routed through Apify's proxy automatically. You don't need to change this.

## Actor input object example

```json
{
  "keywords": [
    "AI",
    "finance"
  ],
  "newsletterUrls": [
    "https://lenny.substack.com"
  ],
  "maxAuthors": 10,
  "minRelevance": 0.3,
  "includeContact": true,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "keywords": [
        "AI",
        "finance"
    ],
    "newsletterUrls": [
        "https://lenny.substack.com"
    ],
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pure_matai/substack-outreach-leads").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 = {
    "keywords": [
        "AI",
        "finance",
    ],
    "newsletterUrls": ["https://lenny.substack.com"],
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("pure_matai/substack-outreach-leads").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 '{
  "keywords": [
    "AI",
    "finance"
  ],
  "newsletterUrls": [
    "https://lenny.substack.com"
  ],
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call pure_matai/substack-outreach-leads --silent --output-dataset

```

## MCP server setup

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

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/cHrRkLWSrR8QKYhH8/builds/ziOmvJ22MT5fgyc6r/openapi.json
