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 "San Francisco, CA, USA"
14 ],
15 "serviceType": "overnight-boarding",
16 "petType": "dog",
17 "urls": [
18 "https://www.rover.com/san-francisco--ca--dog-boarding/"
19 ],
20 "minRating": 0,
21 "minPrice": 0,
22 "maxPrice": 0,
23 "starSitter": false,
24 "fetchDetails": true,
25 "fetchReviews": true,
26 "maxReviewsPerSitter": 0,
27 "maxItems": 20,
28 "maxPages": 0,
29 "incrementalMode": false,
30 "emitUnchanged": false,
31 "emitExpired": false,
32 "maxNotifyListings": 50,
33 "proxyConfiguration": {
34 "useApifyProxy": true
35 }
36};
37
38
39const run = await client.actor("abotapi/rover-pet-care-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49