DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Scrape Podcast Data from Apple Podcasts and Spotify

Podcast data is valuable for media research and advertising.

Apple Podcasts (iTunes Search API, Free)

async function searchPodcasts(query) {
  const url = `https://itunes.apple.com/search?term=${encodeURIComponent(query)}&media=podcast&limit=25`;
  const res = await fetch(url);
  const data = await res.json();
  return data.results.map(p => ({
    name: p.collectionName,
    artist: p.artistName,
    episodes: p.trackCount,
    genre: p.primaryGenreName,
    rating: p.averageUserRating,
    url: p.collectionViewUrl,
    feed: p.feedUrl
  }));
}
Enter fullscreen mode Exit fullscreen mode

No API key needed!

Spotify Podcasts

// Use Spotify API with client credentials
const tracks = await fetch(`https://api.spotify.com/v1/search?q=${query}&type=show`, {
  headers: { Authorization: `Bearer ${token}` }
}).then(r => r.json());
Enter fullscreen mode Exit fullscreen mode

RSS Feed Parsing

Most podcasts have RSS feeds with full episode data:

const { parseStringPromise } = require("xml2js");
const res = await fetch(feedUrl);
const data = await parseStringPromise(await res.text());
const episodes = data.rss.channel[0].item;
Enter fullscreen mode Exit fullscreen mode

Use Cases

  1. Podcast market research
  2. Advertising inventory analysis
  3. Content gap identification
  4. Competitor episode tracking
  5. Guest booking research

Resources


Need podcast or media data? $20. Email: Spinov001@gmail.com | Hire me

Top comments (0)