1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "maxCountLiFollowerExport": 10,
12 "texAuVariables": {
13 "yourFirstName": "",
14 "yourLastName": "",
15 "yourJobTitle": "",
16 "yourCompanyName": "",
17 "yourCompanyDescription": "Example company description",
18 "yourUsp": "Example USP"
19 },
20 "connectedAccountId": "example_connected_account_id",
21 "profileId": "example-profile-id",
22 "li_at": "example_li_at",
23 "JSESSIONID": "ajax:example",
24 "bcookie": "example_bcookie",
25 "liap": "true",
26 "li_theme_set": "app",
27 "li_theme": "light",
28 "timezone": "Asia/Calcutta",
29 "bscookie": "example_bscookie",
30 "user-agent": "Mozilla/5.0 ...",
31 "timezoneOffset": "5.5",
32 "csrf-token": "example_csrf-token",
33 "User-Agent": "Mozilla/5.0 ...",
34 "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
35 "x-li-lang": "en_US",
36 "X-Restli-Protocol-Version": "2.0.0",
37 "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
38 "proxy": {
39 "ip": "http://proxy.example.com",
40 "port": "1080",
41 "username": "example_username",
42 "password": "example_password"
43 }
44};
45
46
47const run = await client.actor("automationagents/linkedin-following-export").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57