# Substack Newsletter & Sponsor Intelligence (`afkdigital/substack-newsletter-sponsor-intelligence`) Actor

Inspect authorized feeds, publication pages and licensed newsletter exports for explicit sponsor disclosures, affiliate links, observed cadence and sourced subscriber counts.

- **URL**: https://apify.com/afkdigital/substack-newsletter-sponsor-intelligence.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 unique post revieweds

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 Newsletter & Sponsor Intelligence

Review licensed newsletter exports, authorized RSS/Atom feeds and public publication pages for media research. One dataset item represents one reviewed post. Its relationships array retains multiple findings. The first finding supplies the summary columns, with sponsorship taking precedence over affiliate disclosure and editorial mention.

### Run your first analysis

Run the prefilled synthetic Field Notes example. It contains three posts, two explicitly named sponsors in one post, one affiliate and one editorial mention. To inspect your own publication, replace postsFile or remove it when using live URLs. Supply sponsorKeywords to track literal brand names. Positive sponsorship detection works independently of these keywords.

Paste a JSON export into postsFile as {"posts":\[...]} or use {"fileUrl":"https://your-domain.example/export.json"} for a permitted public JSON export. Each post requires newsletterUrl and postUrl. Include newsletterName, postTitle, publishedAt (ISO 8601) and html or text. A subscriberObservation may contain evidence such as "1,240 total subscribers", basis ("total", "paid" or "free"), sourceUrl and observedAt. Use actual source observations. Do not send subscriber lists or private contact details.

feedUrls reads entry content from RSS/Atom. newsletterUrls accepts a public article URL or a publication page advertising an RSS/Atom feed. Live access requires a sourcePermissions entry for each host, e.g. {"news.example":{"commercialPermission":"Publisher agreement, section 3"}}. Use a genuine reference granting automated access and commercial processing. For Substack-hosted publications, including custom domains, confirm platform permission as well as publisher rights. Substack's [Terms of Use](https://substack.com/tos) restrict crawling, scraping and significant copying. An accessible feed, a robots allowance or a publisher's subscription is insufficient permission. For a substack.com host include platformPermission. The Actor cannot authenticate a grant. Licensed customer exports can be analyzed without contacting the publisher. The default demo consists of original fictitious records.

### Output and interpretation

Dates are inclusive UTC calendar dates. The post cap selects the newest matching entries per publication. URLs are deduplicated across the run after removing fragments and common tracking parameters. Different permalinks can still refer to the same issue. publishingFrequency reports the median number of days between successive observed publication timestamps and the dated sample size, before the output cap. A partial feed or selected export can bias this estimate.

The English disclosure rules recognize simple, explicit "Sponsored by…" statements. Affiliate relationships require recognizable disclosure near the link. Keywords can establish a brand mention only. A null sponsor domain means the linked domain was unavailable. An outbound link may be a redirect or intermediary. Findings are evidence for human review. Ambiguous prose, unnamed affiliates, image-only disclosures, additional languages and complex HTML can be missed. publicContactUrl is an explicitly labeled publication contact link on the same host. Subscriber fields require exact, dated, sourced observations. Rounded counts and qualitative phrases yield null. subscriberGrowthPercent uses an earlier positive exact count for the same publication, basis and source URL in optionalPreviousSnapshot. Supply one verified prior snapshot per publication. No article bodies appear in output. Input storage can contain the original customer export.

### Automation examples

- **n8n:** Use HTTP Request to POST your JSON input to https://api.apify.com/v2/acts/afkdigital~substack-newsletter-sponsor-intelligence/runs with a bearer credential. Poll the returned run ID at /v2/actor-runs/{id}. On SUCCEEDED, GET /v2/datasets/{defaultDatasetId}/items and split the array. Filter relationships by sponsorship.
- **Make:** Use Apify > Run an Actor with your licensed export, then Get dataset items after completion. Iterate relationships and map sponsorName, disclosureEvidence and postUrl to a research table. Use postUrl plus referencedName for upserts.
- **Clay:** Use an HTTP API enrichment on a publication row to submit a permitted feed URL and host permission record. Store the run ID, retrieve the completed dataset, then enrich by postUrl. Route affiliate findings and ordinary mentions to separate columns.

### Pricing

USD 0.003 per reviewed post (USD 3 per 1,000). One post-reviewed event per reviewed unique post within a run, including posts with no disclosure. Multiple sponsors share the same item and event. Re-running a post in another run is a new review. No sponsor discovery or audience growth guarantee.

# Actor input Schema

## `postsFile` (type: `object`):

Paste your licensed export as an object containing a posts array. Clear the demo when adding your own sources.

## `feedUrls` (type: `array`):

Authorized public HTTPS feeds.

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

Authorized article pages or sites with advertised feeds.

## `sourcePermissions` (type: `object`):

Map each host to commercialPermission and, for Substack, platformPermission references.

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

Inclusive UTC date YYYY-MM-DD.

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

Inclusive UTC date YYYY-MM-DD.

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

Newest matching unique posts per publication.

## `sponsorKeywords` (type: `array`):

Literal brand names for editorial mentions. Keywords alone never establish sponsorship.

## `optionalPreviousSnapshot` (type: `array`):

Earlier output rows including exact dated subscriber evidence.

## Actor input object example

```json
{
  "postsFile": {
    "posts": [
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Fieldwork dispatch",
        "postUrl": "https://field.example/issues/1",
        "publishedAt": "2026-10-08T12:00:00Z",
        "html": "<p>Sponsored by <a href='https://cedar.example'>Cedar</a> and <a href='https://birch.example'>Birch</a>.</p><p><a href='/contact'>Contact us</a></p>",
        "subscriberObservation": {
          "evidence": "1,240 total subscribers",
          "observedAt": "2026-10-08",
          "sourceUrl": "https://field.example/about",
          "basis": "total"
        }
      },
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Reading list",
        "postUrl": "https://field.example/issues/2",
        "publishedAt": "2026-10-15T12:00:00Z",
        "html": "<p>Affiliate link: <a href='https://floor.example'>Floor Press</a>. We earn a commission.</p><p><a href='/contact'>Contact us</a></p>"
      },
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Editorial notebook",
        "postUrl": "https://field.example/issues/3",
        "publishedAt": "2026-10-22T12:00:00Z",
        "html": "<p>We compared <a href='https://cedar.example'>Cedar</a> with other tools. Thousands of readers joined us.</p><p><a href='/contact'>Contact us</a></p>"
      }
    ]
  },
  "maxPostsPerNewsletter": 50,
  "sponsorKeywords": [
    "Cedar"
  ]
}
```

# Actor output Schema

## `items` (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 = {
    "postsFile": {
        "posts": [
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Fieldwork dispatch",
                "postUrl": "https://field.example/issues/1",
                "publishedAt": "2026-10-08T12:00:00Z",
                "html": "<p>Sponsored by <a href='https://cedar.example'>Cedar</a> and <a href='https://birch.example'>Birch</a>.</p><p><a href='/contact'>Contact us</a></p>",
                "subscriberObservation": {
                    "evidence": "1,240 total subscribers",
                    "observedAt": "2026-10-08",
                    "sourceUrl": "https://field.example/about",
                    "basis": "total"
                }
            },
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Reading list",
                "postUrl": "https://field.example/issues/2",
                "publishedAt": "2026-10-15T12:00:00Z",
                "html": "<p>Affiliate link: <a href='https://floor.example'>Floor Press</a>. We earn a commission.</p><p><a href='/contact'>Contact us</a></p>"
            },
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Editorial notebook",
                "postUrl": "https://field.example/issues/3",
                "publishedAt": "2026-10-22T12:00:00Z",
                "html": "<p>We compared <a href='https://cedar.example'>Cedar</a> with other tools. Thousands of readers joined us.</p><p><a href='/contact'>Contact us</a></p>"
            }
        ]
    },
    "sponsorKeywords": [
        "Cedar"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/substack-newsletter-sponsor-intelligence").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 = {
    "postsFile": { "posts": [
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Fieldwork dispatch",
                "postUrl": "https://field.example/issues/1",
                "publishedAt": "2026-10-08T12:00:00Z",
                "html": "<p>Sponsored by <a href='https://cedar.example'>Cedar</a> and <a href='https://birch.example'>Birch</a>.</p><p><a href='/contact'>Contact us</a></p>",
                "subscriberObservation": {
                    "evidence": "1,240 total subscribers",
                    "observedAt": "2026-10-08",
                    "sourceUrl": "https://field.example/about",
                    "basis": "total",
                },
            },
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Reading list",
                "postUrl": "https://field.example/issues/2",
                "publishedAt": "2026-10-15T12:00:00Z",
                "html": "<p>Affiliate link: <a href='https://floor.example'>Floor Press</a>. We earn a commission.</p><p><a href='/contact'>Contact us</a></p>",
            },
            {
                "newsletterName": "Field Notes (synthetic demo)",
                "newsletterUrl": "https://field.example/",
                "postTitle": "Editorial notebook",
                "postUrl": "https://field.example/issues/3",
                "publishedAt": "2026-10-22T12:00:00Z",
                "html": "<p>We compared <a href='https://cedar.example'>Cedar</a> with other tools. Thousands of readers joined us.</p><p><a href='/contact'>Contact us</a></p>",
            },
        ] },
    "sponsorKeywords": ["Cedar"],
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/substack-newsletter-sponsor-intelligence").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 '{
  "postsFile": {
    "posts": [
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Fieldwork dispatch",
        "postUrl": "https://field.example/issues/1",
        "publishedAt": "2026-10-08T12:00:00Z",
        "html": "<p>Sponsored by <a href='\''https://cedar.example'\''>Cedar</a> and <a href='\''https://birch.example'\''>Birch</a>.</p><p><a href='\''/contact'\''>Contact us</a></p>",
        "subscriberObservation": {
          "evidence": "1,240 total subscribers",
          "observedAt": "2026-10-08",
          "sourceUrl": "https://field.example/about",
          "basis": "total"
        }
      },
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Reading list",
        "postUrl": "https://field.example/issues/2",
        "publishedAt": "2026-10-15T12:00:00Z",
        "html": "<p>Affiliate link: <a href='\''https://floor.example'\''>Floor Press</a>. We earn a commission.</p><p><a href='\''/contact'\''>Contact us</a></p>"
      },
      {
        "newsletterName": "Field Notes (synthetic demo)",
        "newsletterUrl": "https://field.example/",
        "postTitle": "Editorial notebook",
        "postUrl": "https://field.example/issues/3",
        "publishedAt": "2026-10-22T12:00:00Z",
        "html": "<p>We compared <a href='\''https://cedar.example'\''>Cedar</a> with other tools. Thousands of readers joined us.</p><p><a href='\''/contact'\''>Contact us</a></p>"
      }
    ]
  },
  "sponsorKeywords": [
    "Cedar"
  ]
}' |
apify call afkdigital/substack-newsletter-sponsor-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/substack-newsletter-sponsor-intelligence"
        }
    }
}
```

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/JnoDUJlYSmc2oxoUV/builds/UoO1PBJGvAWyRzSag/openapi.json
