1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "all",
12 "podcastUrls": [
13 {
14 "url": "https://podcasts.apple.com/us/podcast/the-daily/id1200361736"
15 }
16 ],
17 "podcastIds": [
18 "1200361736"
19 ],
20 "countries": [
21 "us"
22 ],
23 "chartGenre": "all",
24 "chartLimit": 20,
25 "maxItems": 20,
26 "maxReviewsPerShow": 20,
27 "maxEpisodesPerShow": 10,
28 "sortReviewsBy": "mostRecent"
29};
30
31
32const run = await client.actor("automation-lab/apple-podcasts-chart-reviews-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42