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 "li_at": "example_li_at",
13 "JSESSIONID": "ajax:example",
14 "bcookie": "example_bcookie",
15 "liap": "true",
16 "li_theme_set": "app",
17 "li_theme": "light",
18 "timezone": "Asia/Calcutta",
19 "bscookie": "example_bscookie",
20 "user-agent": "Mozilla/5.0 ...",
21 "timezoneOffset": "5.5",
22 "csrf-token": "ajax:example",
23 "User-Agent": "Mozilla/5.0 ...",
24 "x-li-track": "{\"clientVersion\":\"1.13.455\",\"mpVersion\":\"1.13.455\",\"osName\":\"web\"}",
25 "x-li-lang": "en_US",
26 "X-Restli-Protocol-Version": "2.0.0",
27 "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self-profile/",
28 "proxy": {
29 "ip": "http://proxy.example.com",
30 "port": "1080",
31 "username": "example_username",
32 "password": "example_password"
33 }
34};
35
36
37const run = await client.actor("automationagents/linkedin-profile-scrape-export").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47