1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchTerms": [
13 "true crime"
14 ],
15 "categories": [
16 "comedy"
17 ],
18 "region": "us",
19 "urls": [
20 "https://play.pocketcasts.com/podcasts/873e7420-042d-012e-f9a4-00163e1b201c"
21 ],
22 "maxPodcasts": 10,
23 "maxEpisodes": 100,
24 "maxEpisodesPerPodcast": 0,
25 "includeEpisodes": true,
26 "includeRatings": true,
27 "incrementalMode": false,
28 "emitUnchanged": false,
29 "emitExpired": false,
30 "maxNotifyListings": 50,
31 "proxyConfiguration": {
32 "useApifyProxy": true
33 }
34};
35
36
37const run = await client.actor("abotapi/pocketcasts-podcast-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47