1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "locations": [
13 "Portland, OR"
14 ],
15 "services": [
16 "furniture assembly",
17 "tv mounting"
18 ],
19 "profileInputs": [
20 "1883135"
21 ],
22 "maxItems": 20,
23 "includeProfiles": true,
24 "includeReviews": false,
25 "maxReviewsPerTasker": 10,
26 "includeCityReviews": false,
27 "incrementalMode": false,
28 "emitUnchanged": false,
29 "emitExpired": false,
30 "maxNotifyListings": 50,
31 "proxyConfiguration": {
32 "useApifyProxy": true
33 }
34};
35
36
37const run = await client.actor("abotapi/taskrabbit-tasker-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47