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 "https://www.taskrabbit.com/api/v3/rabbits/1883135",
21 "https://www.taskrabbit.com/api/v3/rabbits/1883135/reviews?page=2",
22 "https://www.taskrabbit.com/profile/glenn-w--3",
23 "https://www.taskrabbit.com/locations/portland",
24 "https://www.taskrabbit.com/locations/portland/lawn-mowing",
25 "https://www.taskrabbit.com/locations",
26 "https://www.taskrabbit.com/sitemaps/www.taskrabbit.com/geo_marketing_pages.xml.gz"
27 ],
28 "urls": [
29 "https://www.taskrabbit.com/api/v3/rabbits/1883135",
30 "https://www.taskrabbit.com/api/v3/rabbits/1883135/reviews?page=2",
31 "https://www.taskrabbit.com/profile/glenn-w--3",
32 "https://www.taskrabbit.com/locations/portland",
33 "https://www.taskrabbit.com/locations/portland/lawn-mowing",
34 "https://www.taskrabbit.com/locations",
35 "https://www.taskrabbit.com/sitemaps/www.taskrabbit.com/geo_marketing_pages.xml.gz"
36 ],
37 "maxItems": 20,
38 "includeProfiles": true,
39 "includeReviews": false,
40 "maxReviewsPerTasker": 20,
41 "includeCityReviews": false,
42 "scrapeServiceInfo": false,
43 "maxTaskersPerPage": 6,
44 "proxyConfiguration": {
45 "useApifyProxy": true
46 },
47 "incrementalMode": false,
48 "emitUnchanged": false,
49 "emitExpired": false,
50 "maxNotifyListings": 50
51};
52
53
54const run = await client.actor("abotapi/taskrabbit-tasker-scraper").call(input);
55
56
57console.log('Results from dataset');
58console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64