1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "inputType": "text",
12 "cvsBatch": `John Smith
13 Email: john@example.com
14 Senior Software Engineer
15 5 years experience
16 Skills: Python, JavaScript, SQL
17
18 ===
19
20 Sarah Johnson
21 Email: sarah@example.com
22 Junior Developer
23 2 years experience
24 Skills: HTML, CSS, React`,
25 "pdfUrls": [],
26 "jobTitle": "Software Engineer",
27 "jobDescription": "Looking for a Software Engineer with 3+ years of experience in Python and JavaScript. Must have strong problem-solving skills.",
28 "requiredSkills": [
29 "Python",
30 "JavaScript"
31 ],
32 "experienceYears": 3
33};
34
35
36const run = await client.actor("peghin/easyhireapp---candidate-score").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46