# Apple Podcasts Scraper — Host Emails & Sponsor Leads (`ttyan0111/podcast-host-email-sponsor-spy`) Actor

Zero-proxy Apple Podcasts and bounded-RSS scraper extracting podcast host emails (direct vs platform relay), show metadata, episode recency activity, and sponsor/promo domains across recent episodes, with per-item agentSummary and RUN_SUMMARY in Key-Value Store for AI agents.

- **URL**: https://apify.com/ttyan0111/podcast-host-email-sponsor-spy.md
- **Developed by:** [Truong Truong Giang](https://apify.com/ttyan0111) (community)
- **Categories:** Lead generation, Agents
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 podcast lead & host email scrapeds

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/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

## Apple Podcasts Scraper — Host Emails & Sponsor Leads

Fast **zero-proxy Apple Podcasts and RSS intelligence scraper** built for **B2B outreach teams, podcast guest-booking agencies, sponsorship sales, and AI agents (via Apify MCP Server)**.

### Key Capabilities

1. **Multi-Mode Input (`queries`):** Search Apple Podcasts by keyword (fetching up to `50` candidates per query before filtering so strict filters still deliver leads), pass Apple Podcasts URLs or numeric IDs, or supply direct `http(s)://` RSS XML URLs.
2. **Bounded 400 KB XML Streaming (`256 MB` RAM Safe):** Streams each RSS feed with `AbortSignal.timeout(8000)` + manual abort after `400 KB` (`409,600` bytes), keeping memory tiny even on multi-megabyte backlogs.
3. **Prioritized Host Email Extraction + Relay Flagging:** Extracts `hostEmail` in priority order (`<itunes:email>` → `<managingEditor>` → channel `<description>` `mailto:`/regex), returns `allEmails`, and sets `isPlatformRelayEmail` for relay addresses (`@anchor.fm`, `@podcasters.spotify.com`, `@megaphone.fm`, `@substack.com`, `@*.acast.com`) vs direct personal/company domains.
4. **Episode Recency & Sponsor Domain Detection:** Parses the latest `<item><pubDate>` (`lastEpisodeTitle`, `lastEpisodePublishedAt`, `daysSinceLastEpisode`, `isActive`) and scans up to `episodesToAnalyze` recent episode show notes (`<description>` / `<content:encoded>`) for external `sponsorDomainsDetected`, filtering out social and podcast-hosting platforms.
5. **AI Agent & MCP Ready:** Emits a compact `agentSummary` on every dataset record plus a Key-Value Store `RUN_SUMMARY` record (`emailCoveragePercent`, `activeShowsCount`, `topSponsorDomains`, `topEmails`), running with `$0` proxy cost.

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `queries` | `string[]` | `["B2B SaaS"]` | Search keywords, Apple Podcast URLs/IDs, or direct RSS XML URLs |
| `country` | `string` | `"US"` | Two-letter Apple Podcasts storefront country code |
| `maxPodcastsPerQuery` | `integer` | `15` | Max unique podcasts to export per query (`1–50`) |
| `onlyWithEmail` | `boolean` | `true` | Keep only shows with a parsed RSS contact email |
| `activeWithinDays` | `integer` | `90` | Keep only shows published within N days (`0` disables filter) |
| `episodesToAnalyze` | `integer` | `5` | Recent episodes per show to scan for sponsor domains (`1–20`) |

### Output & Pricing

- **Dataset:** One structured lead object per podcast including `hostEmail`, `allEmails`, `isPlatformRelayEmail`, `websiteUrl`, `daysSinceLastEpisode`, `isActive`, `sponsorDomainsDetected`, and `agentSummary`.
- **Key-Value Store (`RUN_SUMMARY`):** Aggregate coverage metrics, active show count, top sponsor domains, and top emails.
- **Pay-per-Event Pricing:** `actor-start` (`$0.006` once per run), `podcast-lead-scraped` (`$0.0025` per exported podcast lead), and `rss-sponsor-analyzed` (`$0.0015` per RSS feed analyzed for sponsors).

# Actor input Schema

## `queries` (type: `array`):

List of search keywords (e.g. 'B2B SaaS', 'AI startups'), Apple Podcasts URLs, numeric Apple Podcast IDs (e.g. '916927819'), or direct RSS XML feed URLs.

## `country` (type: `string`):

Two-letter ISO country code for Apple Podcasts search (e.g. 'US', 'GB', 'CA', 'AU').

## `maxPodcastsPerQuery` (type: `integer`):

Maximum number of unique matching podcasts to export per query (1–50).

## `onlyWithEmail` (type: `boolean`):

Filter out shows that do not expose a contact email in their RSS feed (<itunes:email>, <managingEditor>, or channel description).

## `activeWithinDays` (type: `integer`):

Keep only shows with an episode published within the last N days. Set to 0 to disable the recency filter.

## `episodesToAnalyze` (type: `integer`):

Number of latest RSS episodes per podcast to scan for external sponsor and promo domains (1–20).

## Actor input object example

```json
{
  "queries": [
    "B2B SaaS",
    "AI startups"
  ],
  "country": "US",
  "maxPodcastsPerQuery": 15,
  "onlyWithEmail": true,
  "activeWithinDays": 90,
  "episodesToAnalyze": 5
}
```

# Actor output Schema

## `dataset` (type: `string`):

Structured Apple Podcasts metadata, host contact emails (direct vs relay), recency flags, and detected sponsor/promo domains.

## `runSummary` (type: `string`):

Aggregate podcast intelligence summary in Key-Value Store (email coverage %, active show count, top sponsor domains, and top host emails).

# 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 = {
    "queries": [
        "B2B SaaS",
        "AI startups"
    ],
    "country": "US",
    "maxPodcastsPerQuery": 15,
    "activeWithinDays": 90,
    "episodesToAnalyze": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("ttyan0111/podcast-host-email-sponsor-spy").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 = {
    "queries": [
        "B2B SaaS",
        "AI startups",
    ],
    "country": "US",
    "maxPodcastsPerQuery": 15,
    "activeWithinDays": 90,
    "episodesToAnalyze": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("ttyan0111/podcast-host-email-sponsor-spy").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 '{
  "queries": [
    "B2B SaaS",
    "AI startups"
  ],
  "country": "US",
  "maxPodcastsPerQuery": 15,
  "activeWithinDays": 90,
  "episodesToAnalyze": 5
}' |
apify call ttyan0111/podcast-host-email-sponsor-spy --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ttyan0111/podcast-host-email-sponsor-spy"
        }
    }
}
```

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/VRbovzx0V0yMGBA2Q/builds/tWrHu8W5RHhGbwiGO/openapi.json
