1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "charts",
12 "countries": [
13 "us",
14 "gb"
15 ],
16 "genres": [
17 "all"
18 ],
19 "limit": 100,
20 "country": "us",
21 "searchTerms": [
22 "technology"
23 ],
24 "podcastIds": [
25 "1535809341"
26 ],
27 "includeLatestEpisodes": 0,
28 "requestDelayMs": 2500
29};
30
31
32const run = await client.actor("echolab/apple-podcasts-charts").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