1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keyword": "nature",
12 "Max_items": 1000,
13 "cookies": [
14 {
15 "name": "datr",
16 "value": "sL_rZ1VMWqwRVcCuWXiAQmZX",
17 "domain": ".instagram.com",
18 "path": "/",
19 "expires": 1778063286.150982,
20 "httpOnly": true,
21 "secure": true
22 },
23 {
24 "name": "ig_did",
25 "value": "1C8AA31D-EA64-4F7A-BFB7-A5E4CFB044A2",
26 "domain": ".instagram.com",
27 "path": "/",
28 "expires": 1775039289.586829,
29 "httpOnly": true,
30 "secure": true
31 },
32 {
33 "name": "mid",
34 "value": "Z-u_sAALAAFLVNABqbKzftY5QmVX",
35 "domain": ".instagram.com",
36 "path": "/",
37 "expires": 1778063286.151132,
38 "httpOnly": true,
39 "secure": true
40 },
41 {
42 "name": "csrftoken",
43 "value": "K2icskn2peDTQSn8Fpc4d0UeXI5gvHUA",
44 "domain": ".instagram.com",
45 "path": "/",
46 "expires": 1774971325.552493,
47 "httpOnly": false,
48 "secure": true
49 },
50 {
51 "name": "ds_user_id",
52 "value": "73139193689",
53 "domain": ".instagram.com",
54 "path": "/",
55 "expires": 1751297725.552724,
56 "httpOnly": false,
57 "secure": true
58 },
59 {
60 "name": "sessionid",
61 "value": "73539491489%3A377qgGLgpVU9QO%3A18%3AAYdYA1n9adejJUjkr8k17j3-LCTLoeEC2wsBnd-_oA",
62 "domain": ".instagram.com",
63 "path": "/",
64 "expires": 1775039435.486017,
65 "httpOnly": true,
66 "secure": true
67 },
68 {
69 "name": "wd",
70 "value": "1358x642",
71 "domain": ".instagram.com",
72 "path": "/",
73 "expires": 1744126523,
74 "httpOnly": false,
75 "secure": true,
76 "sameSite": "Lax"
77 },
78 {
79 "name": "rur",
80 "value": "\"RVA\\05473539498689\\0541775057726:01f7831497b9bd63ed547dedca6805d32284ae9700d432ff00bfdd136ae1c88416ec2841\"",
81 "domain": ".instagram.com",
82 "path": "/",
83 "expires": -1,
84 "httpOnly": true,
85 "secure": true,
86 "sameSite": "Lax"
87 }
88 ]
89};
90
91
92const run = await client.actor("coderx/instagram-hashtag-username-scraper").call(input);
93
94
95console.log('Results from dataset');
96console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
97const { items } = await client.dataset(run.defaultDatasetId).listItems();
98items.forEach((item) => {
99 console.dir(item);
100});
101
102