1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "cookies": [
12 {
13 "domain": ".apollo.io",
14 "expirationDate": 1737654209.566723,
15 "hostOnly": false,
16 "httpOnly": true,
17 "name": "__cf_bm",
18 "path": "/",
19 "sameSite": "no_restriction",
20 "secure": true,
21 "session": false,
22 "storeId": "0",
23 "value": "P45vdHUTxhhwXkqyHjMTgvXkqWJ0OpbCkFiHxRwPItE-1737652412-1.0.1.1-dF325xgXXIsXb3.YEo91oj.1g7zw5eQjs4Jg0UoorlG_O56JBHbcEX3CQ3RLbZncAMJUSm8OalgDVvWfMHs9yg",
24 "id": 1
25 },
26 {
27 "domain": ".apollo.io",
28 "expirationDate": 1737654265,
29 "hostOnly": false,
30 "httpOnly": false,
31 "name": "__hssc",
32 "path": "/",
33 "sameSite": "lax",
34 "secure": false,
35 "session": false,
36 "storeId": "0",
37 "value": "21978340.1.1737652465939",
38 "id": 2
39 }
40 ],
41 "apolloUrl": "https://testExample.com"
42};
43
44
45const run = await client.actor("darth_vader/apollo-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55