How to fetch new episodes for subscribed podcasts using podcast api?

Essentially, you need to check if there are new episodes for those subscribed podcasts. The definition for "new" episodes should be personalized. For the same podcast, different users see different "new" episodes, e.g., I may have the latest 3 episodes to catch up and you may listen to every single one except for the latest episode.

There are two approaches to check if subscribed podcasts have new episodes.

Approach 1: If you want ALL new episodes for EVERY subscribed podcast...

  1. Cache the latest episode's pub_date_ms for each podcast.
  2. POST /podcasts. You can pass up to 10 ids in the "ids" parameter, and you'll get podcasts from the response. Then, you can compare latest_pub_date_ms of a podcast with the cached pub_date_ms value.
  3. GET /podcasts/{id}. For each podcast that has new episodes, fetch latest episodes. This may end up with firing multiple requests at the same time. In practice, this is not a problem, because most users don't subscribe to many podcasts and only a few podcasts have new episodes at the same time.

Approach 2: If you just need latest episodes for SOME subscribed podcasts, then just use POST /podcasts. Pass up to 10 ids in the "ids" parameter and set the show_latest_episodes parameter to 1. Then you'll get up to 10 latest episodes of these podcasts, sorted by pub_date in a descending order.


If you haven't used Listen Notes Podcast API yet, get API keys here - Get API keys

Still need help? Contact Us Contact Us