1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "jobSearch",
12 "maxItems": 1,
13 "searchQuery": "python",
14 "searchUrls": [],
15 "jobType": "any",
16 "experienceLevel": "any",
17 "clientLocation": "any",
18 "clientTimezone": "any",
19 "projectDuration": "any",
20 "workload": "any",
21 "clientHireHistory": "any",
22 "contractToHireOnly": false,
23 "category": "any",
24 "subcategory": "any",
25 "sortBy": "relevance",
26 "includeJobDetails": false,
27 "postedWithinMinutes": 0,
28 "paymentVerifiedOnly": false,
29 "incremental": false,
30 "stateKey": "default",
31 "jobUrls": [],
32 "freelancerQuery": "python",
33 "freelancerSearchUrls": [],
34 "minJobSuccessScore": "0",
35 "talentType": "any",
36 "topRatedOnly": false,
37 "topRatedPlusOnly": false,
38 "risingTalentOnly": false,
39 "minHoursBilled": "0"
40};
41
42
43const run = await client.actor("xyrelith-data/upwork-jobs-and-freelancer-profiles").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53