1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchTerm": "software engineer",
12 "searchTerms": [],
13 "location": "New York, NY",
14 "sites": [
15 "linkedin",
16 "indeed",
17 "glassdoor"
18 ],
19 "maxResults": 10,
20 "jobType": "",
21 "hoursOld": 24,
22 "countryIndeed": "usa",
23 "googleSearchTerm": "",
24 "distance": 50,
25 "offset": 0,
26 "linkedinCompanyIds": [],
27 "descriptionFormat": "markdown",
28 "userAgent": "",
29 "caCert": "",
30 "proxyConfiguration": {
31 "useApifyProxy": true,
32 "apifyProxyGroups": [
33 "RESIDENTIAL"
34 ]
35 }
36};
37
38
39const run = await client.actor("autoclawai/my-actor-2").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49