1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "SHELF",
12 "searchQueries": [
13 "billionaire"
14 ],
15 "genres": [
16 "Affair",
17 "Billionaire"
18 ],
19 "maxTags": 5,
20 "listingUrls": [
21 "https://www.reelshort.com/episodes/episode-1-daisy-tucker-and-mr-nyc-68955a832bc50c718b009d8d-fxcfjh1dzy",
22 "https://www.reelshort.com/shelf/new-release-short-movies-dramas-51003505",
23 "https://www.reelshort.com/movie-genres/affair-movies-QWZmYWly",
24 "https://www.reelshort.com/search?keywords=billionaire&type=movies",
25 "https://www.reelshort.com/movie-genres/all-movies",
26 "https://www.reelshort.com/tags/story-beats/affair-movies-676d210e4582b53a14081aeb"
27 ],
28 "fetchDetails": true,
29 "maxItems": 20,
30 "proxy": {
31 "useApifyProxy": true
32 },
33 "resumeFromRunId": "",
34 "stateKey": "",
35 "notionParentPageUrl": "",
36 "maxNotifyListings": 50
37};
38
39
40const run = await client.actor("abotapi/reelshort-com-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50