# Podcast New Episode Monitor (`titan_coder/podcast-new-episode-monitor`) Actor

Polls Apple's official free iTunes Lookup API and a podcast's own RSS feed, and tells you the moment a new episode drops. No login, no API key, no scraping.

- **URL**: https://apify.com/titan\_coder/podcast-new-episode-monitor.md
- **Developed by:** [Radu Furtuna](https://apify.com/titan_coder) (community)
- **Categories:** Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

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

## Podcast New Episode Monitor

Watches any podcast published in Apple Podcasts and tells you the moment a new episode goes live —
title, description, publish date, duration, direct link. No login, no API key, no scraping: this
actor talks only to Apple's own free, unauthenticated `itunes.apple.com` Lookup API and the
podcast's own public RSS feed (the same feed every podcast app already reads).

### How it works

1. You give each watch a `podcastId` — the numeric Apple/iTunes id from the podcast's own
   `podcasts.apple.com` URL (e.g. `.../id1200361736` → `1200361736`).
2. Every run, the actor asks Apple's Lookup API for that podcast's current RSS `feedUrl` (never
   cached long-term — if the show switches hosting providers, the actor follows automatically) and
   fetches the feed.
3. Episode identity is the feed's own `<guid>` (falling back to `<link>` if a `<guid>` is missing).
   The first run for a watch establishes a baseline silently — no episode is billed as "new" just
   because it's the first time the actor has seen the show. Every run after that reports only
   episodes that genuinely appeared since the previous check.

### Pricing (pay-per-event)

- `feed-checked` — charged once per watch per run, whether or not anything changed. This is the
  cost of doing the check.
- `new-episode-detected` — charged once per genuinely new episode delivered.

### Input

```json
{
  "monitorId": "my-podcast-monitor",
  "watches": [
    { "watchId": "the-daily", "podcastId": "1200361736" }
  ],
  "webhookUrl": "https://your-endpoint.example.com/hook"
}
```

`watchId` is your own label for the watch (used in output rows). `podcastId` is Apple's numeric
collection id. `webhookUrl` is optional — HTTPS only — and receives a JSON summary of each run.

### Guarantees

- **At-most-once billing under crash/retry — never charged twice.** An atomic claim on Apify's
  Request Queue (the platform's only atomic primitive) is acquired before any dataset write or
  charge, and is granted exactly once for the lifetime of the monitor. If a run is interrupted
  right after winning that claim, the event can be lost (never delivered/billed) — but it will
  never be billed a second time. A durable per-monitor ledger records each episode's progress for
  reporting and troubleshooting.
- **Single-flight.** Two overlapping runs of the same monitor can't double-process — a lease,
  acquired before any state is read, blocks the second run cleanly.
- **Durable state.** Each monitor's seen-episode history, ledgers and delivered rows live in a
  named per-monitor store that persists across every scheduled run, not just within one run.

Built by OmniCoder (https://t.me/OmniCoder).

# Actor input Schema

## `monitorId` (type: `string`):

Your own identifier for this monitor instance, lowercase letters/digits/hyphens. Keep it stable across runs - it scopes this monitor's durable state.

## `watches` (type: `array`):

List of {watchId, podcastId} objects. podcastId is the numeric Apple/iTunes collectionId - the digits after 'id' in a podcasts.apple.com URL, e.g. https://podcasts.apple.com/us/podcast/the-daily/id1200361736 -> podcastId 1200361736.

## `webhookUrl` (type: `string`):

Optional. Receives a JSON summary of the run. HTTPS only.

## Actor input object example

```json
{
  "monitorId": "example-monitor",
  "watches": [
    {
      "watchId": "example-podcast",
      "podcastId": "1200361736"
    }
  ]
}
```

# Actor output Schema

## `episodes` (type: `string`):

One row per new episode detected: watchId, podcastId/title, artistName, episodeGuid, episodeTitle, episodeDescription, episodeLink, episodeDuration, pubDate, runId, detectedAt.

## `coverage` (type: `string`):

Per-watch status and reason, episodes delivered/billed, feed-check billing counters. Enough to reconcile every charge against every row.

# 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 = {
    "monitorId": "example-monitor",
    "watches": [
        {
            "watchId": "example-podcast",
            "podcastId": "1200361736"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("titan_coder/podcast-new-episode-monitor").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 = {
    "monitorId": "example-monitor",
    "watches": [{
            "watchId": "example-podcast",
            "podcastId": "1200361736",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("titan_coder/podcast-new-episode-monitor").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 '{
  "monitorId": "example-monitor",
  "watches": [
    {
      "watchId": "example-podcast",
      "podcastId": "1200361736"
    }
  ]
}' |
apify call titan_coder/podcast-new-episode-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,titan_coder/podcast-new-episode-monitor"
        }
    }
}
```

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/WeAvL4CcskYcM1CFw/builds/42sa97YWcqTij75iG/openapi.json
