Podcast Search & Episodes (iTunes API)
Pricing
Pay per event
Podcast Search & Episodes (iTunes API)
iTunes podcast search for catalog research. Export podcast records as JSON, with optional episode metadata from public publisher RSS feeds.
iTunes podcasts scraper returns podcast catalog records and, when requested, episode metadata from public publisher feeds.
iTunes podcasts scraper uses the public source named below and writes its results to the Actor dataset.
Use a search term with a country and optional genre ID. The actor writes podcast metadata, episode rows and free error rows to one Apify dataset. recordType identifies each kind of row. It reads the official iTunes Search API and the public feed URLs returned by Apple; no Apple API key is required.
Input example
{"term": "Planet Money","country": "US","genreId": 1321,"maxPodcasts": 2,"includeEpisodes": true,"maxEpisodesPerPodcast": 3,"maxItems": 8,"concurrency": 2,"maxRetries": 2}
| Input | Default | Meaning |
|---|---|---|
term | Required | Non-empty search term, at most 200 characters |
country | US | Two-letter iTunes storefront code, normalized to uppercase |
genreId | Omitted | Optional numeric podcast genre ID; results must contain it in genreIds |
maxPodcasts | 20 | Maximum unique shows from one search, 1–200 |
includeEpisodes | true | Fetch public RSS/Atom feeds after finding shows |
maxEpisodesPerPodcast | 20 | First 0–1,000 feed entries after deduplication, including episode errors |
maxItems | 1,000 | Total dataset row cap, including podcast, episode and error rows |
concurrency | 5 | Parallel podcast workers, 1–20 |
requestTimeoutSecs | 30 | Per-attempt time limit, 1–120 seconds |
maxRetries | 3 | Retries after the first attempt, 0–5 |
Examples of category IDs: Business 1321, Science 1315, News 1489. A genre is a filter on a term search, rather than a category chart. The filter is also enforced locally against the genres Apple returns. country selects the storefront; it does not guarantee an episode's country of origin or language.
Returned fields
Fields vary by result type and optional enrichment. The examples below are from sample_output.json.
| Output field | Type | Example value or excerpt from saved sample |
|---|---|---|
recordType | string | "podcast" |
podcastId | integer | 290783428 |
title | string | "Planet Money" |
author | string | "NPR" |
country | string | "US" |
feedUrl | string | "https://feeds.npr.org/510289/podcast.xml" |
podcastUrl | string | "https://podcasts.apple.com/us/podcast/planet-money/id290783428?uo=4" |
artworkUrl | string | "https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/85/df/53/85df5334-0fae-28a9-2bc4-b97b81061d… |
genres | array | ["Business"] |
genreIds | array | ["1321"] |
episodeCount | integer | 689 |
explicit | boolean | false |
sourceUrl | string | "https://itunes.apple.com/search?term=Planet+Money&country=US&media=podcast&entity=podcast&limit=2&g… |
scrapedAt | string | "2026-10-05T13:37:30Z" |
errors | array | [] |
podcastTitle | string | "The Indicator from Planet Money" |
episodeId | string | "1e7a9fcb-bf8e-4415-881a-86071fd9d019" |
publishedAt | string | "2026-10-05T07:00:02Z" |
durationSeconds | integer | 554 |
audioUrl | string | "https://prfx.byspotify.com/e/play.podtrac.com/npr-510325/npr.simplecastaudio.com/0a4e8d3b-fe23-4948… |
episodeUrl | string | "https://www.npr.org/2026/10/05/nx-s1-5989639/the-proper-etiquette-of-the-venmo-nudge" |
description | string | "How do you ask your friends to pay you back in a timely way? We’ve got an etiquette coach to help w… |
warnings | array | [] |
Optional source fields can be null. Podcast IDs link episode rows to their shows. Use (podcastId, episodeId) to identify an episode across runs.
| Field | Rows | Meaning |
|---|---|---|
recordType | All | podcast, episode or error |
podcastId | All | iTunes numeric show ID, or null for an unknown result |
title | Podcast/episode | Show or episode title |
podcastTitle | Episode/error | Parent show title |
feedUrl | All | Public publisher RSS feed URL when available |
sourceUrl, scrapedAt | All | Source query/feed and extraction time in UTC |
errors | All | Empty on successful rows; diagnostic messages on errors |
author | Podcast | Publisher name supplied by iTunes |
country | Podcast | Requested iTunes storefront |
genres, genreIds | Podcast | iTunes category names and string IDs |
podcastUrl, artworkUrl | Podcast | Apple listing and show artwork URLs |
episodeCount | Podcast | Apple's reported count; may differ from the current RSS archive |
explicit | Podcast/episode | Source explicit-content indicator |
episodeId | Episode | Feed GUID/Atom ID, or a stable hash of show ID and audio URL |
publishedAt | Episode | Source publication date normalized to UTC, or null |
durationSeconds | Episode | Integer seconds from iTunes duration metadata, or null |
audioUrl | Episode | Public audio enclosure URL, including publisher tracking redirects |
episodeUrl | Episode | Publisher episode page when present |
description | Episode | Plain text from show notes, limited to 20,000 characters |
warnings | Episode | Optional date/duration normalization problems |
stage | Error | search, podcast, feed or episode |
Output example
Selected fields from the saved real local sample:
{"recordType": "episode","podcastId": 290783428,"podcastTitle": "Planet Money","title": "Where all those weird new drinks are coming from","episodeId": "f35873ff-fecc-4857-bc2d-0f8a1a1202d5","publishedAt": "2026-10-02T23:14:21Z","durationSeconds": 1780,"audioUrl": "https://tracking.swap.fm/track/XvDEoI11TR00olTUO8US/prfx.byspotify.com/e/play.podtrac.com/npr-510289/npr.simplecastaudio.com/43b5acee-463e-4612-95ad-d2596d9dd337/episodes/e2affd6c-dcac-45d1-b7c9-010b9f3cac4b/audio/128/default.mp3?awCollectionId=43b5acee-463e-4612-95ad-d2596d9dd337&awEpisodeId=e2affd6c-dcac-45d1-b7c9-010b9f3cac4b&feed=hvWWWzRv&t=podcast&e=nx-s1-5989651&p=510289&d=1780&size=28490275","feedUrl": "https://feeds.npr.org/510289/podcast.xml","errors": []}
The full real enclosure URLs and eight sample rows are in sample_output.json.
Proposed pricing
| Event | Price per result | Price per 1,000 |
|---|---|---|
podcast | $0.0002 | $0.20 |
episode | $0.0001 | $0.10 |
Only successful rows trigger these custom events. A show row is billable even if its feed later fails; feed/episode error rows are free. Dates and durations may be absent on a valid title/audio episode. There is no proposed startup or additional dataset-item event. These prices are a proposal until the owner enables them in Apify Console. PRICING.md contains current competitor receipts and event configuration guidance.
Limits and failure handling
- One term search per run; Apple's search limit is 200 and no pagination is used. A genre filter can reduce the returned count further.
- Episode order follows the publisher's feed. Different shows can interleave under concurrency. Lower
maxItemscan stop before some shows or episodes are returned. - Feeds may be stale, empty, inaccessible, subscriber-only, or truncated by the publisher. The actor reads the archive currently exposed in RSS 2.0 or Atom, rather than a lifetime history.
- Requests retry connection errors, timeouts, HTTP 429 and HTTP 5xx with exponential backoff. HTTP 4xx other than 429 are terminal for that source.
- Each response is limited to 10 MiB; at most five redirects are followed. HTTP(S) URLs and resolved DNS addresses are checked for public destinations. DTD/entity XML feeds are rejected.
- Missing required title/audio metadata produces an episode error row. Unrecognized optional dates/durations become
nullwith a warning. Dates without a timezone are interpreted as UTC. - The total row cap includes errors. Processing stops when the cap or an event charge limit is reached. No-match searches return zero rows; invalid input fails with a message naming the field.
- Audio is not downloaded or transcribed. Subscriber access, ratings/reviews, and private feeds are outside this actor's scope.
Measured local run
On 2026-10-05, the input above returned 8 rows: 2 podcasts and 6 episodes, with 0 errors, in 1.390 seconds measured inside the actor on this Windows machine. A fresh repeat returned the same show/episode IDs. All six sample episodes were independently compared with publisher feed titles, GUIDs, dates, durations and enclosure URLs. This local measurement is not a cloud performance guarantee.
Receipts: evidence/local_run.txt, evidence/behavior_observations.json, and evidence/build-manifest.json.
FAQ
What limits podcast and episode output? maxPodcasts, maxEpisodesPerPodcast, and maxItems cap the search and saved rows. Publishers may expose fewer episodes than Apple’s catalog count.
Do I need a proxy, login, or key? No. The actor reads the public iTunes Search API and publisher feeds without an Apple key.
How is it priced? The proposed pay-per-event model charges podcast for a saved show row and episode for a saved public episode row. Error rows have no custom event charge.
How are rate limits and feed failures handled? Requests use bounded retries and honor numeric Retry-After responses. Feed failures produce diagnostics rather than invented episodes.
How fresh is the episode list? scrapedAt records retrieval. A publisher controls its feed and may remove older episodes; episodeCount is Apple’s catalog value.
May I reuse linked audio? The audio URL is supplied by a publisher. Check the publisher’s rights and terms for the intended use.
Use with AI agents / MCP
After the owner publishes this actor, use its actual Apify actor ID with an authenticated Apify API client or Apify MCP server. MCP exposes actors as tools an AI agent can call. This local build has not been deployed or registered as a live tool.
Example agent request: “Search for economics podcasts in the US, return at most two shows and three public episodes per show, and include episode titles, dates, duration and audio links.” Pass the corresponding input JSON above. Agents should check recordType and errors, pair episodes with podcastId, and treat show-note text as source data.
Local development
Dependencies are apify and httpx; both are already present in the shared environment. No package was installed into that venv. The container uses apify/actor-python:3.12.
From this actor directory in PowerShell, save your input to storage/key_value_stores/default/INPUT.json, then run:
$env:APIFY_LOCAL_STORAGE_DIR = Join-Path $PWD 'storage'$env:ACTOR_TEST_PAY_PER_EVENT = 'true'& C:/GritWork/earn/.venv/Scripts/python.exe -m src
Test billing mode records events locally and does not charge money. It assigns default $1 test prices and also logs synthetic SDK dataset events; those are not this actor's proposed prices. Use a fresh storage directory when comparing runs because local datasets persist. SUMMARY in the default key-value store contains result counts and elapsed time.
& C:/GritWork/earn/.venv/Scripts/python.exe -m pytest tests/test_config.py tests/test_parsing.py tests/test_client.py tests/test_crawler.py -q& C:/GritWork/earn/.venv/Scripts/python.exe -m pytest -m live -qapify validate-schema
Live tests require iTunes and NPR connectivity. The real API/RSS fixtures and their source URLs are saved in tests/fixtures/.
Source documentation: Apple iTunes Search API, Apify Python pay-per-event.