1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "postings": [
12 {
13 "title": "Senior Software Engineer",
14 "location": "Austin, TX",
15 "salaryMin": 150000,
16 "salaryMax": 185000,
17 "currency": "USD",
18 "period": "year"
19 },
20 {
21 "title": "Software Engineer II",
22 "location": "Remote, US",
23 "salaryMin": 120000,
24 "salaryMax": 150000,
25 "currency": "USD"
26 },
27 {
28 "title": "Sr. Software Engineer (Backend)",
29 "location": "New York, NY",
30 "description": "The base salary range for this role is $165,000 - $200,000 per year. Sign-on bonus: $15,000."
31 },
32 {
33 "title": "Software Engineer",
34 "location": "Denver, CO",
35 "salaryMin": 55,
36 "salaryMax": 65,
37 "currency": "USD",
38 "period": "hour"
39 },
40 {
41 "title": "Product Manager",
42 "location": "Austin, TX",
43 "salaryMin": 140000,
44 "salaryMax": 170000,
45 "currency": "USD"
46 }
47 ]
48};
49
50
51const run = await client.actor("northbell/pay-band-calculator").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61