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 "id": "job-1",
14 "title": "Sr. Backend Engineer (Python) - Remote, US",
15 "location": "Remote - US",
16 "company": "Acme",
17 "text": "Fully remote, open to candidates based in the United States or Canada. Base salary $160,000 - $200,000 per year plus equity. 5+ years of experience with Python, Django and PostgreSQL. We are unable to sponsor visas. Full-time."
18 },
19 {
20 "id": "job-2",
21 "title": "Data Analyst (m/w/d)",
22 "location": "Berlin, Germany",
23 "text": "Hybrid role, 3 days a week in our Berlin office. €55.000 - €65.000 per year. SQL, Python and Tableau. Fluent German required."
24 },
25 {
26 "id": "job-3",
27 "text": "Freelance Product Designer - Remote (EMEA)\n$60 - $80 per hour, 6-month contract. Figma and design systems experience."
28 }
29 ]
30};
31
32
33const run = await client.actor("keith-apis/job-posting-parser").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43