1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jobPostings": [
12 {
13 "title": "Senior Software Engineer",
14 "companyName": "Acme Corp",
15 "description": "We are looking for a Senior Software Engineer with 5+ years of experience in Python, React, and AWS. Remote position. Salary range: $150,000 - $200,000 per year. Must have a BS in Computer Science. Join our fast-growing team!",
16 "location": "San Francisco, CA"
17 },
18 {
19 "title": "Junior Data Analyst",
20 "companyName": "DataFlow Inc",
21 "description": "Entry-level Data Analyst position. 1-2 years of experience with SQL, Python, Pandas, and Tableau preferred. On-site in New York. $65,000-$80,000/year. Multiple openings available.",
22 "location": "New York, NY"
23 }
24 ],
25 "maxJobs": 10
26};
27
28
29const run = await client.actor("automation-lab/job-posting-enrichment").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39