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(); Notes
- The chart is updated daily
- Country parameter accepts ISO 3166-1 alpha-2 codes (e.g., "us", "gb", "ca")
- Category parameter supports various genres like "true-crime", "comedy", etc.
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-onlyapplePodcastsReview - Individual written reviews with text (
applePodcastsReviewText.reviews) — rating, title, body, author and date, each tagged with its storefront - An optional
countryfilter (us,gb,au,ca) scoping both the aggregates and the text - Pagination over the review text via
limit(max 100, default 25) andoffset
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 });
} Warning
- This endpoint requires authentication - ensure your API token is valid
- Be mindful of rate limits when fetching reviews for many podcasts
- The limit parameter maximum is 100 reviews per request
Notes
- Review text is returned in reverse chronological order (newest reviewed first)
- Omit the country parameter to merge all storefronts; pass one of us/gb/au/ca to scope the results
- Use pagination parameters (offset, limit) for large review sets — applePodcastsReviewText.total gives the full count
- Consider implementing retry logic for network failures