1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jobs": [
12 {
13 "jobUrl": "https://www.upwork.com/nx/proposals/job/~xxxxxxxxxxxxxxxxxxxx/apply/",
14 "coverLetter": "Hi there,\n\nI am excited to apply for this position. I have extensive experience in...\n\nBest regards,\n[Your Name]"
15 }
16 ],
17 "applicationPreferences": {
18 "profileMapping": [
19 {
20 "tokenKeywords": [
21 "full stack",
22 "backend",
23 "frontend"
24 ],
25 "profileIndex": 1
26 }
27 ],
28 "defaultProfileIndex": 0,
29 "fixedPricePreferences": {
30 "projectDuration": "1 to 3 months",
31 "raiseFrequency": "Never",
32 "raiseAmount": "10%"
33 },
34 "skipBiddingOnly": true,
35 "genericScreeningResponse": "I would be happy to discuss this in detail. Let us jump on a call to go over your specific requirements."
36 },
37 "browserPersistence": {
38 "enabled": true,
39 "sessionTimeout": 24,
40 "autoSave": true,
41 "fallbackToManual": true,
42 "closeAfterRun": false
43 }
44};
45
46
47const run = await client.actor("philberhane/upwork-auto-applier").call(input);
48
49
50console.log('Results from dataset');
51console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57