1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "liProfileUrl": "https://www.linkedin.com/in/example-profile/",
12 "maxCount": 10,
13 "texAuVariables": {
14 "yourFirstName": "",
15 "yourLastName": "",
16 "yourJobTitle": "",
17 "yourCompanyName": "",
18 "yourCompanyDescription": "Example company description",
19 "yourUsp": "Example USP"
20 },
21 "connectedAccountId": "example_connected_account_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 "profileId": "example-profile-id",
34 "User-Agent": "Mozilla/5.0 ...",
35 "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
36 "x-li-lang": "en_US",
37 "X-Restli-Protocol-Version": "2.0.0",
38 "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
39 "proxy": {
40 "ip": "http://proxy.example.com",
41 "port": "1080",
42 "username": "example_username",
43 "password": "example_password"
44 }
45};
46
47
48const run = await client.actor("automationagents/linkedin-profile-activity-export").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58