Apple Reviews for Top Podcasts Chart

Learn how to get the Apple Reviews for the Top Podcasts Chart

ChartsPodcastsReviews
beginner
10 minutes
PodEngine Team
Prerequisites
  • API token for authenticated endpoints
  • Node.js or JavaScript runtime environment
  • Basic understanding of async/await and fetch API
1
Get the Top Podcasts Chart
Fetch the latest top podcasts from Apple charts

Request the latest top podcasts from the Apple chart API. This endpoint provides the current rankings of podcasts on Apple Podcasts for a specific country.

The chart data includes:

  • Chart metadata (type, country, date)
  • List of podcasts with their rankings
  • Basic podcast information (title, Apple ID, etc.)

Fetch Top Podcasts Chart

No authentication required for this public endpoint

const options = {
  method: "GET"
  // note no authorization required for this endpoint
};

const result = await fetch(
  "http://localhost:4000/api/v1/charts/latest?category=top+podcasts&chartType=apple&country=us", 
  options
);
const json = await result.json();
2
Get the Reviews
Iterate over each podcast and request their reviews

Now that you have the list of top podcasts, iterate through each one to fetch their reviews. Each podcast has a unique ID that can be used to retrieve detailed review information.

The reviews endpoint provides:

  • Aggregate star ratings per storefront (applePodcastsReviewsByCountry), plus a backwards-compatible US-only applePodcastsReview
  • Individual written reviews with text (applePodcastsReviewText.reviews) — rating, title, body, author and date, each tagged with its storefront
  • An optional country filter (us, gb, au, ca) scoping both the aggregates and the text
  • Pagination over the review text via limit (max 100, default 25) and offset

Fetch Reviews for Each Podcast

Requires authentication token

const { chart, podcasts } = json.data.chart;

for (const podcast of podcasts) {
  const { id, title, appleId } = podcast;

  const options = {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      "Authorization": "YOUR_API_TOKEN"
    }
  };

  // Omit `country` to get every storefront merged. Pass `country=gb|us|au|ca` to scope to one.
  const reviewsResponse = await fetch(
    `http://localhost:4000/api/v1/podcasts/${id}/reviews?country=gb&limit=100`,
    options
  );

  const { podcastReviews } = (await reviewsResponse.json()).data;

  // Aggregate star ratings, one entry per storefront (latest snapshot).
  for (const aggregate of podcastReviews.applePodcastsReviewsByCountry) {
    console.log(`${aggregate.country}: ${aggregate.rating} (${aggregate.reviewsCount} ratings)`);
  }

  // Individual review text, newest first, paginated via `limit` + `offset`.
  const { total, reviews } = podcastReviews.applePodcastsReviewText;
  console.log(`${total} reviews total`);
  console.dir(reviews, { depth: null });
}