# Apple Podcasts Search, Charts and Episodes (`barefoot_grade/apple-podcasts-scraper`) Actor

Search Apple Podcasts, export country charts, podcast metadata and recent episodes. No full archive, reviews or audio downloads.

- **URL**: https://apify.com/barefoot_grade/apple-podcasts-scraper.md
- **Developed by:** [Philip Kirkbride](https://apify.com/barefoot_grade) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

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

## Apple Podcasts Search, Charts and Episodes

Search Apple Podcasts, export country charts, look up podcast metadata, and collect recent episodes with descriptions and audio links. It does not download audio, collect reviews or ratings, or recover a complete episode archive.

### Input

The default collects 10 science podcasts from the US storefront:

```json
{"mode":"search","searchTerm":"science","country":"us","maxResults":10}
```

Use `mode: "charts"` for country rankings (up to 100), `details` for podcast metadata, or `episodes` for recent episodes. Details and episodes require `podcasts`, an array of Apple IDs or Apple Podcasts URLs. `maxEpisodesPerPodcast` defaults to 10 and cannot exceed 200. Availability varies by storefront.

```json
{"mode":"episodes","podcasts":["979020229"],"country":"us","maxEpisodesPerPodcast":10}
```

Search has a 200-result ceiling and no pagination. Optional `genreId` filters the returned search results; it can yield fewer rows because matching podcasts outside the capped response are unavailable. Genre charts are not supported. Set `includeOwnerContact: true` in details mode to add the publisher's explicitly supplied RSS owner name and email; the default excludes them.

### Output

Rows have `rowType`, `podcastId`, and a canonical `url`:

- `podcast`: title, author, genres, artwork URL, feed URL, episode count and last release.
- `chart`: title, author, artwork, genres, country and rank.
- `episode`: title, date, duration in seconds, plain description, audio URL and episode URL.
- `owner`: ownerName and ownerEmail, only when requested in details mode.

### Output example

```json
{"rowType":"episode","podcastId":979020229,"episodeId":1000798431669,"url":"https://podcasts.apple.com/us/podcast/id979020229?i=1000798431669","title":"Personal AI Agents for Pythonistas","date":"2026-10-27T22:27:47+00:00","durationSeconds":3998,"description":"Episode description","audioUrl":"https://talkpython.fm/episodes/download/567/personal-ai-agents-for-pythonistas.mp3?v=2","episodeUrl":"https://podcasts.apple.com/us/podcast/personal-ai-agents-for-pythonistas/id979020229?i=1000798431669&uo=4"}
```

Missing source fields are null. Episode count can exceed the number Apple makes available. Results save per target; partial runs retain saved rows and name failed targets in the run status. An unavailable source with no saved rows fails; confirmed empty results succeed. Large target lists may stop at the run deadline. Requests are paced, so increase run timeout for larger collections.

### Local use

Install `requirements-dev.txt` in a virtual environment, run `python -m unittest discover -s tests`, and start with `python -m src`.

Start charges, where configured, apply per GB of memory, rounded up; the default 512 MB run is one start unit.

# Actor input Schema

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

Search, country charts, podcast details, or recent episodes.

## `searchTerm` (type: `string`):

Search phrase; used only in search mode.

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

Two-letter Apple storefront country code.

## `maxResults` (type: `integer`):

Maximum search or chart rows. Search is capped at 200; charts at 100.

## `genreId` (type: `string`):

Optional numeric Apple genre ID for search; filtered within the capped search response. Not supported for charts.

## `podcasts` (type: `array`):

Apple podcast IDs or podcasts.apple.com URLs, required for details and episodes.

## `maxEpisodesPerPodcast` (type: `integer`):

Recent episode cap per podcast, maximum 200; Apple may return fewer.

## `includeOwnerContact` (type: `boolean`):

In details mode only, add an owner row using the public RSS itunes:owner name and email. No guessed contacts.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerm": "science",
  "country": "us",
  "maxResults": 10,
  "podcasts": [],
  "maxEpisodesPerPodcast": 10,
  "includeOwnerContact": false
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerm": "science",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("barefoot_grade/apple-podcasts-scraper").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 = {
    "searchTerm": "science",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("barefoot_grade/apple-podcasts-scraper").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 '{
  "searchTerm": "science",
  "maxResults": 10
}' |
apify call barefoot_grade/apple-podcasts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,barefoot_grade/apple-podcasts-scraper"
        }
    }
}
```

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/pbfBSa63t5isVo8gP/builds/ceYwDb0SsPzJ8HU3U/openapi.json
