1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.instagram.com/reel/Dd9RyBWBVih/"
14 }
15 ],
16 "endUrls": [],
17 "query": "Dd9RyBWBVih",
18 "maxItems": 50,
19 "maxRequestRetries": 1,
20 "requestTimeoutSecs": 25,
21 "maxPages": 3,
22 "crawlDetails": false,
23 "maxDetailPages": 0,
24 "detailConcurrency": 4,
25 "browserFallback": true,
26 "proxyEnabled": true,
27 "targetInput": {
28 "username": [
29 "https://www.instagram.com/reel/Dd9RyBWBVih/"
30 ],
31 "resultsLimit": 1,
32 "includeTranscript": false,
33 "includeDownloadedVideo": false
34 }
35};
36
37
38const run = await client.actor("scrapeai/instagram-reel-scraper").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48