1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "proofreader",
13 "copy editor",
14 "content editor",
15 "copywriter",
16 "content writer",
17 "technical writer",
18 "editorial",
19 "content marketing",
20 "content strategist"
21 ],
22 "sources": [
23 "jobicy",
24 "remotive",
25 "himalayas"
26 ],
27 "country": "United States",
28 "countries": [
29 "United States"
30 ],
31 "lookback_days": 30,
32 "exclude_staffing_agencies": true,
33 "exclude_freelance_marketplaces": true,
34 "freelance_marketplaces": [
35 "Upwork",
36 "Fiverr",
37 "Freelancer",
38 "Toptal",
39 "PeoplePerHour",
40 "Guru",
41 "99designs"
42 ],
43 "max_results": 25,
44 "max_companies": 40,
45 "metered_window_days": 2
46};
47
48
49const run = await client.actor("mambalabs/gtm-job-discovery").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59