
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 })); } 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 ()); RSS Feed Parsing Most podcasts have RSS feeds with full episode data: const { parseStringPromise } = require ( " xml2js " ); const res = await fetch ( feedUrl ); const data = await par
Continue reading on Dev.to Webdev
Opens in a new tab



